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
Modifier and TypeInterfaceDescriptionstatic enum
Type for the dependent release handling.static enum
Type represanting the revert mode.static enum
Defines the name space in which theunique identifier
has to be unique.Nested classes/interfaces inherited from interface de.espirit.firstspirit.storage.HistoryProvider
HistoryProvider.RevisionProvider
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates that the actual version of this node differs to the version in release store.static final int
Indicates that this node does not exist in the release store.
ThereforeisInReleaseStore()
will deliverfalse
static final int
Indicates 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 TypeMethodDescription@NotNull Set<de.espirit.firstspirit.storage.Contrast>
contrastWith
(IDProvider reference) Contrast the element with another one.@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.long
getId()
Returns the unique ID of this IDProvider@Nullable IDProvider
getInRevision
(@NotNull Revision revision) Get this element in the state of the given revision.getLanguageInfo
(@NotNull Language language) Returns theLanguageInfo
node for the given language@Nullable Data
getMeta()
Deprecated.@Nullable FormData
Returns theformdata container
of this element ornull
if there is no meta data template defined for project.@Nullable IDProvider
@Nullable User
The last user who released this node ornull
if this node has never been released.@Nullable Revision
int
@NotNull String
getUid()
Returns the unique identifier of thisIDProvider
if ithas a unique identifier
otherwise throws anUnsupportedOperationException
!@NotNull IDProvider.UidType
Returns the unique identifier type of thisIDProvider
if ithas a unique identifier
otherwise throws anUnsupportedOperationException
!boolean
hasMeta()
Indicates that any meta data is set for this element.boolean
hasUid()
Returnstrue
if thisIDProvider
has a unique identifier like e.g.boolean
Checks if this storeelement exists in the release representation of the belongingstore
.boolean
Returnstrue
if this element is currently released (not changed).boolean
Indicates wether this element supportsrelease(boolean)
or not.void
moveChild
(IDProvider child) Insert child at last position.void
moveChild
(IDProvider child, int nextSiblingIndex) Insert child at index position.void
release()
Release this node and all childs.void
release
(boolean releaseChilds) Release this node and optionally all childsvoid
revert
(@NotNull Revision revision, boolean recursive, @NotNull EnumSet<IDProvider.RevertType> ignoreRevertTypes) Reverts this store element to the given FSRevision.void
setDisplayName
(@NotNull Language language, @Nullable String displayName) Sets the display name (label) for the specified language.void
Deprecated.since 4.2.450 - usesetMetaFormData(de.espirit.firstspirit.forms.FormData)
insteadvoid
setMetaFormData
(@Nullable FormData formData) Sets the givenformdata container
of this element.void
Sets the unique identifier.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.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, 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, toXml
Methods 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
-
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 thisIDProvider
if ithas a unique identifier
otherwise 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 provideduid
should contain only lower case characters.
Attention: Use with care. Changing the unique identifier will destroy all
incoming references
which use this unique identifier.
If the given unique identifier isn't unique on the server duringStoreElement.save()
aDuplicateReferenceNameException
will 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 provideduid
is 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 thisIDProvider
if ithas a unique identifier
otherwise 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()Returnstrue
if thisIDProvider
has a unique identifier like e.g.medias
,false
otherwise. This method must be called in prior togetUid()
andgetUidType()
!- Returns:
true
if this IDProvider has a unique identifier,false
otherwise- 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 theLanguageInfo
node for the given language- Parameters:
language
- thelanguage
to get the language specific info node for- Returns:
LanguageInfo
node 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:
LockException
ElementMovedException
- 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 anIDProvider
child 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:
LockException
ElementMovedException
- 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:
true
if this element supports release,false
otherwise- 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:
-
isReleased
@ApiDoc(comment="Returns true if this element is currently released (not changed).", since="5.0.414") boolean isReleased()Returnstrue
if this element is currently released (not changed). Semantically the same as (getReleaseStatus()
==
RELEASED
) but probably faster, at least fordatasets
- Since:
- 5.0.414
-
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 ornull
if this node has never been released. In projects which do not use therelease feature
this 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 if this storeelement exists in the release representation of the belongingstore
. This method could only be called for storeelements whichsupport release
and which are in the current representation of the belongingstore
- Returns:
true
if the node exists in the release store,false
otherwise- Since:
- 4.1.9
- See Also:
-
release
Release this node and all childs.- Since:
- 4.1.9
-
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
-
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:
getParent
in interfaceStoreElement
- Returns:
- parent
IDProvider
which isnull
fordeleted
elements orstore-roots
. - Since:
- 4.0.17
-
contrastWith
@ApiDoc(comment="Contrast the element with another one.", since="4.0.52") @NotNull @NotNull Set<de.espirit.firstspirit.storage.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 ornull
if there is no meta data template defined for project.- Returns:
- The meta data or
null
if 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 providenull
to 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 container
of this element ornull
if there is no meta data template defined for project.- Returns:
- the formdata container of this element or
null
if 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 container
of this element. Removes meta data ifnull
is provided.- Parameters:
formData
- the form data container to be set to this element ornull
to remove meta data.- Since:
- 4.2.450
-
getMetaFormData()
instead