org.apache.jackrabbit.base
Class BaseItem

java.lang.Object
  extended byorg.apache.jackrabbit.base.BaseItem
All Implemented Interfaces:
Item
Direct Known Subclasses:
BaseNode, BaseProperty

public class BaseItem
extends Object
implements Item

Item base class.


Constructor Summary
protected BaseItem()
          Protected constructor.
 
Method Summary
 void accept(ItemVisitor visitor)
          Does nothing.
 Item getAncestor(int depth)
          Implemented by calling getDepth() and returning either this item, getSession().getRootNode(), or getParent().getAncestor(), or throwing an ItemNotFoundException depending on the given depth.
 int getDepth()
          Implemented by calling getParent().getDepth() + 1 and returning 0 if an ItemNotFoundException is thrown by getParent() (indicating that this is the root node).
 String getName()
          Not implemented.
 Node getParent()
          Not implemented.
 String getPath()
          Implemented by calling getParent().getPath() and appending getName() to the returned parent path.
 Session getSession()
          Not implemented.
 boolean isModified()
          Not implemented.
 boolean isNew()
          Not implemented.
 boolean isNode()
          Always returns false.
 boolean isSame(Item otherItem)
          Not implemented.
 void refresh(boolean keepChanges)
          Not implemented.
 void remove()
          Not implemented.
 void save()
          Not implemented.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseItem

protected BaseItem()
Protected constructor. This class is only useful when extended.

Method Detail

getPath

public String getPath()
               throws RepositoryException
Implemented by calling getParent().getPath() and appending getName() to the returned parent path. Returns the root path / if an ItemNotFoundException is thrown by getParent() (indicating that this is the root node).

Specified by:
getPath in interface Item
Throws:
RepositoryException

getName

public String getName()
               throws RepositoryException
Not implemented.

Specified by:
getName in interface Item
Throws:
RepositoryException

getAncestor

public Item getAncestor(int depth)
                 throws ItemNotFoundException,
                        AccessDeniedException,
                        RepositoryException
Implemented by calling getDepth() and returning either this item, getSession().getRootNode(), or getParent().getAncestor(), or throwing an ItemNotFoundException depending on the given depth.

Specified by:
getAncestor in interface Item
Throws:
ItemNotFoundException
AccessDeniedException
RepositoryException

getParent

public Node getParent()
               throws ItemNotFoundException,
                      AccessDeniedException,
                      RepositoryException
Not implemented.

Specified by:
getParent in interface Item
Throws:
ItemNotFoundException
AccessDeniedException
RepositoryException

getDepth

public int getDepth()
             throws RepositoryException
Implemented by calling getParent().getDepth() + 1 and returning 0 if an ItemNotFoundException is thrown by getParent() (indicating that this is the root node).

Specified by:
getDepth in interface Item
Throws:
RepositoryException

getSession

public Session getSession()
                   throws RepositoryException
Not implemented.

Specified by:
getSession in interface Item
Throws:
RepositoryException

isNode

public boolean isNode()
Always returns false.

Specified by:
isNode in interface Item

isNew

public boolean isNew()
Not implemented.

Specified by:
isNew in interface Item

isModified

public boolean isModified()
Not implemented.

Specified by:
isModified in interface Item

isSame

public boolean isSame(Item otherItem)
Not implemented.

Specified by:
isSame in interface Item

accept

public void accept(ItemVisitor visitor)
            throws RepositoryException
Does nothing.

Specified by:
accept in interface Item
Throws:
RepositoryException

save

public void save()
          throws AccessDeniedException,
                 ConstraintViolationException,
                 InvalidItemStateException,
                 ReferentialIntegrityException,
                 VersionException,
                 LockException,
                 RepositoryException
Not implemented.

Specified by:
save in interface Item
Throws:
AccessDeniedException
ConstraintViolationException
InvalidItemStateException
ReferentialIntegrityException
VersionException
LockException
RepositoryException

refresh

public void refresh(boolean keepChanges)
             throws InvalidItemStateException,
                    RepositoryException
Not implemented.

Specified by:
refresh in interface Item
Throws:
InvalidItemStateException
RepositoryException

remove

public void remove()
            throws VersionException,
                   LockException,
                   RepositoryException
Not implemented.

Specified by:
remove in interface Item
Throws:
VersionException
LockException
RepositoryException


Copyright © 2004-2005 . All Rights Reserved.