Package org.apache.lenya.cms.publication

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


        }

    }

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


    public static final String PARAM_AREA = "area";
    public static final String PARAM_INDEX_AREA = "indexArea";
   
    public void prepareView() {
        String url = getSourceURL();
        URLInformation info = new URLInformation(url);
        String area = info.getArea();
        setParameter(PARAM_AREA, area);
        setParameter(PARAM_INDEX_AREA, "all");
    }
View Full Code Here

        setParameter(PARAM_INDEX_AREA, "all");
    }
   
    public void doExecute() throws Exception {
        String url = getSourceURL();
        URLInformation info = new URLInformation(url);
        String pubId = info.getPublicationId();

        DocumentFactory factory = getDocumentFactory();
        Publication pub = factory.getPublication(pubId);

        String areaName = getParameterAsString(PARAM_INDEX_AREA);
View Full Code Here

    /**
     * @return The publicationID from an URL.
     */
    private String getPublicationIDfromURL() {
        URLInformation info = new URLInformation(getSourceURL());
        return info.getPublicationId();
    }
View Full Code Here

            String servletContextPath = context.getRealPath("");

            try {
                DocumentFactory factory = getDocumentFactory();
                Publication pub = null;
                String pubId = new URLInformation(webappUrl).getPublicationId();
                if (pubId != null && factory.existsPublication(pubId)) {
                    pub = factory.getPublication(pubId);
                }
                envelope = PageEnvelopeFactory.getInstance().getPageEnvelope(
                        factory,
View Full Code Here

    }

    protected String getPublicationId(Map objectModel) {
        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;
            }
        } catch (Exception e) {
            throw new RuntimeException(e);
View Full Code Here

        super.initParameters();

        Request request = ContextHelper.getRequest(this.context);
        String requesturi = request.getRequestURI();
        setParameter("requesturi", requesturi);
        URLInformation info = new URLInformation(getSourceURL());
        String pubId = info.getPublicationId();
        LinkRewriter rewriter = new OutgoingLinkRewriter(this.manager, getSession(),
                    getSourceURL(), request.isSecure(), false, false);
       
        setParameter("proxyUrl",rewriter.rewrite("/" + pubId));
    }
View Full Code Here

            setParameter(CLIPBOARD_LABEL, label);
        }
    }

    protected Publication getPublication() {
        URLInformation info = new URLInformation(getSourceURL());
        String pubId = info.getPublicationId();
        try {
            return getDocumentFactory().getPublication(pubId);
        } catch (PublicationException e) {
            throw new RuntimeException(e);
        }
View Full Code Here

        return (Node[]) nodes.toArray(new Node[nodes.size()]);
    }

    protected Area getArea() {
        Publication pub = getPublication();
        URLInformation info = new URLInformation(getSourceURL());
        try {
            return pub.getArea(info.getArea());
        } catch (PublicationException e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here

        WorkflowManager resolver = null;
        try {
            Document doc = getSourceDocument();
            if (doc == null) {
                URLInformation info = new URLInformation(getSourceURL());
                Publication pub = getDocumentFactory().getPublication(info.getPublicationId());
                Area area = pub.getArea(info.getArea());
                setParameter(PARAM_NUMBER_OF_DOCUMENTS, new Integer(area.getDocuments().length));
                setParameter(PARAM_NUMBER_OF_SITE_NODES, new Integer(area.getSite().getNodes().length));
            }
            else {
                // read parameters from Dublin Core meta-data
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.