Interface Store
- All Superinterfaces:
Comparable<StoreElement>
,HistoryProvider
,IDProvider
,StoreElement
,StoreElementFolder
,Workflowable
- All Known Subinterfaces:
ContentStoreRoot
,GlobalStoreRoot
,MediaStoreRoot
,PageStoreRoot
,SiteStoreRoot
,TemplateStoreRoot
These are the valid store types:
- Since:
- 2.3
-
Nested Class Summary
Nested classes/interfaces inherited from interface de.espirit.firstspirit.storage.HistoryProvider
HistoryProvider.RevisionProvider
Nested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.IDProvider
IDProvider.DependentReleaseType, IDProvider.RevertType, IDProvider.UidType
-
Field Summary
Fields inherited from interface de.espirit.firstspirit.storage.HistoryProvider
ALL_REVISIONS, EVER_SINCE, UNTIL_NOW
Fields inherited from interface de.espirit.firstspirit.access.store.IDProvider
CHANGED, NEVER_RELEASED, RELEASED
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addStoreListener
(StoreListener listener) Adds aStoreListener
for client-local changes of this store.@NotNull List<DeletedElementsInfo>
Returns a list of deleted children described by the containingElementInfo
objects.@NotNull List<DeletedElementsInfo>
getDeletedChildren
(long startRevisionId, int resultCount) Returns a list of deleted children described by the containingElementInfo
objects.@NotNull List<DeletedElementsInfo>
Deprecated.@NotNull List<DeletedElementsInfo>
getDeletedChilds
(long startRevisionId, int resultCount) Deprecated.since 5.0.100 - usegetDeletedChildren(long, int)
insteadList<? extends IDProvider>
getElements
(Collection<Long> ids) Get a list ofIDProvider
identified by given ids.
Attention: List could containnull
entries for ids no element could be found for (e.g. deleted).If the store is not based on current version: the revision on which the store is based.Returns the belonging project of this storeelement.@Nullable IDProvider
getStoreElement
(long id) @Nullable IDProvider
getStoreElement
(@NotNull String uid, @NotNull IDProvider.UidType uidType) Get an element of this store by it's unique identifier and unique type ornull
if no child exists with the given parameter.
Keep in mind, that someIDProvider
doesn'tsupport
uids (e.g.@Nullable IDProvider
getStoreElement
(@NotNull String attributeName, @NotNull String attributeValue) Get a child of this store by the value of a attribute ornull
if no child exists with the given parameter@Nullable IDProvider
getStoreElement
(Long id) Get a child by it's node id.getType()
boolean
isFolder()
A store is always a folder, so implementations must always returntrue
.boolean
If the store is in read only mode, which means it is frozen to some point in time.
AnyStoreElement.save()
call in read only mode will throw an IllegalStateException.
Synonym forgetMaxRevision()
!boolean
Returnstrue
if this store is a release store,false
for current stores.void
removeStoreListener
(StoreListener listener) Removes the givenlistener
.restore
(ElementInfo elementInfo, @Nullable IDProvider parent) Restore the element defined by the given information.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface de.espirit.firstspirit.storage.HistoryProvider
asRevisionProvider, getHistory, getHistory
Methods inherited from interface de.espirit.firstspirit.access.store.IDProvider
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, setDisplayName, setMeta, setMetaFormData, setUid
Methods inherited from interface de.espirit.firstspirit.access.store.StoreElement
appendChild, appendChildBefore, delete, exportStoreElement, getChildCount, getChildIndex, getChildren, getChildren, getChildren, getChildren, getCreateWorkflowPermission, getDefinedPrincipalPermissions, getEditor, getElementType, getFirstChild, getIncomingReferences, getInheritedPrincipalPermissions, getLastChanged, getName, getNextSibling, getOutgoingReferences, getPermission, getPermission, getPermission, getPreviousSibling, 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
Methods inherited from interface de.espirit.firstspirit.access.Workflowable
getColor, getTask, hasTask, removeTask, setColor, setTask
-
Method Details
-
getType
Store.Type getType()- Since:
- 4.0.17
-
addStoreListener
Adds aStoreListener
for client-local changes of this store.- Parameters:
listener
- will be receive store changes.- Since:
- 3.0
-
removeStoreListener
Removes the givenlistener
.- Parameters:
listener
- has received store changes.- Since:
- 2.3
-
isRelease
boolean isRelease()Returnstrue
if this store is a release store,false
for current stores.- Since:
- 2.3.10
-
getDeletedChilds
Deprecated.since 5.0.100 - usegetDeletedChildren()
instead- Since:
- 4.0.17
-
getDeletedChildren
Returns a list of deleted children described by the containingElementInfo
objects.- Returns:
- list of
ElementInfo
objects describing the deleted children of this store - Since:
- 5.0.100
- See Also:
-
getDeletedChilds
@Deprecated @NotNull @NotNull List<DeletedElementsInfo> getDeletedChilds(long startRevisionId, int resultCount) Deprecated.since 5.0.100 - usegetDeletedChildren(long, int)
instead- Since:
- 4.0.17
-
getDeletedChildren
@NotNull @NotNull List<DeletedElementsInfo> getDeletedChildren(long startRevisionId, int resultCount) Returns a list of deleted children described by the containingElementInfo
objects. The list will be sorted in descending order, starting with the youngest deleted element nearest to given startRevisionId descending to older deleted elements.- Parameters:
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, use0
to get unlimited result list- Returns:
- list of
ElementInfo
objects describing the deleted children of this store - Since:
- 5.0.100
- See Also:
-
restore
StoreElement restore(ElementInfo elementInfo, @Nullable @Nullable IDProvider parent) throws LockException Restore the element defined by the given information. Ifparent
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.- Parameters:
elementInfo
- The element's information.parent
- The parent to restore to ornull
to restore beneath old parent- Returns:
- The restored
StoreElement
- Throws:
LockException
- Since:
- 4.0
-
isFolder
boolean isFolder()A store is always a folder, so implementations must always returntrue
.- Specified by:
isFolder
in interfaceStoreElement
- Returns:
true
- Since:
- 2.3.49
-
getStoreElement
- Since:
- 3.1.158
- See Also:
-
getStoreElement
Get a child by it's node id.- Parameters:
id
- node id- Returns:
- the child with the specified node id or
null
when there is no such child - Throws:
NullPointerException
- iflongId == null
- Since:
- 3.1.158
-
getElements
Get a list ofIDProvider
identified by given ids.
Attention: List could containnull
entries for ids no element could be found for (e.g. deleted).- Since:
- 5.0.602, 5.1.207
-
getStoreElement
@Nullable @Nullable IDProvider getStoreElement(@NotNull @NotNull String uid, @NotNull @NotNull IDProvider.UidType uidType) Get an element of this store by it's unique identifier and unique type ornull
if no child exists with the given parameter.
Keep in mind, that someIDProvider
doesn'tsupport
uids (e.g.Section
). See enum constant definitions ofIDProvider.UidType
for node to uid type mapping.- Parameters:
uid
- theunique identifier
of the searched childuidType
- theunique type
of the searched child- Returns:
- the child with the specified
unique identifier
andunique type
ornull
- Since:
- 4.0.17
- See Also:
-
getStoreElement
@Nullable @Nullable IDProvider getStoreElement(@NotNull @NotNull String attributeName, @NotNull @NotNull String attributeValue) Get a child of this store by the value of a attribute ornull
if no child exists with the given parameter- Parameters:
attributeName
- attribute nameattributeValue
- attribute value- Returns:
- the child with the specified
unique identifier
andunique type
ornull
- Since:
- 4.0.17
-
getProject
Project getProject()Description copied from interface:StoreElement
Returns the belonging project of this storeelement.- Specified by:
getProject
in interfaceStoreElement
- Returns:
- the appropriate project.
- Since:
- 4.0.17
-
getUserService
UserService getUserService()- Returns:
- appropriate user service.
- Since:
- 4.0.17
-
isReadOnly
boolean isReadOnly()If the store is in read only mode, which means it is frozen to some point in time.
AnyStoreElement.save()
call in read only mode will throw an IllegalStateException.
Synonym forgetMaxRevision()
!= null- Since:
- 4.0.17
- See Also:
-
getMaxRevision
Revision getMaxRevision()If the store is not based on current version: the revision on which the store is based.- Since:
- 4.0.17
- See Also:
-
getDeletedChildren()
instead