|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.jackrabbit.core.ItemImpl
public abstract class ItemImpl
ItemImpl
implements the Item
interface.
Field Summary | |
---|---|
protected ItemData |
data
Item data associated with this item. |
protected ItemId |
id
|
protected ItemManager |
itemMgr
ItemManager that created this Item |
protected RepositoryImpl |
rep
the Repository object |
protected SessionImpl |
session
Session through which this Item was acquired |
protected SessionItemStateManager |
stateMgr
SessionItemStateManager associated with this Item |
protected static int |
STATUS_DESTROYED
|
protected static int |
STATUS_INVALIDATED
|
protected static int |
STATUS_MODIFIED
|
protected static int |
STATUS_NORMAL
|
Method Summary | |
---|---|
abstract void |
accept(ItemVisitor visitor)
|
Item |
getAncestor(int degree)
|
int |
getDepth()
|
ItemId |
getId()
Return the id of this Item . |
abstract String |
getName()
|
protected abstract ItemState |
getOrCreateTransientItemState()
|
abstract Node |
getParent()
|
String |
getPath()
|
Path |
getPrimaryPath()
Returns the primary path to this Item . |
abstract Name |
getQName()
Same as except that
this method returns a Name instead of a
String . |
Session |
getSession()
Returns the session associated with this item. |
protected void |
internalRemove(boolean noChecks)
Same as except for the
noChecks parameter. |
boolean |
isModified()
|
boolean |
isNew()
|
abstract boolean |
isNode()
|
boolean |
isSame(Item otherItem)
|
protected boolean |
isTransactionalNew()
checks if this item is new. running outside of transactions, this is the same as isNew() but within a transaction an item can
be saved but not yet persisted. |
protected boolean |
isTransient()
|
protected abstract void |
makePersistent()
|
void |
refresh(boolean keepChanges)
|
void |
remove()
|
String |
safeGetJCRPath()
Failsafe mapping of internal id to JCR path for use in
diagnostic output, error messages etc. |
protected void |
sanityCheck()
Performs a sanity check on this item and the associated session. |
void |
save()
|
protected void |
setRemoved()
Marks this instance as 'removed' and notifies its listeners. |
String |
toString()
Returns the( safe ) path of this item for use
in diagnostic output. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected static final int STATUS_NORMAL
protected static final int STATUS_MODIFIED
protected static final int STATUS_DESTROYED
protected static final int STATUS_INVALIDATED
protected final ItemId id
protected final SessionImpl session
Session
through which this Item
was acquired
protected final RepositoryImpl rep
Repository
object
protected final ItemData data
protected final ItemManager itemMgr
ItemManager
that created this Item
protected final SessionItemStateManager stateMgr
SessionItemStateManager
associated with this Item
Method Detail |
---|
protected void sanityCheck() throws RepositoryException
RepositoryException
- if this item has been rendered invalid for some reasonprotected boolean isTransient()
protected abstract ItemState getOrCreateTransientItemState() throws RepositoryException
RepositoryException
protected abstract void makePersistent() throws InvalidItemStateException
InvalidItemStateException
protected void setRemoved() throws RepositoryException
RepositoryException
- if an error occurspublic ItemId getId()
Item
.
Item
public Path getPrimaryPath() throws RepositoryException
Item
.
Item
RepositoryException
public String safeGetJCRPath()
id
to JCR path for use in
diagnostic output, error messages etc.
protected void internalRemove(boolean noChecks) throws VersionException, LockException, ConstraintViolationException, RepositoryException
Item.remove()
except for the
noChecks
parameter.
noChecks
-
VersionException
LockException
RepositoryException
ConstraintViolationException
public abstract Name getQName() throws RepositoryException
Item.getName()
except that
this method returns a Name
instead of a
String
.
Name
RepositoryException
- if an error occurs.public abstract void accept(ItemVisitor visitor) throws RepositoryException
accept
in interface Item
RepositoryException
public abstract boolean isNode()
isNode
in interface Item
public abstract String getName() throws RepositoryException
getName
in interface Item
RepositoryException
public abstract Node getParent() throws ItemNotFoundException, AccessDeniedException, RepositoryException
getParent
in interface Item
ItemNotFoundException
AccessDeniedException
RepositoryException
public boolean isNew()
isNew
in interface Item
protected boolean isTransactionalNew()
isNew()
but within a transaction an item can
be saved but not yet persisted.
public boolean isModified()
isModified
in interface Item
public void remove() throws VersionException, LockException, ConstraintViolationException, RepositoryException
remove
in interface Item
VersionException
LockException
ConstraintViolationException
RepositoryException
public void save() throws AccessDeniedException, ItemExistsException, ConstraintViolationException, InvalidItemStateException, ReferentialIntegrityException, VersionException, LockException, NoSuchNodeTypeException, RepositoryException
save
in interface Item
AccessDeniedException
ItemExistsException
ConstraintViolationException
InvalidItemStateException
ReferentialIntegrityException
VersionException
LockException
NoSuchNodeTypeException
RepositoryException
public void refresh(boolean keepChanges) throws InvalidItemStateException, RepositoryException
refresh
in interface Item
InvalidItemStateException
RepositoryException
public Item getAncestor(int degree) throws ItemNotFoundException, AccessDeniedException, RepositoryException
getAncestor
in interface Item
ItemNotFoundException
AccessDeniedException
RepositoryException
public String getPath() throws RepositoryException
getPath
in interface Item
RepositoryException
public int getDepth() throws RepositoryException
getDepth
in interface Item
RepositoryException
public Session getSession()
Since Jackrabbit 1.4 it is safe to use this method regardless of item state.
getSession
in interface Item
public boolean isSame(Item otherItem) throws RepositoryException
isSame
in interface Item
RepositoryException
public String toString()
safe
) path of this item for use
in diagnostic output.
toString
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |