|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.priha.core.ItemImpl
public abstract class ItemImpl
Provides a basic implementation for Items. An Item stores a reference to its Path, the Session, and keeps a record of its ItemState. Therefore it's a fairly lightweight object.
Field Summary | |
---|---|
protected boolean |
m_isNew
|
protected PathRef |
m_path
|
protected SessionImpl |
m_session
|
Constructor Summary | |
---|---|
ItemImpl(SessionImpl session,
Path path)
Create an Item for a particular session and path. |
Method Summary | |
---|---|
void |
accept(ItemVisitor visitor)
|
void |
enterState(ItemState state)
Changes the ItemState of the Item, and places it in the appropriate
queues. |
Item |
getAncestor(int depth)
|
long |
getCreationTime()
Returns the creation time of this Item instance. |
int |
getDepth()
|
Path |
getInternalPath()
Get the internal path representation for this Item. |
java.lang.String |
getName()
|
NodeImpl |
getParent()
|
java.lang.String |
getPath()
|
PathRef |
getPathReference()
Returns the path reference object. |
QName |
getQName()
Returns the QName of this item. |
SessionImpl |
getSession()
|
ItemState |
getState()
Return the current state of this Item. |
int |
hashCode()
|
boolean |
isModified()
|
boolean |
isNew()
|
boolean |
isNode()
|
boolean |
isSame(Item otherItem)
|
protected void |
postSave()
Performs mandatory housekeeping after item state has been persisted to disk. |
protected void |
preSave()
Performs mandatory housekeeping right before saving. |
void |
refresh(boolean keepChanges)
|
abstract void |
remove()
|
abstract void |
save()
|
java.lang.String |
toString()
Returns a human-readable description of the Item. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected PathRef m_path
protected final SessionImpl m_session
protected boolean m_isNew
Constructor Detail |
---|
public ItemImpl(SessionImpl session, Path path)
session
- Session which owns this Itempath
- Path at which the Item is created.Method Detail |
---|
public PathRef getPathReference()
public ItemState getState()
ItemState
representing the state.public void enterState(ItemState state) throws RepositoryException
ItemState
of the Item, and places it in the appropriate
queues.
state
- New state.
RepositoryException
- If the state cannot be entered for some reason.public void accept(ItemVisitor visitor) throws RepositoryException
RepositoryException
public Item getAncestor(int depth) throws ItemNotFoundException, AccessDeniedException, RepositoryException
ItemNotFoundException
AccessDeniedException
RepositoryException
public int getDepth() throws RepositoryException
RepositoryException
public java.lang.String getName() throws RepositoryException
RepositoryException
public QName getQName() throws NamespaceException, RepositoryException
NamespaceException
- If the namespace cannot be parsed.
RepositoryException
- If something else goes wrong.public NodeImpl getParent() throws ItemNotFoundException, AccessDeniedException, RepositoryException
ItemNotFoundException
AccessDeniedException
RepositoryException
public Path getInternalPath()
public java.lang.String getPath() throws RepositoryException
RepositoryException
public SessionImpl getSession() throws RepositoryException
RepositoryException
public boolean isModified()
public boolean isNew()
public boolean isNode()
public boolean isSame(Item otherItem) throws RepositoryException
RepositoryException
public void refresh(boolean keepChanges) throws InvalidItemStateException, RepositoryException
InvalidItemStateException
RepositoryException
public abstract void remove() throws VersionException, LockException, ConstraintViolationException, RepositoryException
VersionException
LockException
ConstraintViolationException
RepositoryException
public abstract void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException
AccessDeniedException
ItemExistsException
ConstraintViolationException
InvalidItemStateException
ReferentialIntegrityException
VersionException
LockException
NoSuchNodeTypeException
RepositoryException
public java.lang.String toString()
toString
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
protected void preSave() throws RepositoryException
RepositoryException
- If something goes wrongprotected void postSave()
public long getCreationTime()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |