Examples of URLInformation


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

        Request request = ObjectModelHelper.getRequest(objectModel);
        String webappUri = ServletHelper.getWebappURI(request);

        String tabGroup = getTabGroup(request);
        URLInformation url = new URLInformation(webappUri);
        String area = tabGroup != null ? tabGroup : url.getArea();

        this.attributeHandlers.add(new AttributeHandler(ATTR_AREAS, area));
       
        try {
            DocumentFactory factory = DocumentUtil.getDocumentFactory(this.manager, request);
View Full Code Here

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

     */
    protected AntProperties getProperties(Map objectModel) throws ConfigurationException {
        AntProperties properties;
        Request request = ObjectModelHelper.getRequest(objectModel);
        String webappUrl = ServletHelper.getWebappURI(request);
        URLInformation info = new URLInformation(webappUrl);
        String pubId = info.getPublicationId();
        DocumentFactory factory = DocumentUtil.getDocumentFactory(this.serviceManager, request);
        if (factory.existsPublication(pubId)) {
            try {
                Publication pub = factory.getPublication(pubId);
                properties = getPublicationProperties(pub);
View Full Code Here

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

            accessController = acResolver.resolveAccessController(webappUrl);

            contextUtil = (ContextUtility) this.manager.lookup(ContextUtility.ROLE);
            Request request = contextUtil.getRequest();
            DocumentFactory factory = DocumentUtil.getDocumentFactory(this.manager, request);
            URLInformation info = new URLInformation(webappUrl);
            Publication pub = factory.getPublication(info.getPublicationId());
            Role[] roles = PolicyUtil.getRoles(request);

            Authorizer[] authorizers = accessController.getAuthorizers();
            for (int i = 0; i < authorizers.length; i++) {
                if (authorizers[i] instanceof UsecaseAuthorizer) {
View Full Code Here

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

        }
    }

    protected Area getArea() {
        String url = getSourceURL();
        URLInformation info = new URLInformation(url);
        String pubId = info.getPublicationId();
        String areaName = info.getArea();
        Area area;
        try {
            area = getDocumentFactory().getPublication(pubId).getArea(areaName);
        } catch (PublicationException e) {
            throw new RuntimeException(e);
View Full Code Here

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

    }

    protected String getPublicationId() {
        Request request = ContextHelper.getRequest(this.context);
        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

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

            if (pubId == null) {
                String webappUrl = request.getRequestURI().substring(
                        request.getContextPath().length());

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

            DocumentFactory factory = DocumentUtil.getDocumentFactory(this.manager, request);
            if (factory.existsPublication(pubId)) {
                Publication pub = factory.getPublication(pubId);
View Full Code Here

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

        if (getDocumentFactory().isDocument(sourceUrl)) {
            Document doc = factory.getFromURL(sourceUrl);
            preOrder = getPreOrder(doc.getLink().getNode());
        } else {
            preOrder = new ArrayList();
            URLInformation info = new URLInformation(getSourceURL());
            Publication pub = factory.getPublication(info.getPublicationId());
            Area area = pub.getArea(info.getArea());
            SiteStructure site = area.getSite();
            SiteNode[] topLevelNodes = site.getTopLevelNodes();
            for (int i = 0; i < topLevelNodes.length; i++) {
                preOrder.addAll(getPreOrder(topLevelNodes[i]));
            }
View Full Code Here

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

                throw new SourceException("Error getting publication id / area from page envelope ["
                        + location + "]");
            }
            if (pub != null && pub.exists()) {
                String url = ServletHelper.getWebappURI(request);
                area = new URLInformation(url).getArea();
            } else {
                throw new SourceException("Error getting publication id / area from page envelope ["
                        + location + "]");
            }
        } else {
View Full Code Here

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

        }
        return entries;
    }

    protected String getPublicationName(Usecase usecase) {
        URLInformation info = new URLInformation(usecase.getSourceURL());
        return info.getPublicationId();
    }
View Full Code Here

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

        super.setup(resolver, objectModel, src, params);

        Request req = ObjectModelHelper.getRequest(objectModel);
        DocumentFactory factory = DocumentUtil.getDocumentFactory(this.manager, request);
        String webappUrl = ServletHelper.getWebappURI(req);
        URLInformation info = new URLInformation(webappUrl);
        try {
            Publication pub = factory.getPublication(info.getPublicationId());
            this.area = pub.getArea(info.getArea());
        } catch (Exception e) {
            throw new RuntimeException(e);
        }
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.