Package org.apache.lenya.cms.publication

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


        if (getLogger().isDebugEnabled()) {
            getLogger().debug("Resolving policy for webapp URL [" + webappUrl + "]");
        }

        String url = null;
        URLInformation info = new URLInformation(webappUrl);
        String pubId = info.getPublicationId();
        String area = info.getArea();
       
        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());
View Full Code Here


        }
        pub.saveConfiguration();
    }

    protected Publication getPublication() throws PublicationException {
        URLInformation info = new URLInformation(getSourceURL());
        String pubId = info.getPublicationId();
        Publication pub = getDocumentFactory().getPublication(pubId);
        return pub;
    }
View Full Code Here

            String pubId = null;
            if (par.isParameter(PARAM_PUB)) {
                pubId = par.getParameter(PARAM_PUB);
            } else {
                String webappUrl = ServletHelper.getWebappURI(request);
                URLInformation info = new URLInformation(webappUrl);
                pubId = info.getPublicationId();
            }
            Publication pub = factory.getPublication(pubId);
            this.site = pub.getArea(area).getSite();

            if (this.path == null) {
View Full Code Here

            Request request = ObjectModelHelper.getRequest(objectModel);
            this.factory = DocumentUtil.getDocumentFactory(this.manager, request);
            this.linkResolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);

            String webappUrl = getWebappUrl(params, objectModel);
            URLInformation url = new URLInformation(webappUrl);
            this.pubId = url.getPublicationId();
            this.area = url.getArea();

        } catch (ServiceException e) {
            throw new ProcessingException(e);
        }
    }
View Full Code Here

            if (uuid == null) {
                uuid = envDocument.getUUID();
            }

            if (documentArea == null) {
                URLInformation info = new URLInformation(webappUrl);
                String completeArea = info.getCompleteArea();
                documentArea = completeArea;
            }

            if (language == null) {
                language = envDocument.getLanguage();
View Full Code Here

    /**
     * @return The area without the "info-" prefix.
     */
    public String getArea() {
        URLInformation info = new URLInformation(getSourceURL());
        return info.getArea();
    }
View Full Code Here

     *      org.apache.excalibur.source.SourceResolver)
     */
    protected Object generateCacheKey(String webappUrl, SourceResolver resolver)
            throws AccessControlException {

        URLInformation info = new URLInformation(webappUrl);

        String publicationId = info.getPublicationId();
        if (getLogger().isDebugEnabled()) {
            getLogger().debug(
                    "Using first URL step (might be publication ID) as cache key: ["
                            + publicationId + "]");
        }
View Full Code Here

        // remove leading slash
        String url = webappUrl.substring(1);

        if (url.length() > 0) {

            URLInformation info = new URLInformation(webappUrl);
            String pubId = info.getPublicationId();

            ContextUtility util = null;
            try {
                util = (ContextUtility) this.manager.lookup(ContextUtility.ROLE);
                Request request = util.getRequest();
View Full Code Here

    /**
     * @return The current publication.
     * @throws PublicationException if the usecase isn't invoked inside a publication.
     */
    protected Publication getPublication() throws PublicationException {
        URLInformation info = new URLInformation(getSourceURL());
        return getDocumentFactory().getPublication(info.getPublicationId());
    }
View Full Code Here

     * @see org.apache.lenya.ac.impl.AbstractAccessControllerResolver#generateCacheKey(java.lang.String, org.apache.excalibur.source.SourceResolver)
     */
    protected Object generateCacheKey(String webappUrl, SourceResolver resolver)
        throws AccessControlException {
         
        URLInformation info = new URLInformation(webappUrl);

        String publicationId = info.getPublicationId();
        if (getLogger().isDebugEnabled()) {
      getLogger().debug(
        "Using first URL step (might be publication ID) as cache key: [" + publicationId + "]");
        }

View Full Code Here

TOP

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

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.