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.RevisionProvider
Nested 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_NOW
Fields inherited from interface de.espirit.firstspirit.access.store.IDProvider
CHANGED, NEVER_RELEASED, RELEASED
Fields inherited from interface de.espirit.firstspirit.access.store.PackagePoolItem
BLOCKED, MODIFIED, UNMODIFIED
Fields inherited from interface de.espirit.firstspirit.access.store.pagestore.Section
OPEN_ENDED
-
Method Summary
Modifier and TypeMethodDescription@org.jetbrains.annotations.Nullable long[]
Get the lifespan of the referenced source section if there is one defined.Return the referenced sourceSection
.boolean
Indicates whether theactual time
is included in the lifespan of of the referenced source section.boolean
isInLifespan
(long time) Indicates whether the given timestamp is included in the lifespan of of the referenced source section.void
Throws anUnsupportedOperationException
.void
setLifespan
(long from, long to) Throws anUnsupportedOperationException
.void
setTemplate
(@NotNull SectionTemplate template) Throws anUnsupportedOperationException
.Methods inherited from interface java.lang.Comparable
compareTo
Methods inherited from interface de.espirit.firstspirit.access.store.pagestore.DataProvider
clearCachedData, getData, getFormData, setData, setFormData
Methods inherited from interface de.espirit.firstspirit.storage.HistoryProvider
asRevisionProvider, getHistory, getHistory
Methods inherited from interface de.espirit.firstspirit.access.store.IDProvider
contrastWith, getDisplayName, getId, getInRevision, getLanguageInfo, getLongID, getMeta, getMetaFormData, getParent, getReleasedBy, getReleaseRevision, getReleaseStatus, getRevision, getUid, getUidType, hasMeta, hasUid, isInReleaseStore, isReleased, isReleaseSupported, moveChild, moveChild, release, release, revert, setDisplayName, setMeta, setMetaFormData, setUid
Methods inherited from interface de.espirit.firstspirit.access.store.PackagePoolItem
addToPackage, getChangeState, getPackage, getPackageName, isAddable, isChangeable, isPackageItem, isSubscribedItem, removeFromPackage, setChangeState
Methods inherited from interface de.espirit.firstspirit.access.store.pagestore.Section
excludeFromOutput, getName, getTemplate, includeInOutput, isInOutputIncluded, isReference, setName
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, 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
-
Method Details
-
setTemplate
Throws anUnsupportedOperationException
.- Specified by:
setTemplate
in interfaceSection<T extends SectionTemplate>
- Parameters:
template
- new template- Throws:
UnsupportedOperationException
- always- Since:
- 4.1.25
-
getReference
Return the referenced sourceSection
.- Returns:
- The referenced section
- Throws:
ReferenceNotFoundException
- if source section is missing- Since:
- 4.2.18
-
getLifespan
@Nullable @org.jetbrains.annotations.Nullable long[] getLifespan()Get the lifespan of the referenced source section if there is one defined.- Specified by:
getLifespan
in interfaceSection<T extends SectionTemplate>
- Returns:
null
or an array with two elements: 1.) start date, 2.) end date or-1L
for no restriction.- Since:
- 4.2.417
- See Also:
-
setLifespan
void setLifespan(long from, long to) Throws anUnsupportedOperationException
.- Specified by:
setLifespan
in 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-1L
for no restriction- Throws:
UnsupportedOperationException
- always- Since:
- 4.2.417
- See Also:
-
removeLifespan
void removeLifespan()Throws anUnsupportedOperationException
.- Specified by:
removeLifespan
in interfaceSection<T extends SectionTemplate>
- Throws:
UnsupportedOperationException
- always- Since:
- 4.2.417
- See Also:
-
isInLifespan
boolean isInLifespan()Indicates whether theactual time
is included in the lifespan of of the referenced source section. CallsisInLifepan(System.currentTimeMillis())
.- Specified by:
isInLifespan
in interfaceSection<T extends SectionTemplate>
- Returns:
true
if 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:
isInLifespan
in interfaceSection<T extends SectionTemplate>
- Parameters:
time
- the timestamp to check the lifespan for- Returns:
true
if no lifespan is set or the given time is included in the lifespan,false
otherwise- Since:
- 4.2.417
- See Also:
-