Package org.apache.lenya.cms.site

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


    public SiteNode add(String path, String followingSiblingPath) throws SiteException {
        String parentPath = getParentPath(path);
        String nodeName = path.substring(parentPath.length() + 1);

        if (!followingSiblingPath.startsWith(parentPath + "/")) {
            throw new SiteException("Invalid following sibling path [" + followingSiblingPath + "]");
        }

        String followingNodeName = followingSiblingPath.substring(parentPath.length() + 1);

        if (!contains(parentPath)) {
View Full Code Here


    public Link getByUuid(String uuid, String language) throws SiteException {
        Assert.notNull("uuid", uuid);
        Assert.notNull("language", language);
        String key = getKey(uuid, language);
        if (!getUuidLanguage2Link().containsKey(key)) {
            throw new SiteException("No link for [" + key + "]");
        }
        return (Link) getUuidLanguage2Link().get(key);
    }
View Full Code Here

    }

    public SiteNode getNode(String path) throws SiteException {
        Assert.notNull("path", path);
        if (!getPath2Node().containsKey(path)) {
            throw new SiteException("No node for path [" + path + "]");
        }
        return (SiteNode) this.path2node.get(path);
    }
View Full Code Here

            String url = ServletHelper.getWebappURI(request);
            DocumentLocator loc;
            try {
                loc = pub.getDocumentBuilder().getLocator(pub.getFactory(), url);
            } catch (DocumentBuildException e) {
                throw new SiteException(e);
            }
            path = loc.getPath();
        } else {
            path = doc.getLocator().getPath();
        }
View Full Code Here

        DocumentStore store;
        RepositoryItemFactory factory = new DocumentStoreFactory(this.manager, getLogger());
        try {
            store = (DocumentStore) map.getSession().getRepositoryItem(factory, key);
        } catch (Exception e) {
            throw new SiteException(e);
        }

        return store;
    }
View Full Code Here

            if (resource.equals(store)) {
                return true;
            }
            return store.contains(resource);
        } catch (DocumentException e) {
            throw new SiteException(e);
        }
    }
View Full Code Here

                contains = contains || store.contains(doc);
            }

            return contains;
        } catch (Exception e) {
            throw new SiteException(e);
        }
    }
View Full Code Here

        try {
            if (!destinationStore.contains(destinationDocument)) {
                destinationStore.add(destinationDocument);
            }
        } catch (Exception e) {
            throw new SiteException(e);
        }
    }
View Full Code Here

            throws SiteException {
        DocumentStore store = getStore(identityMap, publication, area);
        try {
            return store.getDocuments();
        } catch (DocumentException e) {
            throw new SiteException(e);
        }
    }
View Full Code Here

    public void set(String path, Document document) throws SiteException {
        try {
            getStore(document).setPath(document, path);
        } catch (TransactionException e) {
            throw new SiteException(e);
        }
    }
View Full Code Here

TOP

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

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.