Package org.apache.lenya.cms.publication

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


        } catch (Exception e) {
            throw new CreatorException(e);
        }

        Label[] labels = new Label[1];
        labels[0] = new Label(childName, language);

        try {
            siteTree.addNode(
                parentId,
                creator.generateTreeId(childId, childType),
View Full Code Here


        creator.init(doctypeConf);

        // add a node to the tree
        DefaultSiteTree siteTree = publication.getSiteTree(Publication.AUTHORING_AREA);
        Label[] labels = new Label[1];
        labels[0] = new Label(childname, language);
        siteTree.addNode(parentid, creator.generateTreeId(childid, childType), labels);

        // Transaction should actually be finished here!
        // Create actual document
        // grab all the parameters from session, request params and
View Full Code Here

                    }
                } 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) {
View Full Code Here

        String language,
        String area)
        throws SiteTreeException {

        DefaultSiteTree tree = null;
        Label label = null;
        try {
            tree = getPublication().getSiteTree(area);
            label = new Label(labelName, language);
            tree.addLabel(documentid, label);
            tree.save();
        } catch (Exception e) {
            throw new SiteTreeException(
                "Cannot insert label "
View Full Code Here

        String language,
        String area)
        throws SiteTreeException {

        DefaultSiteTree tree = null;
        Label label = null;
        try {
            tree = getPublication().getSiteTree(area);
            SiteTreeNode node = tree.getNode(documentid);
            // if there is only one label left do not delete it.
            if (node.getLabels().length > 1) {
                // if there are more than one labels in this node
                // try to delete the label specified by the labelName.
                label = new Label(labelName, language);
                tree.removeLabel(documentid, label);
                tree.save();
            }

        } catch (Exception e) {
View Full Code Here

TOP

Related Classes of org.apache.lenya.cms.publication.Label

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.