Package org.apache.lenya.cms.site

Examples of org.apache.lenya.cms.site.SiteManager


    }

    protected boolean getVisibleInNav() {
        Document source = getSourceDocument();
        ServiceSelector selector = null;
        SiteManager siteManager = null;
        try {
            selector = (ServiceSelector) manager.lookup(SiteManager.ROLE + "Selector");
            siteManager = (SiteManager) selector.select(source.getPublication()
                    .getSiteManagerHint());
            return siteManager.isVisibleInNav(source);
        } catch (Exception e) {
            throw new RuntimeException(e);
        } finally {
            if (selector != null) {
                if (siteManager != null) {
View Full Code Here


     * @see org.apache.lenya.cms.usecase.AbstractUsecase#getNodesToLock()
     */
    protected org.apache.lenya.cms.repository.Node[] getNodesToLock() throws UsecaseException {
        List nodes = new ArrayList();
        ServiceSelector selector = null;
        SiteManager siteManager = null;

        try {
            Publication publication = PublicationUtil.getPublicationFromUrl(this.manager,
                    getDocumentFactory(),
                    getSourceURL());
            DocumentFactory identityMap = getDocumentFactory();
            Document[] docs = getTrashDocuments();
            for (int i = 0; i < docs.length; i++) {
                nodes.add(docs[i].getRepositoryNode());
            }

            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
            SiteStructure structure = siteManager.getSiteStructure(identityMap,
                    publication,
                    Publication.TRASH_AREA);
            nodes.add(structure.getRepositoryNode());
        } catch (Exception e) {
            throw new UsecaseException(e);
View Full Code Here

                getSourceURL());
        DocumentFactory identityMap = getDocumentFactory();
        Document[] documents;

        ServiceSelector selector = null;
        SiteManager siteManager = null;
        try {
            selector = (ServiceSelector) this.manager.lookup(SiteManager.ROLE + "Selector");
            siteManager = (SiteManager) selector.select(publication.getSiteManagerHint());
            documents = siteManager.getDocuments(identityMap, publication, Publication.TRASH_AREA);
        } catch (ServiceException e) {
            throw new RuntimeException(e);
        } finally {
            if (selector != null) {
                if (siteManager != null) {
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.site.SiteManager

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.