Package org.apache.lenya.cms.publication

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


        return policies;
    }

    protected String getPolicyURL() {
        String infoUrl = getSourceURL();
        URLInformation info = new URLInformation(infoUrl);

        String area = getParameterAsString("acArea");
        String url = "/" + info.getPublicationId() + "/" + area + info.getDocumentUrl();
        return url;
    }
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

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

            Request request = ObjectModelHelper.getRequest(this.objectModel);

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

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

            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);
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

     * @return A publication.
     */
    protected Publication getPublication(String webappUrl) {
        Publication publication = null;
        try {
            URLInformation info = new URLInformation(webappUrl);
            String publicationId = info.getPublicationId();

            if (publicationId != null) {
                PublicationFactory factory = PublicationFactory.getInstance(getLogger());
                Publication pub = factory.getPublication(this.manager, webappUrl);
                if (pub.exists()) {
View Full Code Here

     */
    protected void initParameters() {
        super.initParameters();

        try {
            URLInformation info = new URLInformation(getSourceURL());
            setParameter(COMPLETE_AREA, info.getCompleteArea());

            DocumentFactory map = getDocumentFactory();
            if (map.isDocument(getSourceURL())) {
                Document sourceDocument = map.getFromURL(getSourceURL());
                setParameter(DOCUMENT, sourceDocument);
View Full Code Here

    /**
     * @see org.apache.lenya.cms.usecase.AbstractUsecase#doCheckPreconditions()
     */
    protected void doCheckPreconditions() throws Exception {
        super.doCheckPreconditions();
        URLInformation info = new URLInformation(getSourceURL());
        String acArea = getParameterAsString(AC_AREA);
        if (!acArea.equals(Publication.LIVE_AREA) && !info.getArea().equals(acArea)) {
            addErrorMessage("This usecase can only be invoked in the configured area.");
        }
    }
View Full Code Here

        return policies;
    }

    protected String getPolicyURL() {
        String infoUrl = getSourceURL();
        URLInformation info = new URLInformation(infoUrl);

        String area = getParameterAsString(AC_AREA);
        String url = "/" + info.getPublicationId() + "/" + area + info.getDocumentUrl();
        return url;
    }
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.