Package org.apache.lenya.cms.publishing

Examples of org.apache.lenya.cms.publishing.ParentNodeNotFoundException


                // no language was specified. Simply publish the
                // node including all languages.
                try {
                    liveTree.addNode(authoringNode, siblingDocId);
                } catch (SiteTreeException e1) {
                    throw new ParentNodeNotFoundException("Couldn't add document: " + documentId
                            + " to live tree.", e1);
                }
            } else {
                // a language was specified. Let's see if this
                // node even has an entry for the specified
                // language.
                Label label = authoringNode.getLabel(language);
                if (label != null) {
                    // check if this node has already been
                    // published
                    SiteTreeNode liveNode = liveTree.getNode(documentId);
                    if (liveNode != null) {
                        // if the node already exists in the live
                        // tree simply insert the label in the
                        // live tree
                        liveTree.setLabel(documentId, label);
                    } else {
                        // if the node doesn't exist, add it and
                        // add the specified label to it.
                        Label[] labels = { label };
                        try {
                            liveTree.addNode(documentId, labels, authoringNode.visibleInNav(),
                                authoringNode.getHref(),authoringNode.getSuffix(),
                  authoringNode.hasLink(),siblingDocId);
                        } catch (SiteTreeException e1) {
                            throw new ParentNodeNotFoundException("Couldn't add document: "
                                    + documentId + " to live tree.", e1);
                        }
                    }
                } else {
                    // the node that we're trying to publish
View Full Code Here


                // no language was specified. Simply publish the
                // node including all languages.
                try {
                    liveTree.addNode(authoringNode, siblingDocId);
                } catch (SiteTreeException e1) {
                    throw new ParentNodeNotFoundException("Couldn't add document: " + documentId
                            + " to live tree.", e1);
                }
            } else {
                // a language was specified. Let's see if this
                // node even has an entry for the specified
                // language.
                Label label = authoringNode.getLabel(language);
                if (label != null) {
                    // check if this node has already been
                    // published
                    SiteTreeNode liveNode = liveTree.getNode(documentId);
                    if (liveNode != null) {
                        // if the node already exists in the live
                        // tree simply insert the label in the
                        // live tree
                        liveTree.setLabel(documentId, label);
                    } else {
                        // if the node doesn't exist, add it and
                        // add the specified label to it.
                        Label[] labels = { label };
                        try {
                            liveTree.addNode(documentId, labels, authoringNode.visibleInNav(),
                                authoringNode.getHref(),authoringNode.getSuffix(),
                  authoringNode.hasLink(),siblingDocId);
                        } catch (SiteTreeException e1) {
                            throw new ParentNodeNotFoundException("Couldn't add document: "
                                    + documentId + " to live tree.", e1);
                        }
                    }
                } else {
                    // the node that we're trying to publish
View Full Code Here

                    // no language was specified. Simply publish the
                    // node including all languages.
                    try {
                        liveTree.addNode(authoringNode,siblingDocId);
                    } catch (SiteTreeException e1) {
                        throw new ParentNodeNotFoundException(
                            "Couldn't add document: "
                                + documentId
                                + " to live tree.",
                            e1);
                    }
                } else {
                    // a language was specified. Let's see if this
                    // node even has an entry for the specified
                    // language.
                    Label label = authoringNode.getLabel(language);
                    if (label != null) {
                        // check if this node has already been
                        // published
                        SiteTreeNode liveNode = liveTree.getNode(documentId);
                        if (liveNode != null) {
                            // if the node already exists in the live
                            // tree simply insert the label in the
                            // live tree
                            liveTree.setLabel(documentId, label);
                        } else {
                            // if the node doesn't exist, add it and
                            // add the specified label to it.
                            Label[] labels = { label };
                            try {
                                liveTree.addNode(
                                    documentId,
                                    labels,
                                    authoringNode.getHref(),
                                    authoringNode.getSuffix(),
                                    authoringNode.hasLink(),
                    siblingDocId);
                            } catch (SiteTreeException e1) {
                                throw new ParentNodeNotFoundException(
                                    "Couldn't add document: "
                                        + documentId
                                        + " to live tree.",
                                    e1);
                            }
View Full Code Here

                // no language was specified. Simply publish the
                // node including all languages.
                try {
                    liveTree.addNode(authoringNode, siblingDocId);
                } catch (SiteTreeException e1) {
                    throw new ParentNodeNotFoundException("Couldn't add document: " + documentId
                            + " to live tree.", e1);
                }
            } else {
                // a language was specified. Let's see if this
                // node even has an entry for the specified
                // language.
                Label label = authoringNode.getLabel(language);
                if (label != null) {
                    // check if this node has already been
                    // published
                    SiteTreeNode liveNode = liveTree.getNode(documentId);
                    if (liveNode != null) {
                        // if the node already exists in the live
                        // tree simply insert the label in the
                        // live tree
                        liveTree.setLabel(documentId, label);
                    } else {
                        // if the node doesn't exist, add it and
                        // add the specified label to it.
                        Label[] labels = { label };
                        try {
                            liveTree.addNode(documentId, labels, authoringNode.visibleInNav(),
                                authoringNode.getHref(),authoringNode.getSuffix(),
                  authoringNode.hasLink(),siblingDocId);
                        } catch (SiteTreeException e1) {
                            throw new ParentNodeNotFoundException("Couldn't add document: "
                                    + documentId + " to live tree.", e1);
                        }
                    }
                } else {
                    // the node that we're trying to publish
View Full Code Here

                    // no language was specified. Simply publish the
                    // node including all languages.
                    try {
                        liveTree.addNode(authoringNode,siblingDocId);
                    } catch (SiteTreeException e1) {
                        throw new ParentNodeNotFoundException(
                            "Couldn't add document: "
                                + documentId
                                + " to live tree.",
                            e1);
                    }
                } else {
                    // a language was specified. Let's see if this
                    // node even has an entry for the specified
                    // language.
                    Label label = authoringNode.getLabel(language);
                    if (label != null) {
                        // check if this node has already been
                        // published
                        SiteTreeNode liveNode = liveTree.getNode(documentId);
                        if (liveNode != null) {
                            // if the node already exists in the live
                            // tree simply insert the label in the
                            // live tree
                            liveTree.setLabel(documentId, label);
                        } else {
                            // if the node doesn't exist, add it and
                            // add the specified label to it.
                            Label[] labels = { label };
                            try {
                                liveTree.addNode(
                                    documentId,
                                    labels,
                                    authoringNode.getHref(),
                                    authoringNode.getSuffix(),
                                    authoringNode.hasLink(),
                    siblingDocId);
                            } catch (SiteTreeException e1) {
                                throw new ParentNodeNotFoundException(
                                    "Couldn't add document: "
                                        + documentId
                                        + " to live tree.",
                                    e1);
                            }
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.publishing.ParentNodeNotFoundException

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.