Package org.apache.lenya.cms.publication

Examples of org.apache.lenya.cms.publication.SiteTree.save()


        //if node is visible change to fale and vice versa
        String visibility = "false";
        if (!node.visibleInNav()) visibility = "true";
        node.setNodeAttribute(SiteTreeNodeImpl.VISIBLEINNAV_ATTRIBUTE_NAME, visibility);       

        tree.save();
    }

    /** (non-Javadoc)
     * @see org.apache.tools.ant.Task#execute()
     */
 
View Full Code Here


            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) {
            throw new SiteTreeException(
                "Cannot remove label " + label + " from tree " + area,
View Full Code Here

      Publication publication= getPublication();
      SiteTree tree = publication.getTree(getArea());
          
      SiteTreeNode node = tree.getNode("/");
            node.deleteChildren();      
      tree.save();
      } catch (
        Exception e) {
      throw new BuildException(e);
    }
  }
View Full Code Here

            node.removeLabel(node.getLabel(language));
            Label[] labels = node.getLabels();
            if (labels.length < 1 ){
                deleteNode(documentid,area);  
            } else {
                tree.save();
            }
        } catch (Exception e) {
            throw new SiteTreeException(e);
        }
    }  
View Full Code Here

    SiteTree tree = null;

      try {
      tree = getPublication().getTree(area);
      tree.deleteNode(documentid);
      tree.save();
    } catch (Exception e) {
      throw new SiteTreeException(e);
    }
    }  
    /** (non-Javadoc)
 
View Full Code Here

                    // doesn't have this language
                    throw new PublishingException("The node " + documentId
                            + " doesn't contain a label for language " + language);
                }
            }
            liveTree.save();
        } catch (PublishingException e) {
            throw e;
        } catch (Exception e) {
            throw new PublishingException("Couldn't publish to live tree :", e);
        }
View Full Code Here

                tree.moveDown(getDocumentId());
            } else {
                throw new BuildException(
                    "The direction in which the node should be moved isn't specified.");
            }
            tree.save();
        } catch (BuildException e) {
            throw e;
        } catch (Exception e) {
            throw new BuildException(e);
        }
View Full Code Here

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

        }
        if (firstArea.equals(secArea)) {
            firsttree.save();
        } else {
            firsttree.save();
            sectree.save();
        }
    }
}
View Full Code Here

    if (firstArea.equals(secArea)) {
      firsttree.save();
    } else {
      firsttree.save();
      sectree.save();
    }
  }
  /**
   * @return string The document-id corresponding to the reference node, before which
   * the moved node shoul be inserted. If null, the node is inserted at the end.
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.