Examples of SiteException


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

    }

    public Link getLink(String language) throws SiteException {
        Assert.notNull("language", language);
        if (!this.language2link.containsKey(language)) {
            throw new SiteException("No link contained for language [" + language + "]");
        }
        return (Link) this.language2link.get(language);
    }
View Full Code Here

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

        return this.name;
    }

    public SiteNode getParent() throws SiteException {
        if (isTopLevel()) {
            throw new SiteException("This is a top level node.");
        }
        return (SiteNode) this.parent;
    }
View Full Code Here

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

        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

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

        try {
            DocumentStore store = getStore(resource);
            return store.contains(resource);
        } catch (DocumentException e) {
            throw new SiteException(e);
        }
    }
View Full Code Here

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

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

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

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

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

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

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

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

    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

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

    }

    public Link add(String path, Document doc) throws SiteException {

        if (containsByUuid(doc.getUUID(), doc.getLanguage())) {
            throw new SiteException("The document [" + doc + "] is already contained!");
        }

        TreeNodeImpl node;
        if (contains(path)) {
            node = getTreeNode(path);
            if (node.getUuid() == null) {
                node.setUuid(doc.getUUID());
            } else if (!node.getUuid().equals(doc.getUUID())) {
                throw new SiteException("The node already has a different UUID!");
            }
        } else {
            node = (TreeNodeImpl) add(path);
            node.setUuid(doc.getUUID());
        }
View Full Code Here

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
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.