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 ClassesNested classes/interfaces inherited from interface de.espirit.firstspirit.storage.HistoryProvider
HistoryProvider.RevisionProviderNested 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_NOWFields inherited from interface de.espirit.firstspirit.access.store.IDProvider
CHANGED, NEVER_RELEASED, RELEASED -
Method Summary
Modifier and TypeMethodDescriptionvoidaddStoreListener(StoreListener listener) Adds aStoreListenerfor client-local changes of this store.@NotNull List<DeletedElementsInfo>Returns a list of deleted children described by the containingElementInfoobjects.@NotNull List<DeletedElementsInfo>getDeletedChildren(long startRevisionId, int resultCount) Returns a list of deleted children described by the containingElementInfoobjects.@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 ofIDProvideridentified by given ids.
Attention: List could containnullentries 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 IDProvidergetStoreElement(long id) @Nullable IDProvidergetStoreElement(@NotNull String uid, @NotNull IDProvider.UidType uidType) Get an element of this store by it's unique identifier and unique type ornullif no child exists with the given parameter.
Keep in mind, that someIDProviderdoesn'tsupportuids (e.g.@Nullable IDProvidergetStoreElement(@NotNull String attributeName, @NotNull String attributeValue) Get a child of this store by the value of a attribute ornullif no child exists with the given parameter@Nullable IDProvidergetStoreElement(Long id) Get a child by it's node id.getType()booleanIftrue, this store is currently used in a generation context and will use aContextAgentif available.booleanisFolder()A store is always a folder, so implementations must always returntrue.booleanIf 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()!booleanReturnstrueif this store is a release store,falsefor current stores.voidremoveStoreListener(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
compareToMethods inherited from interface de.espirit.firstspirit.storage.HistoryProvider
asRevisionProvider, getHistory, getHistoryMethods inherited from interface de.espirit.firstspirit.access.store.IDProvider
contrastWith, getDisplayName, getId, getInRevision, getLanguageInfo, getLongID, getMeta, getMetaFormData, getParent, getReleasedBy, getReleaseRevision, getReleaseRevision, getReleaseStatus, getReleaseStatus, getRevision, getUid, getUidType, hasMeta, hasUid, isInReleaseStore, isInReleaseStore, isReachableInReleaseStore, isReleased, isReleased, isReleaseSupported, moveChild, moveChild, release, release, release, release, revert, setDisplayName, setMeta, setMetaFormData, setUidMethods 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, 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, toXmlMethods 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 aStoreListenerfor 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()Returnstrueif this store is a release store,falsefor 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 containingElementInfoobjects.- Returns:
- list of
ElementInfoobjects 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 containingElementInfoobjects. 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-1to start with the latest revisionresultCount- limits the size of the result list, use0to get unlimited result list- Returns:
- list of
ElementInfoobjects 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. Ifparentis 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 ornullto 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:
isFolderin 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
nullwhen there is no such child - Throws:
NullPointerException- iflongId == null- Since:
- 3.1.158
-
getElements
Get a list ofIDProvideridentified by given ids.
Attention: List could containnullentries 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 ornullif no child exists with the given parameter.
Keep in mind, that someIDProviderdoesn'tsupportuids (e.g.Section). See enum constant definitions ofIDProvider.UidTypefor node to uid type mapping.- Parameters:
uid- theunique identifierof the searched childuidType- theunique typeof the searched child- Returns:
- the child with the specified
unique identifierandunique typeornull - 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 ornullif no child exists with the given parameter- Parameters:
attributeName- attribute nameattributeValue- attribute value- Returns:
- the child with the specified
unique identifierandunique typeornull - Since:
- 4.0.17
-
getProject
Project getProject()Description copied from interface:StoreElementReturns the belonging project of this storeelement.- Specified by:
getProjectin 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:
-
isContextAware
boolean isContextAware()Iftrue, this store is currently used in a generation context and will use aContextAgentif available. It will also perform additional language-dependent access checks for release version elements to ensure they are accessible due to a language-dependent release in this case.- Since:
- 5.2.250604
-
getDeletedChildren()instead