public interface IDProvider extends StoreElement, HistoryProvider
Modifier and Type | Interface and Description |
---|---|
static class |
IDProvider.DependentReleaseType
Type for the dependent release handling.
|
static class |
IDProvider.RevertType
Type represanting the revert mode.
|
static class |
IDProvider.UidType
Defines the name space in which the
unique identifier
has to be unique. |
HistoryProvider.RevisionProvider
Modifier and Type | Field and Description |
---|---|
static int |
CHANGED
Indicates that the actual version of this node differs
to the version in release store.
|
static int |
NEVER_RELEASED
Indicates that this node doesn't not exist in the release store.
|
static int |
RELEASED
Indicates that this node is currently released.
|
ALL_REVISIONS, EVER_SINCE, UNTIL_NOW
Modifier and Type | Method and Description |
---|---|
Set<de.espirit.firstspirit.storage.Contrast> |
contrastWith(IDProvider reference)
Contrast the element with another one.
|
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
|
IDProvider |
getInRevision(Revision revision)
Get this element in the state of the given revision.
|
LanguageInfo |
getLanguageInfo(Language language)
Returns the
LanguageInfo node for the given language |
Long |
getLongID() |
Data |
getMeta()
Deprecated.
since 4.2.450 - use
getMetaFormData() instead |
FormData |
getMetaFormData()
Returns the
formdata container of this element or null if there is no meta data template defined for project. |
IDProvider |
getParent()
|
User |
getReleasedBy()
The last user who released this node or
null if this node has never been released. |
Revision |
getReleaseRevision() |
int |
getReleaseStatus()
|
Revision |
getRevision() |
String |
getUid()
Returns the unique identifier of this
IDProvider if it has a unique identifier
otherwise throws an UnsupportedOperationException ! |
IDProvider.UidType |
getUidType()
Returns the unique identifier type of this
IDProvider if it has a unique identifier
otherwise throws an UnsupportedOperationException ! |
boolean |
hasMeta()
Indicates that any meta data is set for this element.
|
boolean |
hasUid()
Returns
true if this IDProvider has a unique identifier like e.g. |
boolean |
isInReleaseStore()
Checks if this storeelement exists in the release representation of the belonging
store . |
boolean |
isReleased()
Returns
true if this element is currently released (not changed). |
boolean |
isReleaseSupported()
Indicates wether this element supports
release(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 childs
|
void |
revert(Revision revision,
boolean recursive,
EnumSet<IDProvider.RevertType> ignoreRevertTypes)
Reverts this storeelement to the given FSRevision.
|
void |
setMeta(Data data)
Deprecated.
since 4.2.450 - use
setMetaFormData(de.espirit.firstspirit.forms.FormData) instead |
void |
setMetaFormData(FormData formData)
Sets the given
formdata container of this element. |
void |
setUid(String uid)
Sets the unique identifier.
|
appendChild, appendChildBefore, delete, exportStoreElement, getChildCount, getChildIndex, getChildren, getChildren, getChildren, getChildren, getCreateWorkflowPermission, getDefinedPrincipalPermissions, getEditor, getElementType, getFirstChild, getIncomingReferences, getInheritedPrincipalPermissions, getLastChanged, getName, getNextSibling, getOutgoingReferences, getPermission, getPermission, getPermission, 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, update
getColor, getTask, hasTask, removeTask, setColor, setTask
compareTo
asRevisionProvider, getHistory, getHistory
static final int RELEASED
getReleaseStatus()
,
Constant Field Valuesstatic final int CHANGED
getReleaseStatus()
,
Constant Field Valuesstatic final int NEVER_RELEASED
isInReleaseStore()
will deliver false
isInReleaseStore()
,
Constant Field Valueslong getId()
Long getLongID()
Revision getRevision()
@Nullable IDProvider getInRevision(@NotNull Revision revision)
Project#getFirstCompleteRevision()
this method may behave unexpectly, i.e. may throw an exception or return null
.revision
- The revision to use.@NotNull String getUid()
IDProvider
if it has a unique identifier
otherwise throws an UnsupportedOperationException
!hasUid()
void setUid(@NotNull String uid)
uid
should contain only lower case characters.Attention:
Use with care. Changing the unique identifier will destroy all
incoming references
which use this unique identifier.
StoreElement.save()
a DuplicateReferenceNameException
will be thrownuid
- new unique identifier; should contain only lower case characters - internally this value is
transformed to lower caseNullPointerException
- if the provided uid
is null@NotNull IDProvider.UidType getUidType()
IDProvider
if it has a unique identifier
otherwise throws an UnsupportedOperationException
!hasUid()
boolean hasUid()
true
if this IDProvider
has a unique identifier like e.g.
medias
, false
otherwise.
This method must be called in prior to getUid()
and getUidType()
!true
if this IDProvider has a unique identifier, false
otherwisegetUid()
,
getUidType()
LanguageInfo getLanguageInfo(@NotNull Language language)
LanguageInfo
node for the given languagelanguage
- the language
to get the language specific info node forLanguageInfo
node for the given languagevoid moveChild(IDProvider child) throws LockException, ElementMovedException
moveChild(child, -1)
child
- the child to be movedLockException
ElementMovedException
void moveChild(IDProvider child, int nextSiblingIndex) throws LockException, ElementMovedException
IDProvider
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 }
child
- the child to be moved to this elementnextSiblingIndex
- the index of the next sibling. The given child will be positioned before next sibling.LockException
ElementMovedException
moveChild(IDProvider)
@NotNull String getDisplayName(Language language)
boolean isReleaseSupported()
release(boolean)
or not.true
if this element supports release, false
otherwiserelease()
,
release(boolean)
,
isInReleaseStore()
int getReleaseStatus()
isInReleaseStore()
,
isReleaseSupported()
,
isReleased()
boolean isReleased()
true
if this element is currently released (not changed).
Semantically the same as (getReleaseStatus()
==
RELEASED
)
but probably faster, at least for datasets
@Nullable User getReleasedBy()
null
if this node has never been released. In projects which
do not use the release feature
this method
returns the last editor
.boolean isInReleaseStore()
store
. This
method could only be called for storeelements which support release
and which are in
the current representation of the belonging store
true
if the node exists in the release store, false
otherwiseisReleaseSupported()
,
getReleaseStatus()
void release()
void release(boolean releaseChilds)
@Nullable IDProvider getParent()
getParent
in interface StoreElement
IDProvider
which is null
for deleted
elements or store-roots
.@NotNull Set<de.espirit.firstspirit.storage.Contrast> contrastWith(IDProvider reference)
reference
- The reference element.void revert(@NotNull Revision revision, boolean recursive, @NotNull EnumSet<IDProvider.RevertType> ignoreRevertTypes) throws LockException
revision
- the revision to revert torecursive
- ignoreRevertTypes
- LockException
HistoryProvider.getHistory()
@Deprecated @Nullable Data getMeta()
getMetaFormData()
insteadnull
if there is no meta data template defined for project.null
if there is no meta data template defined for project.Project.getMetadataTemplate()
@Deprecated void setMeta(@Nullable Data data)
setMetaFormData(de.espirit.firstspirit.forms.FormData)
insteadnull
to remove meta data.data
- The meta data to be set.boolean hasMeta()
true
, if any meta data is set.@Nullable FormData getMetaFormData()
formdata container
of this element or null
if there is no meta data template defined for project.null
if there is no meta data template defined for project.Project.getMetadataTemplate()
void setMetaFormData(@Nullable FormData formData)
formdata container
of this element. Removes meta data if null
is provided.formData
- the form data container to be set to this element or null
to remove meta data.Copyright © 2014 e-Spirit AG. All Rights Reserved. Build 5.0_BETA.500