public interface Store extends IDProvider, StoreElementFolder
Modifier and Type | Interface and Description |
---|---|
static class |
Store.Type
The type of this store (e.g.
|
IDProvider.DependentReleaseType, IDProvider.RevertType, IDProvider.UidType
HistoryProvider.RevisionProvider
CHANGED, NEVER_RELEASED, RELEASED
ALL_REVISIONS, EVER_SINCE, UNTIL_NOW
Modifier and Type | Method and Description |
---|---|
void |
addStoreListener(StoreListener listener)
Adds a
StoreListener for client-local changes of this store. |
List<DeletedElementsInfo> |
getDeletedChildren()
Returns a list of deleted children described by the containing
ElementInfo objects. |
List<DeletedElementsInfo> |
getDeletedChildren(long startRevisionId,
int resultCount)
Returns a list of deleted children described by the containing
ElementInfo objects. |
List<DeletedElementsInfo> |
getDeletedChilds()
Deprecated.
since 5.0.100 - use
getDeletedChildren() instead |
List<DeletedElementsInfo> |
getDeletedChilds(long startRevisionId,
int resultCount)
Deprecated.
since 5.0.100 - use
getDeletedChildren(long, int) instead |
Revision |
getMaxRevision()
If the store is not based on current version: the revision on which the store is based.
|
Project |
getProject()
Returns the belonging project of this storeelement.
|
IDProvider |
getStoreElement(long id) |
IDProvider |
getStoreElement(Long id)
Get a child by it's node id.
|
IDProvider |
getStoreElement(String uid,
IDProvider.UidType uidType)
Get an element of this store by it's unique identifier and unique type or
null if no child exists with the given parameter. |
IDProvider |
getStoreElement(String attributeName,
String attributeValue)
Get a child of this store by the value of a attribute or
null if no child exists with the given parameter |
Store.Type |
getType() |
UserService |
getUserService() |
boolean |
isFolder()
A store is always a folder, so implementations must always return
true . |
boolean |
isReadOnly()
If the store is in read only mode, which means it is frozen to some point in time.
|
boolean |
isRelease()
Returns
true if this store is a release store, false for current
stores. |
void |
removeStoreListener(StoreListener listener)
Removes the given
listener . |
StoreElement |
restore(ElementInfo elementInfo,
IDProvider parent)
Restore the element defined by the given information.
|
contrastWith, getDisplayName, getId, getInRevision, getLanguageInfo, getLongID, getMeta, getMetaFormData, getParent, getReleasedBy, getReleaseRevision, getReleaseStatus, getRevision, getUid, getUidType, hasMeta, hasUid, isInReleaseStore, isReleased, isReleaseSupported, moveChild, moveChild, release, release, revert, setMeta, setMetaFormData, setUid
appendChild, appendChildBefore, delete, exportStoreElement, getChildCount, getChildIndex, getChildren, getChildren, getChildren, getChildren, getCreateWorkflowPermission, getDefinedPrincipalPermissions, getEditor, getElementType, getFirstChild, getIncomingReferences, getInheritedPrincipalPermissions, getLastChanged, getName, getNextSibling, getOutgoingReferences, getPermission, getPermission, getPermission, getReferenceName, getReferences, getStore, getTreePermission, getWorkflowPermission, getWorkflowPermissions, getWriteLock, hasIncomingReferences, hasPermissions, importStoreElement, importStoreElements, inheritWorkflowPermission, isDeleted, isExportSupported, isImportSupported, isLocked, isLockedOnServer, isLockSupported, isPermissionSupported, isWorkflowAllowed, isWorkflowSupported, refresh, removeAllWorkflowPermissions, removeChild, removePermission, removePermission, removePermission, removeWorkflowPermission, replaceChild, save, save, save, setInheritWorkflowPermission, setLock, setLock, setPermission, setPermission, setPermission, setWorkflowPermission, setWorkflowPermissions, setWriteLock, toXml, toXml, toXml, update
getColor, getTask, hasTask, removeTask, setColor, setTask
compareTo
asRevisionProvider, getHistory, getHistory
Store.Type getType()
void addStoreListener(StoreListener listener)
StoreListener
for client-local changes of this store.listener
- will be receive store changes.void removeStoreListener(StoreListener listener)
listener
.listener
- has received store changes.boolean isRelease()
true
if this store is a release store, false
for current
stores.@NotNull @Deprecated List<DeletedElementsInfo> getDeletedChilds()
getDeletedChildren()
instead@NotNull List<DeletedElementsInfo> getDeletedChildren()
ElementInfo
objects.ElementInfo
objects describing the deleted children of this storegetDeletedChildren(long, int)
@Deprecated @NotNull List<DeletedElementsInfo> getDeletedChilds(long startRevisionId, int resultCount)
getDeletedChildren(long, int)
instead@NotNull List<DeletedElementsInfo> getDeletedChildren(long startRevisionId, int resultCount)
ElementInfo
objects. The list will be sorted in descending order,
starting with the youngest deleted element nearest to given startRevisionId descending to older deleted elements.startRevisionId
- the revision id of the starting bound of the result list, use -1
to start with the latest revisionresultCount
- limits the size of the result list, use 0
to get unlimited result listElementInfo
objects describing the deleted children of this storerestore(ElementInfo, IDProvider)
StoreElement restore(ElementInfo elementInfo, @Nullable IDProvider parent) throws LockException
parent
is
defined, the element will be restored as child of that element, otherwise, it
will be restored based on information known about the element's original parent
chain.elementInfo
- The element's information.parent
- The parent to restore to or null
to restore beneath old parentStoreElement
LockException
boolean isFolder()
true
.isFolder
in interface StoreElement
true
@Nullable IDProvider getStoreElement(long id)
getStoreElement(Long)
@Nullable IDProvider getStoreElement(Long id)
id
- node idnull
when there is no such childNullPointerException
- if longId == null
@Nullable IDProvider getStoreElement(@NotNull String uid, @NotNull IDProvider.UidType uidType)
null
if no child exists with the given parameter.
Keep in mind, that some IDProvider
doesn't
support
uids (e.g. Section
).
See enum constant definitions of UidType
for node to uid type mapping.uid
- the unique identifier
of the searched childuidType
- the unique type
of the searched childunique identifier
and unique type
or null
IDProvider.hasUid()
,
IDProvider.getUidType()
,
IDProvider.UidType
@Nullable IDProvider getStoreElement(@NotNull String attributeName, @NotNull String attributeValue)
null
if no child exists with the given parameterattributeName
- attribute nameattributeValue
- attribute valueunique identifier
and unique type
or null
Project getProject()
StoreElement
getProject
in interface StoreElement
UserService getUserService()
boolean isReadOnly()
StoreElement.save()
call in read only mode will throw an IllegalStateException.getMaxRevision()
!= null
getMaxRevision()
Revision getMaxRevision()
isReadOnly()
Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500