Interface IDProvider
- All Superinterfaces:
Comparable<StoreElement>,HistoryProvider,StoreElement,Workflowable
- All Known Subinterfaces:
Body,ChannelSourceProvider,Content2,Content2Section,ContentFolder,ContentProducer,ContentStoreRoot,DataProvider,Dataset,DocumentGroup,FormatTemplate,FormatTemplateContainer,FormatTemplateFolder,FormatTemplates,GCABody,GCAFolder,GCAPage,GCASection,GlobalContentArea,GlobalStoreRoot,GomSourceProvider,LinkTemplate,LinkTemplates,MasterTemplate,Media,MediaFolder,MediaStoreRoot,PackagePoolItem,Page,PageFolder,PageRef,PageRefFolder,PageStoreRoot,PageTemplate,PageTemplates,Previewable,PreviewImageProvider,ProjectProperties,Query,Referenceable,Schema,SchemaContainer,SchemaFolder,Schemes,Script,ScriptContainer,ScriptFolder,Scripts,Section<T>,SectionReference<T>,SectionTemplate,SectionTemplates,SiteStoreFolder,SiteStoreRoot,StartNode,Store,StyleTemplate,TableFormatTemplate,TableTemplate,Template,TemplateContainer<T>,TemplateContentProvider,TemplateFolder<T>,TemplateProvider<T>,TemplateStoreElement,TemplateStoreRoot,URLProperties,UserProperties,Workflow,WorkflowContainer,WorkflowFolder,Workflows
- Since:
- 3.0.9
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumType for the dependent release handling.static enumType represanting the revert mode.static enumDefines the name space in which theunique identifierhas to be unique.Nested classes/interfaces inherited from interface de.espirit.firstspirit.storage.HistoryProvider
HistoryProvider.RevisionProvider -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicates that the actual version of this node differs to the version in release store.static final intIndicates that this node does not exist in the release store.
ThereforeisInReleaseStore()will deliverfalsestatic final intIndicates that this node is currently released.Fields inherited from interface de.espirit.firstspirit.storage.HistoryProvider
ALL_REVISIONS, EVER_SINCE, UNTIL_NOW -
Method Summary
Modifier and TypeMethodDescriptioncontrastWith(IDProvider reference) Contrast the element with another one.@NotNull StringgetDisplayName(Language language) Return the display name (label) for the specified language - if no language specific label is defined for this language the value for the master language is returned.longgetId()Returns the unique ID of this IDProvider@Nullable IDProvidergetInRevision(@NotNull Revision revision) Get this element in the state of the given revision.getLanguageInfo(@NotNull Language language) Returns theLanguageInfonode for the given language@Nullable DatagetMeta()Deprecated.@Nullable FormDataReturns theformdata containerof this element ornullif there is no meta data template defined for project.@Nullable IDProvider@Nullable UserThe last user who released this node ornullif this node has never been released.@Nullable Revision@Nullable RevisiongetReleaseRevision(@NotNull Language language) Get the first released revision for this element marked valid for the given language.intintgetReleaseStatus(@NotNull Language... languages) Returns the release state of this element (CHANGEDorRELEASEDorNEVER_RELEASED) and if all the given languages are marked as valid for the release state.@NotNull StringgetUid()Returns the unique identifier of thisIDProviderif ithas a unique identifierotherwise throws anUnsupportedOperationException!@NotNull IDProvider.UidTypeReturns the unique identifier type of thisIDProviderif ithas a unique identifierotherwise throws anUnsupportedOperationException!booleanhasMeta()Indicates that any meta data is set for this element.booleanhasUid()Returnstrueif thisIDProviderhas a unique identifier like e.g.booleanChecks whether this element has a release version.booleanisInReleaseStore(@NotNull Language... languages) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250604, replaced byisReachableInReleaseStore(Language...)booleanisReachableInReleaseStore(@NotNull Language... languages) Checks if this element exists in the release representation of the belongingstoreand has a valid release version for all the given languages.booleanReturnstrueif this element is currently released (not changed).booleanisReleased(@NotNull Language... languages) Returnstrueif this element is currently released (not changed) and the given languages are marked as valid for the release state.booleanIndicates wether this element supportsrelease(boolean)or not.voidmoveChild(IDProvider child) Insert child at last position.voidmoveChild(IDProvider child, int nextSiblingIndex) Insert child at index position.voidrelease()Release this node and all children for all languages.voidrelease(boolean releaseChilds) Release this node and optionally all childsvoidRelease this node and mark only a specific set of languages a valid for this release,voidRelease this node and mark only a specific set of languages valid for this release,voidrevert(@NotNull Revision revision, boolean recursive, @NotNull EnumSet<IDProvider.RevertType> ignoreRevertTypes) Reverts this store element to the given FSRevision.voidsetDisplayName(@NotNull Language language, @Nullable String displayName) Sets the display name (label) for the specified language.voidDeprecated.since 4.2.450 - usesetMetaFormData(de.espirit.firstspirit.forms.FormData)insteadvoidsetMetaFormData(@Nullable FormData formData) Sets the givenformdata containerof this element.voidSets the unique identifier.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.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, getProject, getReferenceName, getReferences, getReferences, getStore, getTreePermission, getWorkflowPermission, getWorkflowPermissions, getWriteLock, hasIncomingReferences, hasPermissions, importStoreElement, importStoreElements, inheritWorkflowPermission, isDeleted, isExportSupported, isFolder, 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
-
Field Details
-
RELEASED
static final int RELEASEDIndicates that this node is currently released. More precisely that the version of this node is equal between current and release store.- Since:
- 2.3
- See Also:
-
CHANGED
static final int CHANGEDIndicates that the actual version of this node differs to the version in release store.- Since:
- 2.3
- See Also:
-
NEVER_RELEASED
static final int NEVER_RELEASEDIndicates that this node does not exist in the release store.
ThereforeisInReleaseStore()will deliverfalse- Since:
- 4.0.17
- See Also:
-
-
Method Details
-
getId
Returns the unique ID of this IDProvider- Returns:
- the unique ID of this IDProvider
- Since:
- 4.0.90
-
getLongID
- Since:
- 3.1
-
getRevision
- Since:
- 4.0
-
getReleaseRevision
- Since:
- 4.0
-
getReleaseRevision
@Experimental @Nullable @Nullable Revision getReleaseRevision(@NotNull @NotNull Language language) throws ElementDeletedException Get the first released revision for this element marked valid for the given language. May benullif there is none and the element has never been released for this language.- Throws:
ElementDeletedException- If this element is already deleted.- Since:
- 5.2.250102
-
getInRevision
@ApiDoc(comment="Get this element in the state of the given revision.", since="4.0.52") @Nullable @Nullable IDProvider getInRevision(@NotNull @NotNull Revision revision) Get this element in the state of the given revision. If the provided revision is older thanProject#getFirstCompleteRevision()this method may behave unexpectly, i.e. may throw an exception or returnnull.- Parameters:
revision- The revision to use.- Returns:
- The revision-based element.
- Since:
- 4.0.52
-
getUid
@ApiDoc(comment="Returns the unique identifier of this IDProvider if it has a unique identifier otherwise throws an UnsupportedOperationException!", since="4.0") @NotNull @NotNull String getUid()Returns the unique identifier of thisIDProviderif ithas a unique identifierotherwise throws anUnsupportedOperationException!- Returns:
- unique identifier
- Since:
- 4.0
- See Also:
-
setUid
@ApiDoc(comment="Sets the unique identifier.", since="4.0") void setUid(@NotNull @NotNull String uid) Sets the unique identifier. The provideduidshould contain only lower case characters.
Attention: Use with care. Changing the unique identifier will destroy all
incoming referenceswhich use this unique identifier.
If the given unique identifier isn't unique on the server duringStoreElement.save()aDuplicateReferenceNameExceptionwill be thrown- Parameters:
uid- new unique identifier; should contain only lower case characters - internally this value is transformed to lower case- Throws:
NullPointerException- if the provideduidis null- Since:
- 4.0
-
getUidType
@ApiDoc(comment="Returns the unique identifier type of this IDProvider if it has a unique identifier otherwise throws an UnsupportedOperationException!", since="4.0") @NotNull @NotNull IDProvider.UidType getUidType()Returns the unique identifier type of thisIDProviderif ithas a unique identifierotherwise throws anUnsupportedOperationException!- Returns:
- the unique identifier
- Since:
- 4.0
- See Also:
-
hasUid
@ApiDoc(comment="Returns true if this IDProvider has a unique identifier like e.g. medias, false otherwise.", since="4.0") boolean hasUid()Returnstrueif thisIDProviderhas a unique identifier like e.g.medias,falseotherwise. This method must be called in prior togetUid()andgetUidType()!- Returns:
trueif this IDProvider has a unique identifier,falseotherwise- Since:
- 4.0
- See Also:
-
getLanguageInfo
@ApiDoc(comment="Returns the LanguageInfo node for the given language", since="4.0") LanguageInfo getLanguageInfo(@NotNull @NotNull Language language) Returns theLanguageInfonode for the given language- Parameters:
language- thelanguageto get the language specific info node for- Returns:
LanguageInfonode for the given language- Since:
- 4.0
-
moveChild
@ApiDoc(comment="Insert child at last position.", since="4.0") void moveChild(IDProvider child) throws LockException, ElementMovedException Insert child at last position. This method requires no lock! The given child can be a child of a different parent. CallsmoveChild(child, -1)- Parameters:
child- the child to be moved- Throws:
LockExceptionElementMovedException- Since:
- 4.0
-
moveChild
@ApiDoc(comment="Insert child at index position.", since="4.0") void moveChild(IDProvider child, int nextSiblingIndex) throws LockException, ElementMovedException Insert child at index position. This method requires no lock! The given child can be a child of a different parent. The provided index should be the index of anIDProviderchild node (if not the child is moved to the last index).Example: Move from another parent
Root |-- newParent | |-- firstNode | `-- nextSibling `-- oldParent `-- moveNode try { // move 'moveNode' to 'newParent', position before 'nextSibling' newParent.moveChild(moveNode, newParent.getChildIndex(nextSibling)); } catch(ElementMovedException e) { // element moveNode already moved on the server } catch(LockException e) { // one of the elements (newParent, oldParent, moveNode) is locked on the server by another user }- Parameters:
child- the child to be moved to this elementnextSiblingIndex- the index of the next sibling. The given child will be positioned before next sibling.- Throws:
LockExceptionElementMovedException- Since:
- 4.0
- See Also:
-
getDisplayName
@ApiDoc(comment="Return the display name (label) for the specified language - if no language specific label is defined for this language the value for the master language is returned.", since="4.0.13") @NotNull @NotNull String getDisplayName(Language language) Return the display name (label) for the specified language - if no language specific label is defined for this language the value for the master language is returned. If this is also not set a node dependent fallback value is returned.- Since:
- 4.0.13
-
setDisplayName
@ApiDoc(comment="Sets the display name (label) for the specified language.", since="5.1.205") void setDisplayName(@NotNull @NotNull Language language, @Nullable @Nullable String displayName) Sets the display name (label) for the specified language. If the given language is the master language of the project, the display name will also become the default display name for other languages, where no name is set explicitly.- Parameters:
language- The language to set the display name for.displayName- The display name to be set.- Since:
- 5.1.205
-
isReleaseSupported
@ApiDoc(comment="Indicates wether this element supports release or not.", since="4.1.9") boolean isReleaseSupported()Indicates wether this element supportsrelease(boolean)or not.- Returns:
trueif this element supports release,falseotherwise- Since:
- 4.1.9
- See Also:
-
getReleaseStatus
@ApiDoc(comment="Returns the release state of this storeelement (CHANGED or RELEASED or NEVER_RELEASED)", since="4.0.13") int getReleaseStatus()- Since:
- 4.0.13
- See Also:
-
getReleaseStatus
Returns the release state of this element (CHANGEDorRELEASEDorNEVER_RELEASED) and if all the given languages are marked as valid for the release state. If the element is only released for a subset of the given languages,CHANGEDis returned.- Parameters:
languages- The languages to check as valid for the release revision, empty means language independent release state.- Since:
- 5.2.250102
-
isReleased
@ApiDoc(comment="Returns true if this element is currently released (not changed).", since="5.0.414") boolean isReleased()Returnstrueif this element is currently released (not changed). Semantically the same as (getReleaseStatus()==RELEASED) but probably faster, at least fordatasets- Since:
- 5.0.414
-
isReleased
Returnstrueif this element is currently released (not changed) and the given languages are marked as valid for the release state.- Parameters:
languages- The languages to check, empty means language independent release state.- Since:
- 5.2.250102
-
getReleasedBy
@ApiDoc(comment="The last user who released this node or null if this node has never been released.", since="4.1.9") @Nullable @Nullable User getReleasedBy()The last user who released this node ornullif this node has never been released. In projects which do not use therelease featurethis method returns thelast editor.- Since:
- 4.1.9
-
isInReleaseStore
@ApiDoc(comment="Checks if this storeelement exists in the release representation of the belonging store.", since="4.1.9") boolean isInReleaseStore()Checks whether this element has a release version. If any parent element lacks a release version, this element remains inaccessible through the release store. Please refer toisReachableInReleaseStore(Language...)to verify this condition.- Returns:
trueif the node has a release version,falseotherwise- Since:
- 4.1.9
- See Also:
-
isInReleaseStore
@Experimental @Deprecated(since="5.2.250604", forRemoval=true) boolean isInReleaseStore(@NotNull @NotNull Language... languages) Deprecated, for removal: This API element is subject to removal in a future version.since 5.2.250604, replaced byisReachableInReleaseStore(Language...)Checks whether this element has a release version and if it is valid for all the given languages.- Parameters:
languages- The languages to check as valid for the release revision.- Returns:
trueif the node has a release revision and if it is valid for the set of languages,falseotherwise- Since:
- 5.2.250102
-
isReachableInReleaseStore
Checks if this element exists in the release representation of the belongingstoreand has a valid release version for all the given languages.- Parameters:
languages- The languages to check as valid for the release revision.- Returns:
trueif the node exists in the release store and is valid for the set of languages,falseotherwise- Since:
- 5.2.250604
-
release
Release this node and all children for all languages.- Since:
- 4.1.9
-
release
Release this node and mark only a specific set of languages valid for this release,- Parameters:
languages- The languages to mark as valid for this release.- Since:
- 5.2.250102
-
release
@ApiDoc(comment="Release this node and optionally all childs", since="4.0") void release(boolean releaseChilds) Release this node and optionally all childs- Since:
- 4.0
-
release
Release this node and mark only a specific set of languages a valid for this release,- Parameters:
releaseChilds- Whether to release all children of this node.languages- The languages to mark as valid for this release, empty means all languages are valid.- Since:
- 5.2.250102
-
getParent
@ApiDoc(comment="Return parent IDProvider which is null for deleted elements or store-roots.", since="4.0.17") @Nullable @Nullable IDProvider getParent()- Specified by:
getParentin interfaceStoreElement- Returns:
- parent
IDProviderwhich isnullfordeletedelements orstore-roots. - Since:
- 4.0.17
-
contrastWith
@ApiDoc(comment="Contrast the element with another one.", since="4.0.52") @NotNull @NotNull Set<Contrast> contrastWith(IDProvider reference) Contrast the element with another one. Returns the set of changes being applied from the reference element to this one.- Parameters:
reference- The reference element.- Returns:
- A set of change information.
- Since:
- 4.0.52
-
revert
@ApiDoc(comment="Reverts this store element to the given FSRevision.", since="4.0.44") void revert(@NotNull @NotNull Revision revision, boolean recursive, @NotNull @NotNull EnumSet<IDProvider.RevertType> ignoreRevertTypes) throws LockException Reverts this store element to the given FSRevision.The element does not need to be locked for this operation, since it is going to be locked and unlocked automatically by this method.
- Parameters:
revision- the revision to revert to, must not benull.recursive- indicates if child elements should be reverted, too.ignoreRevertTypes-- Throws:
LockException- if it was not possible to lock this element.- Since:
- 4.0.44
- See Also:
-
getMeta
Deprecated.since 4.2.450 - usegetMetaFormData()insteadReturns the meta data for this element ornullif there is no meta data template defined for project.- Returns:
- The meta data or
nullif there is no meta data template defined for project. - Since:
- 4.0.54
- See Also:
-
setMeta
Deprecated.since 4.2.450 - usesetMetaFormData(de.espirit.firstspirit.forms.FormData)insteadSet meta data for this element or providenullto remove meta data.- Parameters:
data- The meta data to be set.- Since:
- 4.0.54
-
hasMeta
@ApiDoc(comment="Indicates that any meta data is set for this element.", since="4.0.120") boolean hasMeta()Indicates that any meta data is set for this element.- Returns:
true, if any meta data is set.- Since:
- 4.0.120
-
getMetaFormData
@ApiDoc(comment="Returns the formdata container of this element or null if there is no meta data template defined for project.", since="4.2.450") @Nullable @Nullable FormData getMetaFormData()Returns theformdata containerof this element ornullif there is no meta data template defined for project.- Returns:
- the formdata container of this element or
nullif there is no meta data template defined for project. - Since:
- 4.2.450
- See Also:
-
setMetaFormData
@ApiDoc(comment="Sets the given formdata container of this element. Removes meta data if null is provided.", since="4.2.450") void setMetaFormData(@Nullable @Nullable FormData formData) Sets the givenformdata containerof this element. Removes meta data ifnullis provided.- Parameters:
formData- the form data container to be set to this element ornullto remove meta data.- Since:
- 4.2.450
-
getMetaFormData()instead