Interface SectionReference<T extends SectionTemplate>
- All Superinterfaces:
Comparable<StoreElement>,DataProvider,HistoryProvider,IDProvider,PackagePoolItem,Section<T>,StoreElement,TemplateProvider<T>,Workflowable
Interface providing means to operate on section references.
Please note that in contrast to a normal section a section reference is not allowed to be modified.
- Since:
- 4.0
-
Nested Class Summary
Nested 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, RELEASEDFields inherited from interface de.espirit.firstspirit.access.store.PackagePoolItem
BLOCKED, MODIFIED, UNMODIFIEDFields inherited from interface de.espirit.firstspirit.access.store.pagestore.Section
OPEN_ENDED -
Method Summary
Modifier and TypeMethodDescriptionlong @Nullable []Get the lifespan of the referenced source section if there is one defined.Returns the referenced sourceSection.booleanIndicates whether theactual timeis included in the lifespan of of the referenced source section.booleanisInLifespan(long time) Indicates whether the given timestamp is included in the lifespan of of the referenced source section.voidThrows anUnsupportedOperationException.voidsetLifespan(long from, long to) Throws anUnsupportedOperationException.voidsetTemplate(@NotNull SectionTemplate template) Throws anUnsupportedOperationException.Methods inherited from interface java.lang.Comparable
compareToMethods inherited from interface de.espirit.firstspirit.access.store.pagestore.DataProvider
clearCachedData, getData, getFormData, setData, setFormDataMethods 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.PackagePoolItem
addToPackage, getChangeState, getPackage, getPackageName, isAddable, isChangeable, isPackageItem, isSubscribedItem, removeFromPackage, setChangeStateMethods inherited from interface de.espirit.firstspirit.access.store.pagestore.Section
excludeFromOutput, getName, getTemplate, includeInOutput, isInOutputIncluded, isReference, resolveSection, setNameMethods 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, 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
-
Method Details
-
setTemplate
Throws anUnsupportedOperationException.- Specified by:
setTemplatein interfaceSection<T extends SectionTemplate>- Parameters:
template- new template- Throws:
UnsupportedOperationException- always- Since:
- 4.1.25
-
getReference
Returns the referenced sourceSection. Please note that a section reference may refer to another section reference. If you require the actual section, useSection.resolveSection()- Returns:
- The referenced section or reference
- Throws:
ReferenceNotFoundException- if source section is missing- Since:
- 4.2.18
-
getLifespan
long @Nullable [] getLifespan()Get the lifespan of the referenced source section if there is one defined.- Specified by:
getLifespanin interfaceSection<T extends SectionTemplate>- Returns:
nullor an array with two elements: 1.) start date, 2.) end date or-1Lfor no restriction.- Since:
- 4.2.417
- See Also:
-
setLifespan
void setLifespan(long from, long to) Throws anUnsupportedOperationException.- Specified by:
setLifespanin interfaceSection<T extends SectionTemplate>- Parameters:
from- start date for lifespan (in milliseconds since 1.1.1970 0:00 UTC)to- end date for lifespan (in milliseconds since 1.1.1970 0:00 UTC) or-1Lfor no restriction- Throws:
UnsupportedOperationException- always- Since:
- 4.2.417
- See Also:
-
removeLifespan
void removeLifespan()Throws anUnsupportedOperationException.- Specified by:
removeLifespanin interfaceSection<T extends SectionTemplate>- Throws:
UnsupportedOperationException- always- Since:
- 4.2.417
- See Also:
-
isInLifespan
boolean isInLifespan()Indicates whether theactual timeis included in the lifespan of of the referenced source section. CallsisInLifepan(System.currentTimeMillis()).- Specified by:
isInLifespanin interfaceSection<T extends SectionTemplate>- Returns:
trueif no lifespan is set or the actual time is included in the lifespan.- Since:
- 4.2.417
- See Also:
-
isInLifespan
boolean isInLifespan(long time) Indicates whether the given timestamp is included in the lifespan of of the referenced source section.- Specified by:
isInLifespanin interfaceSection<T extends SectionTemplate>- Parameters:
time- the timestamp to check the lifespan for- Returns:
trueif no lifespan is set or the given time is included in the lifespan,falseotherwise- Since:
- 4.2.417
- See Also:
-