Interface Section<T extends SectionTemplate>
- All Superinterfaces:
Comparable<StoreElement>
,DataProvider
,HistoryProvider
,IDProvider
,PackagePoolItem
,StoreElement
,TemplateProvider<T>
,Workflowable
- All Known Subinterfaces:
Content2Section
,GCASection
,SectionReference<T>
public interface Section<T extends SectionTemplate>
extends DataProvider, TemplateProvider<T>, PackagePoolItem
This interface provides methods to handle the sections of Pages in the PageStore.
A Page-Body in PageStore can have zero or several sections.
To get all sections for a Page-body, use
Body.getChildren(Section.class)
.- Since:
- 3.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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
excludeFromOutput
(Language language) Excludes this section from the output for the given language.@org.jetbrains.annotations.Nullable long[]
Get the lifespan of the current section if there is one defined.@NotNull String
getName()
Get the name of the sectionReturns the template of this element.void
includeInOutput
(Language language) Includes this section in the output for the given language.boolean
Indicates whether theactual time
is included in the lifespan of this section.boolean
isInLifespan
(long time) Indicates whether the given timestamp is included in the lifespan of this section.boolean
isInOutputIncluded
(Language language) Checks if this section is included in the output for the given language.boolean
Is this a reference section?void
Remove lifespan of the current section.void
setLifespan
(long from, long to) Set the lifespan of the current section.void
Set the name of a sectionvoid
setTemplate
(T template) Set the template for this section.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.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
-
Field Details
-
OPEN_ENDED
static final long OPEN_ENDEDIndicator for open ended lifespan- Since:
- 4.0.129
- See Also:
-
-
Method Details
-
getName
Get the name of the section- Specified by:
getName
in interfaceStoreElement
- Returns:
- name of the section
- Since:
- 3.0
-
setName
Set the name of a section- Parameters:
name
- new name of a section- Since:
- 3.0
-
getTemplate
@ApiDoc(comment="Returns the template of this element.", since="3.0") @NotNull T getTemplate() throws ReferenceNotFoundExceptionReturns the template of this element.- Specified by:
getTemplate
in interfaceTemplateProvider<T extends SectionTemplate>
- Returns:
- the template of type <T>
- Throws:
ReferenceNotFoundException
- if template is missing- Since:
- 3.0
-
setTemplate
@ApiDoc(comment="Set the template for this section.", since="4.1.25") void setTemplate(@NotNull T template) Set the template for this section.- Parameters:
template
- new template- Throws:
NullPointerException
- ifsectionTemplate
isnull
- Since:
- 4.1.25
-
getLifespan
@ApiDoc(comment="Get the lifespan of the current section if there is one defined.", since="3.0") @Nullable @org.jetbrains.annotations.Nullable long[] getLifespan()Get the lifespan of the current section if there is one defined.- Returns:
null
or an array with two elements: 1.) start date, 2.) end date or-1L
for no restriction.- Since:
- 3.0
- See Also:
-
setLifespan
@ApiDoc(comment="Set the lifespan of the current section.", since="3.0") void setLifespan(long from, long to) Set the lifespan of the current section.- 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- Since:
- 3.0
- See Also:
-
removeLifespan
Remove lifespan of the current section.- Since:
- 3.0
- See Also:
-
isInLifespan
@ApiDoc(comment="Indicates whether the actual time is included in the lifespan of this section.", since="4.0") boolean isInLifespan()Indicates whether theactual time
is included in the lifespan of this section. CallsisInLifepan(System.currentTimeMillis())
.- Returns:
true
if no lifespan is set or the actual time is included in the lifespan.- Since:
- 4.0
- See Also:
-
isInLifespan
@ApiDoc(comment="Indicates whether the given timestamp is included in the lifespan of this section.", since="4.2.200") boolean isInLifespan(long time) Indicates whether the given timestamp is included in the lifespan of this section.- 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.200
- See Also:
-
includeInOutput
@ApiDoc(comment="Includes this section in the output for the given language.", since="3.0") void includeInOutput(Language language) Includes this section in the output for the given language.- Parameters:
language
- the language to include this section for- Since:
- 3.0
-
excludeFromOutput
@ApiDoc(comment="Excludes this section from the output for the given language.", since="3.0") void excludeFromOutput(Language language) Excludes this section from the output for the given language.- Parameters:
language
- the language to exclude for this section- Since:
- 3.0
-
isInOutputIncluded
@ApiDoc(comment="Checks if this section is included in the output for the given language.", since="3.0") boolean isInOutputIncluded(Language language) Checks if this section is included in the output for the given language.- Parameters:
language
- the language to check this section for- Returns:
true
if this section is included in the output for this language- Since:
- 3.0
-
isReference
Is this a reference section?- Returns:
true
if this section is a reference section- Since:
- 3.0
-