Package org.apache.lenya.cms.repository

Examples of org.apache.lenya.cms.repository.Session


     * @see org.apache.lenya.cms.cocoon.flow.FlowHelper#getPageEnvelope(org.apache.cocoon.components.flow.javascript.fom.FOM_Cocoon)
     */
    public PageEnvelope getPageEnvelope(FOM_Cocoon cocoon) throws PageEnvelopeException {
        Request request = getRequest(cocoon);
        try {
            Session session = RepositoryUtil.getSession(this.manager, request);
            DocumentFactory map = DocumentUtil.createDocumentFactory(this.manager, session);
            PageEnvelopeFactory factory = PageEnvelopeFactory.getInstance();
            Publication publication = PublicationUtil.getPublication(this.manager, request);
            return factory.getPageEnvelope(map, cocoon.getObjectModel(), publication);
        } catch (Exception e) {
View Full Code Here


    public void triggerWorkflow(FOM_Cocoon cocoon, String event) throws WorkflowException,
            PageEnvelopeException, AccessControlException {
        Document document = getPageEnvelope(cocoon).getDocument();
        Request request = getRequest(cocoon);
        try {
            Session session = RepositoryUtil.getSession(this.manager, request);
            WorkflowUtil.invoke(this.manager, session, getLogger(), document, event);
        } catch (Exception e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }
View Full Code Here

        Request request = ObjectModelHelper.getRequest(objectModel);
        String webappUri = ServletHelper.getWebappURI(request);
        URLInformation info = new URLInformation(webappUri);
        String pubId = null;
        try {
            Session session = RepositoryUtil.getSession(this.manager, request);
            DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
            String pubIdCandidate = info.getPublicationId();
            if (pubIdCandidate != null && factory.existsPublication(pubIdCandidate)) {
                pubId = pubIdCandidate;
            }
View Full Code Here

        try {
            pub = PublicationUtil.getPublication(this.manager, request);
        } catch (Exception e) {
            throw new AccessControlException(e);
        }
        Session session = RepositoryUtil.getSession(this.manager, request);
        DocumentFactory map = DocumentUtil.createDocumentFactory(this.manager, session);
        Document document = map.get(pub, area, documentId, language);

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

       
        if (pubId != null && area != null && info.getDocumentUrl().length() > 1) {
            ContextUtility contextUtility = null;
            try {
                contextUtility = (ContextUtility) serviceManager.lookup(ContextUtility.ROLE);
                Session session = RepositoryUtil.getSession(this.serviceManager, contextUtility
                        .getRequest());
                DocumentFactory map = DocumentUtil.createDocumentFactory(this.serviceManager, session);
                Publication pub = map.getPublication(pubId);
                DocumentLocator loc = pub.getDocumentBuilder().getLocator(map, webappUrl);
                url = "/" + pubId + "/" + area + loc.getPath();
View Full Code Here

            this.getLogger().debug("Parameter areas: " + areasStr.toString());
        }

        Source source = null;
        try {
            Session session = RepositoryUtil.getSession(this.manager, request);
            DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
            String pubId = null;
            if (par.isParameter(PARAM_PUB)) {
                pubId = par.getParameter(PARAM_PUB);
            } else {
View Full Code Here

            DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
            Publication publication = factory.getPublication(publicationId);
            Area area = publication.getArea(areaName);
            store = (SharedItemStore) this.manager.lookup(SharedItemStore.ROLE);

            Session storeSession = store.getSession();
            if (session.isModifiable() || session == storeSession) {
                tree = new SiteTreeImpl(this.manager, area, getLogger());
            } else {
                tree = new DelegatingSiteTree(this.manager, area, this, storeSession, key);
            }
View Full Code Here

            this.publication = PublicationUtil.getPublication(manager, _objectModel);
        } catch (PublicationException e) {
            throw new RuntimeException(e);
        }
        Request request = ObjectModelHelper.getRequest(_objectModel);
        Session session;
        try {
            session = RepositoryUtil.getSession(manager, request);
        } catch (RepositoryException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        Request request = ObjectModelHelper.getRequest(objectModel);
        this.url = ServletHelper.getWebappURI(request);
        this.contextPath = request.getContextPath();

        try {
            Session session = RepositoryUtil.getSession(manager, request);
            this.factory = DocumentUtil.createDocumentFactory(this.manager, session);

            this.pub = PublicationUtil.getPublication(manager, objectModel);
        } catch (Exception e) {
            throw new ProcessingException(e);
View Full Code Here

                if (accessController != null) {
                    PolicyManager policyManager = accessController.getPolicyManager();
                    Policy policy = policyManager.getPolicy(accessController.getAccreditableManager(),
                            url);
                    if (policy.isSSLProtected()) {
                        Session session = RepositoryUtil.getSession(this.manager, request);
                        LinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, session, url,
                                false, true, false);
                        String sslUri = rewriter.rewrite(url);
                        return Collections.singletonMap(KEY_REDIRECT_URI, sslUri);
                    }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.repository.Session

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.