Examples of NoChildDocumentExistException


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

            DocumentBuilder builder = publication.getDocumentBuilder();
            String url = builder.buildCanonicalUrl(publication, area, childId, language);
            Document childDocument = builder.buildDocument(publication, url);

            if (!childDocument.existsInAnyLanguage()) {
                throw new NoChildDocumentExistException("The document " + childId + " does not exist. Check sitetree, it might need to be reloaded.");
            }
            List availableLanguages = Arrays.asList(childDocument.getLanguages());

            if (availableLanguages.contains(language)) {
                return Collections.unmodifiableMap(Collections.EMPTY_MAP);
            }
        } else {
            throw new NoChildDocumentExistException("This document has no children. Check sitetree, it might need to be reloaded.");
        }
        return null;
    }
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.