|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.jackrabbit.jcr2spi.state.Status
public final class Status
Status...
| Field Summary | |
|---|---|
static int |
_UNDEFINED_
|
static int |
EXISTING
'existing', i.e. |
static int |
EXISTING_MODIFIED
'existing', i.e. |
static int |
EXISTING_REMOVED
'existing', i.e. |
static int |
INVALIDATED
A state once read from persistent storage has been set to invalid. |
static int |
MODIFIED
Temporary status used to mark a state, this is permanently modified either by saving transient changes, by workspace operations or by external modification. |
static int |
NEW
'new' state |
static int |
REMOVED
a new state was removed and is now 'removed' or an existing item has been removed by a workspace operation or by an external modification. |
static int |
STALE_DESTROYED
'existing', i.e. |
static int |
STALE_MODIFIED
'existing', i.e. |
| Constructor Summary | |
|---|---|
Status()
|
|
| Method Summary | |
|---|---|
static java.lang.String |
getName(int status)
|
static int |
getNewStatus(int oldStatus,
int newStatusHint)
Returns the given newStatusHint unless the new status
collides with a pending modification or removal which results in a
stale item state. |
static boolean |
isStale(int status)
Returns true if status is one of:
STALE_DESTROYED
STALE_MODIFIED
|
static boolean |
isTerminal(int status)
Returns true if the given status is a terminal status, i.e. |
static boolean |
isTransient(int status)
Returns true if status is one of:
EXISTING_MODIFIED
EXISTING_REMOVED
NEW
|
static boolean |
isValid(int status)
Returns true if this item state is valid, that is its status
is one of:
EXISTING
EXISTING_MODIFIED
NEW
|
static boolean |
isValidStatusChange(int oldStatus,
int newStatus)
Returns true, if the status of an item state can be changed from oldStatus to newStatus, and false if the
change is illegal or if any of the given status flags is illegal. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int _UNDEFINED_
public static final int INVALIDATED
public static final int EXISTING
public static final int EXISTING_MODIFIED
public static final int EXISTING_REMOVED
public static final int NEW
public static final int STALE_MODIFIED
public static final int STALE_DESTROYED
public static final int MODIFIED
public static final int REMOVED
| Constructor Detail |
|---|
public Status()
| Method Detail |
|---|
public static boolean isTerminal(int status)
true if the given status is a terminal status, i.e.
the given status one of:
status -
public static boolean isValid(int status)
true if this item state is valid, that is its status
is one of:
status -
public static boolean isStale(int status)
true if status is one of:
status - the status to check.
true if status indicates that an item
state is stale.public static boolean isTransient(int status)
true if status is one of:
status - the status to check.
true if status indicates that an item
state is transiently modified.
public static boolean isValidStatusChange(int oldStatus,
int newStatus)
oldStatus to newStatus, and false if the
change is illegal or if any of the given status flags is illegal.
oldStatus - newStatus -
oldStatus to
newStatus is allowed or if the two status are the same.
public static int getNewStatus(int oldStatus,
int newStatusHint)
newStatusHint unless the new status
collides with a pending modification or removal which results in a
stale item state.
oldStatus - newStatusHint -
public static java.lang.String getName(int status)
status - A valid status constant.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||