Package org.apache.lenya.cms.repository

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


        try {
            if (params.isParameter(PARAMETER_URLS)) {
                setUrlType(params.getParameter(PARAMETER_URLS));
            }
            Session session = RepositoryUtil.getSession(this.manager, request);
            String webappUrl = getWebappUrl(params, objectModel);
            this.rewriter = new OutgoingLinkRewriter(this.manager, session, webappUrl,
                    request.isSecure(), false, this.relativeUrls);
        } catch (final Exception e) {
            throw new RuntimeException(e);
View Full Code Here


        try {

            resolver = (UsecaseResolver) this.manager.lookup(UsecaseResolver.ROLE);
            usecase = resolver.resolve(webappUrl, usecaseName);

            Session testSession = getTestSession();
            if (testSession != null) {
                usecase.setTestSession(testSession);
            }

            passParameters(usecase, parameters);
View Full Code Here

        return (Part) getParameter(name);
    }

    protected DocumentFactory getDocumentFactory() {
        DocumentFactory factory = (DocumentFactory) getParameter(PARAMETER_FACTORY);
        Session session = getSession();
        if (factory == null || factory.getSession() != session) {
            factory = DocumentUtil.createDocumentFactory(this.manager, session);
            setParameter(PARAMETER_FACTORY, factory);
        }
        return factory;
View Full Code Here

    /**
     * @see org.apache.avalon.framework.activity.Initializable#initialize()
     */
    public final void initialize() throws Exception {
        Request request = ContextHelper.getRequest(this.context);
        Session session = RepositoryUtil.getSession(this.manager, request);
        setSession(session);
        setParameter(PARAMETER_STATE_MACHINE, new StateMachine(MODEL));
    }
View Full Code Here

     */
    void handleError(String msg) throws SAXException {
        closeIndexer();

        try {
            Session session = RepositoryUtil.getSession(this.manager, this.request);
            User sender = session.getIdentity().getUser();
            UserManager userManager = (UserManager) sender.getItemManager();
            User recipient = userManager.getUser(this.notificationRecipient);
            Identifiable[] recipients = { recipient };

            String subject = "indexing-failed-subject";
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

                + BLOG_NODE_NAME, attributes);

        ServiceSelector selector = null;
        SiteManager siteManager = null;
        try {           
            Session session = RepositoryUtil.getSession(this.manager, request);
            DocumentFactory map = DocumentUtil.createDocumentFactory(this.manager, session);
            Publication publication = PublicationUtil.getPublication(
                    this.manager, request);
           
           
View Full Code Here

        ServiceSelector selector = null;
        SiteManager siteManager = null;
        try {
            Request request = ObjectModelHelper.getRequest(this.objectModel);
            Session session = RepositoryUtil.getSession(this.manager, request);
            DocumentFactory map = DocumentUtil.createDocumentFactory(this.manager, session);
            Publication publication = PublicationUtil.getPublication(this.manager, request);

            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
View Full Code Here

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

        Request _request = ObjectModelHelper.getRequest(_objectModel);

        try {
            Session session = RepositoryUtil.getSession(this.manager, _request);
            this.factory = DocumentUtil.createDocumentFactory(this.manager, session);
            this.currentUrl = ServletHelper.getWebappURI(_request);
            if (this.factory.isDocument(this.currentUrl)) {
                this.currentDoc = this.factory.getFromURL(this.currentUrl);
            }
View Full Code Here

            Parameters _parameters) throws ProcessingException, SAXException, IOException {
        super.setup(_resolver, _objectModel, _source, _parameters);

        Request _request = ObjectModelHelper.getRequest(_objectModel);
        try {
            Session session = RepositoryUtil.getSession(this.manager, _request);
            DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
            String url = ServletHelper.getWebappURI(_request);
            URLInformation info = new URLInformation(url);
            Publication pub = factory.getPublication(info.getPublicationId());
            Area area = pub.getArea(info.getArea());
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.