Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.obinary.cms.core
Class ContentHandler  view ContentHandler download ContentHandler.java

java.lang.Object
  extended bycom.obinary.cms.core.ContentHandler
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
Content

public class ContentHandler
extends java.lang.Object
implements java.lang.Cloneable

User: sameercharles Date: Jun 12, 2003 Time: 08:01:17 AM

Version:
1.0

Field Summary
protected  Node node
           
static java.lang.String SORT_BY_DATE
           
static java.lang.String SORT_BY_NAME
           
static java.lang.String SORT_BY_SEQUENCE
           
private static java.lang.String TEMPLATE
           
private static java.lang.String TITLE
           
 
Constructor Summary
(package private) ContentHandler()
          package private constructor
 
Method Summary
 java.lang.Object clone()
          bit by bit copy of the current object
 Content getAncestor(int digree)
          get absolute parent object starting from the root node
 Content getAncestor0()
          Convenience method for taglib
 Content getAncestor1()
          Convenience method for taglib
 Content getAncestor2()
          Convenience method for taglib
 Content getAncestor3()
          Convenience method for taglib
 Content getAncestor4()
          Convenience method for taglib
 Content getAncestor5()
          Convenience method for taglib
 Content getAncestor6()
          Convenience method for taglib
 Content getAncestor7()
          Convenience method for taglib
 Content getAncestor8()
          Convenience method for taglib
 Content getAncestor9()
          Convenience method for taglib
 java.util.Collection getAncestors()
          Convenience method for taglib
 java.util.Collection getChildren()
          gets a Collection containing all child nodes at the current level+1 level
By default, this collectiohn is sorted by the creation date of the nodes
 java.util.Collection getChildren(int collectionType)
          get collection either sub pages or sub containers
use:
ChildrenCollector.SIMPLE_NODE to get sub containers
ChildrenCollector.HIERARCHY_NODE to get sub pages
 java.util.Collection getChildren(java.lang.String sortCriteria)
          gets a Collection containing all clild nodes at the current level+1 level
 java.lang.String getHandle()
          get a handle representing path relative to the content repository
 java.lang.String getHandleWithDefaultExtension()
          get a handle representing path relative to the content repository with the default extension
 int getLevel()
          get node level from the ROOT node : FIXME implement getDepth in javax.jcr
 Content getParent()
          get parent content object
 java.lang.String getTemplate()
           
 java.lang.String getTitle()
           
 boolean hasChildren()
           
 boolean isGranted(long permissions)
          checks for the allowed access rights
 boolean isHasChildren()
          Convenicence method to access from JSTL
 java.util.Collection sortByDate(java.util.Collection c)
          gets a Collection containing all clild nodes at the current level+1 level
 java.util.Collection sortBySequence(java.util.Collection c)
          gets a Collection containing all clild nodes at the current level+1 level
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TEMPLATE

private static final java.lang.String TEMPLATE
See Also:
Constant Field Values

TITLE

private static final java.lang.String TITLE
See Also:
Constant Field Values

SORT_BY_DATE

public static final java.lang.String SORT_BY_DATE
See Also:
Constant Field Values

SORT_BY_NAME

public static final java.lang.String SORT_BY_NAME
See Also:
Constant Field Values

SORT_BY_SEQUENCE

public static final java.lang.String SORT_BY_SEQUENCE
See Also:
Constant Field Values

node

protected Node node
Constructor Detail

ContentHandler

ContentHandler()
package private constructor

Method Detail

clone

public java.lang.Object clone()
                       throws java.lang.CloneNotSupportedException

bit by bit copy of the current object


getHandle

public java.lang.String getHandle()
                           throws ElementNotFoundException,
                                  RepositoryException

get a handle representing path relative to the content repository


getHandleWithDefaultExtension

public java.lang.String getHandleWithDefaultExtension()
                                               throws ElementNotFoundException,
                                                      RepositoryException

get a handle representing path relative to the content repository with the default extension


getParent

public Content getParent()
                  throws ElementNotFoundException,
                         RepositoryException

get parent content object


getChildren

public java.util.Collection getChildren()

gets a Collection containing all child nodes at the current level+1 level
By default, this collectiohn is sorted by the creation date of the nodes


getChildren

public java.util.Collection getChildren(java.lang.String sortCriteria)

gets a Collection containing all clild nodes at the current level+1 level


getChildren

public java.util.Collection getChildren(int collectionType)

get collection either sub pages or sub containers
use:
ChildrenCollector.SIMPLE_NODE to get sub containers
ChildrenCollector.HIERARCHY_NODE to get sub pages


getAncestor

public Content getAncestor(int digree)
                    throws ElementNotFoundException,
                           RepositoryException

get absolute parent object starting from the root node


getAncestors

public java.util.Collection getAncestors()
                                  throws ElementNotFoundException,
                                         RepositoryException

Convenience method for taglib


getAncestor0

public Content getAncestor0()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor1

public Content getAncestor1()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor2

public Content getAncestor2()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor3

public Content getAncestor3()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor4

public Content getAncestor4()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor5

public Content getAncestor5()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor6

public Content getAncestor6()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor7

public Content getAncestor7()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor8

public Content getAncestor8()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getAncestor9

public Content getAncestor9()
                     throws ElementNotFoundException,
                            RepositoryException

Convenience method for taglib


getLevel

public int getLevel()
             throws ElementNotFoundException,
                    RepositoryException

get node level from the ROOT node : FIXME implement getDepth in javax.jcr


hasChildren

public boolean hasChildren()

isHasChildren

public boolean isHasChildren()
Convenicence method to access from JSTL


getTemplate

public java.lang.String getTemplate()

getTitle

public java.lang.String getTitle()

sortByDate

public java.util.Collection sortByDate(java.util.Collection c)

gets a Collection containing all clild nodes at the current level+1 level


sortBySequence

public java.util.Collection sortBySequence(java.util.Collection c)

gets a Collection containing all clild nodes at the current level+1 level


isGranted

public boolean isGranted(long permissions)

checks for the allowed access rights