Package org.apache.lenya.cms.publication

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


        SiteTree tree;
        SharedItemStore store = null;
        try {
            DocumentFactory factory = DocumentUtil.createDocumentFactory(this.manager, session);
            Publication publication = factory.getPublication(publicationId);
            Area area = publication.getArea(areaName);
            store = (SharedItemStore) this.manager.lookup(SharedItemStore.ROLE);

            Session storeSession = store.getSession();
            if (session.isModifiable() || session == storeSession) {
                tree = new SiteTreeImpl(this.manager, area, getLogger());
View Full Code Here


        assertTrue(getTargetUrl().startsWith(TARGET_URL));

        super.checkPostconditions();

        Area authoring = getPublication("test").getArea("authoring");
        SiteStructure authoringSite = authoring.getSite();
        assertFalse(authoringSite.contains(PATH));

        Area trash = getPublication("test").getArea("trash");
        SiteStructure trashSite = trash.getSite();
        assertTrue(trashSite.contains(PATH));
        String trashUuid = trashSite.getNode(PATH).getUuid();
        assertNotNull(trashUuid);
        assertEquals(trashUuid, this.uuid);
View Full Code Here

    private String uuid;

    protected void prepareUsecase() throws Exception {
        super.prepareUsecase();
        Area authoring = getPublication("test").getArea("authoring");

        SiteStructure authoringSite = authoring.getSite();
        SiteNode node = authoringSite.getNode(SOURCE_PATH);
        Document doc = node.getLink("en").getDocument();

        DocumentManager docMgr = null;
        try {
View Full Code Here

        Document doc = getSourceDocument();
        if(doc == null) {
            return;
        }
        // Check to see if parent node exists in target to prevent ghost nodes
        Area targetArea = doc.getPublication().getArea(targetAreaName);
        DocumentLocator targetLoc = doc.getLocator().getAreaVersion(targetAreaName);
        targetLoc = SiteUtil.getAvailableLocator(this.manager, getDocumentFactory(), targetLoc);
        String targetPath = targetLoc.getPath();
        targetPath = targetPath.substring(0,targetPath.lastIndexOf('/'));
        if(!targetArea.getSite().contains(targetPath)) {
            addErrorMessage("The authoring path [" + targetPath + "] does not exist.");
        }
    }
View Full Code Here

                            "Error by setting up the transformation. Please fix the calling code.");
                if (lang == null)
                    lang = pub.getDefaultLanguage();
                List returnValues = new ArrayList();
                try {
                    Area areaObj = pub.getArea(this.area);
                    if (areaObj.contains(uuid, lang)) {
                        Document document = areaObj.getDocument(uuid, lang);
                        MetaData metaData = document.getMetaData(ns);
                        returnValues.addAll(Arrays.asList(metaData.getValues(key)));
                    } else if (defaultValue != null) {
                        returnValues.add(defaultValue);
                    } else {
View Full Code Here

        String targetAreaName = getTargetArea();
        Document doc = getSourceDocument();
        Document[] sources = SiteUtil.getSubSite(this.manager, doc.getLink().getNode())
                .getDocuments();
        Area targetArea = doc.getPublication().getArea(targetAreaName);

        DocumentLocator targetLoc = doc.getLocator().getAreaVersion(targetAreaName);
        targetLoc = SiteUtil.getAvailableLocator(this.manager, getDocumentFactory(), targetLoc);

        for (int i = 0; i < sources.length; i++) {
View Full Code Here

        LinkResolver linkResolver = null;
        try {
            linkManager = (LinkManager) this.manager.lookup(LinkManager.ROLE);
            linkResolver = (LinkResolver) this.manager.lookup(LinkResolver.ROLE);
            for (int a = 0; a < areaNames.length; a++) {
                Area area = pub.getArea(areaNames[a]);
                Document[] docs = area.getDocuments();
                for (int d = 0; d < docs.length; d++) {
                    Link[] links = linkManager.getLinksFrom(docs[d]);
                    for (int l = 0; l < links.length; l++) {
                        String uri = links[l].getUri();
                        LinkTarget target = linkResolver.resolve(docs[d], uri);
View Full Code Here

TOP

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

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.