Package org.apache.lenya.cms.site

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


                String area = this.site.getArea();
                String type = pub.getArea(area).getDocument(node.getUuid(),
                        pub.getDefaultLanguage()).getMimeType();
                this.attributes.addAttribute("", ATTR_TYPE, ATTR_TYPE, "CDATA", type);
            } catch (PublicationException e) {
                throw new SiteException(e);
            }
        }

    }
View Full Code Here


            }
        }
        if (node != null) {
            return node;
        }
        throw new SiteException("[" + this + "] does not contain the path [" + path + "]");
    }
View Full Code Here

                doc2path().put(key, path);
            }
            super.add(document);
            save();
        } catch (DocumentException e) {
            throw new SiteException(e);
        }

        return getNode(path).getLink(document.getLanguage());
    }
View Full Code Here

            throw new RuntimeException(e);
        }
    }

    public SiteNode add(String path) throws SiteException {
        throw new SiteException("This operation is not supported by [" + getClass().getName()
                + "]!");
    }
View Full Code Here

    }

    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

        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

        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

        try {
            DocumentStore store = getStore(resource);
            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

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.