Package org.apache.lenya.cms.publication

Examples of org.apache.lenya.cms.publication.PublicationFactory


     * @param _objectModel The Cocoon object model.
     */
    public DocumentHelper(ServiceManager manager, Map _objectModel) {
        this.objectModel = _objectModel;
        try {
            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
            this.publication = factory.getPublication(_objectModel);
        } catch (PublicationException e) {
            throw new RuntimeException(e);
        }
        this.identityMap = new DocumentIdentityMap(manager, new ConsoleLogger());
    }
View Full Code Here


            return null;
        }

        PageEnvelope envelope = null;
        PublicationFactory factory = PublicationFactory.getInstance(getLogger());
        Publication publication = factory.getPublication(objectModel);
        DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
        Document document = null;

        try {
            envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(map, objectModel);
View Full Code Here

            getLogger().debug("    Document ID: [" + documentId + "]");
            getLogger().debug("    Language:    [" + language + "]");
            getLogger().debug("    Event:       [" + eventName + "]");
        }

        PublicationFactory pubFactory = PublicationFactory.getInstance(getLogger());
        Publication pub = pubFactory.getPublication(objectModel);
        DocumentIdentityMap map = new DocumentIdentityMap(this.manager, getLogger());
        Document document = map.get(pub, area, documentId, language);

        if (getLogger().isDebugEnabled()) {
            getLogger().debug("    Invoking workflow event");
View Full Code Here

     * @return A document.
     * @throws DocumentBuildException if the document could not be built.
     */
    public Document getDocument(DocumentIdentityMap identityMap) throws DocumentBuildException {

        PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
        Publication publication;
        try {
            publication = factory.getPublication(this.publicationId, this.servletContextPath);
        } catch (PublicationException e) {
            throw new RuntimeException(e);
        }
        Document document = identityMap.get(publication, this.area, this.documentId, this.language);
        return document;
View Full Code Here

        log.debug("Creating CocoonTaskWrapper");

        Publication publication;
        try {
            PublicationFactory factory = PublicationFactory.getInstance(new ConsoleLogger());
            publication = factory.getPublication(objectModel);
        } catch (PublicationException e) {
            throw new ExecutionException(e);
        }
        Request request = ObjectModelHelper.getRequest(objectModel);
View Full Code Here

            super.setup(_resolver, _objectModel, src, _parameters);

            parameterize(_parameters);

            PageEnvelope envelope = null;
            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            this.publication = factory.getPublication(_objectModel);
            this.identityMap = new DocumentIdentityMap(this.manager, getLogger());
            envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(this.identityMap,
                    _objectModel);

            setDocument(envelope.getDocument());
View Full Code Here

            contextSource = sourceResolver.resolveURI("context://");
            Request request = ContextHelper.getRequest(this.context);
            String webappUrl = request.getRequestURI().substring(request.getContextPath().length());

            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
           
            String contextPath = SourceUtil.getFile(contextSource).getAbsolutePath();
            URLInformation info = new URLInformation(webappUrl);
            String publicationId = info.getPublicationId();
           
            Publication pub = factory.getPublication(publicationId, contextPath);
            if (pub.exists()) {
                ExistingSourceResolver resolver = new ExistingSourceResolver();
                templateManager.visit(pub, path, resolver);
                resolvedUri = resolver.getURI();
            }
View Full Code Here

        this.sourceUrl = ServletHelper.getWebappURI(request);

        try {
            this.roles = PolicyAuthorizer.getRoles(_request);

            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            this.publication = factory.getPublication(_objectModel);

            this.serviceSelector = (ServiceSelector) this.manager
                    .lookup(AccessControllerResolver.ROLE + "Selector");
            this.acResolver = (AccessControllerResolver) this.serviceSelector
                    .select(AccessControllerResolver.DEFAULT_RESOLVER);
View Full Code Here

        try {
            resolver = (SourceResolver) this.manager.lookup(SourceResolver.ROLE);
            source = resolver.resolveURI("context://");
            File servletContext = SourceUtil.getFile(source);

            PublicationFactory factory = PublicationFactory.getInstance(getLogger());
            Publication publication = factory.getPublication(publicationId, servletContext
                    .getAbsolutePath());
          
            tree = new DefaultSiteTree(publication, area, this.manager);
            ContainerUtil.enableLogging(tree, getLogger());
           
View Full Code Here

     * @see org.apache.lenya.cms.usecase.AbstractUsecase#initParameters()
     */
    protected void initParameters() {
        super.initParameters();

        PublicationFactory factory = PublicationFactory.getInstance(getLogger());
        try {
            Publication[] pubs = factory.getPublications(this.manager);
            List templates = new ArrayList();
            for (int i = 0; i < pubs.length; i++) {
                if (pubs[i].getInstantiatorHint() != null) {
                    templates.add(pubs[i].getId());
                }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.publication.PublicationFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.