Interface PackagePoolItem
- All Superinterfaces:
Comparable<StoreElement>
,HistoryProvider
,IDProvider
,StoreElement
,Workflowable
- All Known Subinterfaces:
Content2
,Content2Section
,FormatTemplate
,FormatTemplateFolder
,GCAPage
,GCASection
,LinkTemplate
,MasterTemplate
,Media
,Page
,PageRef
,PageRefFolder
,PageTemplate
,Query
,Schema
,SchemaFolder
,Script
,ScriptFolder
,Section<T>
,SectionReference<T>
,SectionTemplate
,StyleTemplate
,TableFormatTemplate
,TableTemplate
,Template
,TemplateFolder<T>
,Workflow
,WorkflowFolder
All items which may be added to a package implement this.
PackagePool items have an attribute in the format:
Items in master project:
pp:"'PACKAGENAME'" (e.g. pp:"content")
Subscribed Items:
pp:"'PACKAGENAME' + : + 'SourceNodeVersion' + , + 'TargetNodeVersion'" (e.g. pp:"content:3,1")
- Since:
- 3.1.158
-
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
Modifier and TypeFieldDescriptionstatic final int
Indicator for the blocked state.static final int
Indicator for the modified state.static final int
Indicator for the unmodified state.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
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addToPackage
(Package pck) Adds this node, all children andreferenced nodes
which arePackagePoolItem
s to the specified package.int
Returns the change state of this PackagePoolItem eitherUNMODIFIED
,MODIFIED
orBLOCKED
. -1 will be returned for items which aren'tsubscribed item's
or if the state could not be established@Nullable Package
Returns thePackage
this item belongs to ornull
.Returns the name of the package this item belongs to.boolean
boolean
Checks if this PackagePoolItem is changeable.boolean
boolean
void
removeFromPackage
(Package pck) Removes this node, all children andnodes referencing this nodes
which arePackagePoolItems's
from the specified package.
This node needn't to belocked
when calling this method.void
setChangeState
(int changeState) Sets the change state for this PackagePoolItem.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.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.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
-
UNMODIFIED
static final int UNMODIFIEDIndicator for the unmodified state.- Since:
- 3.1.172
- See Also:
-
MODIFIED
static final int MODIFIEDIndicator for the modified state.- Since:
- 3.1.172
- See Also:
-
BLOCKED
static final int BLOCKEDIndicator for the blocked state.- Since:
- 3.1.172
- See Also:
-
-
Method Details
-
isPackageItem
@ApiDoc(comment="Return true if the item is part of a Package.", since="3.1.158") boolean isPackageItem()- Returns:
true
if the item is part of aPackage
- Since:
- 3.1.158
-
isSubscribedItem
@ApiDoc(comment="Return true if this node has been imported by a Subscription.", since="3.1.158") boolean isSubscribedItem()- Returns:
true
if this node has been imported by aSubscription
- Since:
- 3.1.158
-
addToPackage
@ApiDoc(comment="Adds this node, all children and referenced nodes which are PackagePoolItems to the specified package.", since="3.1.158") void addToPackage(Package pck) throws LockException, ElementDeletedException Adds this node, all children andreferenced nodes
which arePackagePoolItem
s to the specified package. To be added, this node must be present and must not be locked. Additionally, the givenPackage
must be locked when adding this node and must be saved afterwards.
The following modifications are performed:- adds "@package-Name" to the unique identifier, if
namespace enhancement
is activated - adds "@package-Name" to the display name, if
namespace enhancement
is activated - sets the attribute to the
package name
. - add this node to the start node list of the specified package
- Throws:
IllegalStateException
- if the attribute is already setSecurityException
- if the permissionPermission.CAN_CHANGE
is not grantedIllegalStateException
- if the node is not lockedUnsupportedOperationException
- if this node is from release storeLockException
ElementDeletedException
- Since:
- 3.1.158
- See Also:
- adds "@package-Name" to the unique identifier, if
-
removeFromPackage
@ApiDoc(comment="Removes this node, all children and nodes referencing this nodes which are PackagePoolItems\'s from the specified package.", since="3.1.192") void removeFromPackage(Package pck) throws LockException, ElementDeletedException Removes this node, all children andnodes referencing this nodes
which arePackagePoolItems's
from the specified package.
This node needn't to belocked
when calling this method. The givenPackage
must be locked when removing this node and must be saved afterwards.- Parameters:
pck
- the package to remove this node from- Throws:
LockException
ElementDeletedException
- Since:
- 3.1.192
-
isAddable
@ApiDoc(comment="Return true if this node is neither an package nor an subscribed item and is an allowed content type for the specified package.", since="3.1.158") boolean isAddable(Package pck) - Returns:
true
if this node is neither an package nor an subscribed item and is an allowed contenttype for the specified package- Since:
- 3.1.158
- See Also:
-
isChangeable
@ApiDoc(comment="Checks if this PackagePoolItem is changeable.", since="3.1.158") boolean isChangeable()Checks if this PackagePoolItem is changeable. IfisPackageItem()
deliverstrue
a call to this method will also delivertrue
Forsubscribed items
this method checks against the read-only attribute in the belongingsubscription (Subscription.isChangeable()
)- Returns:
true
if this subscribed item is changeable,false
otherwise- Since:
- 3.1.158
-
getPackageName
@ApiDoc(comment="Returns the name of the package this item belongs to.", since="3.1.158") String getPackageName()Returns the name of the package this item belongs to.- Returns:
- the name of the belonging package
- Since:
- 3.1.158
-
getPackage
@ApiDoc(comment="Returns the Package this item belongs to or null.", since="3.1.158") @Nullable @Nullable Package getPackage()Returns thePackage
this item belongs to ornull
.- Returns:
- the package this item belongs to
- Throws:
ServiceNotFoundException
- if this element belongs to apackage
or asubscription
but theppool service
is not reachable- Since:
- 3.1.158
-
getChangeState
@ApiDoc(comment="Returns the change state of this PackagePoolItem either UNMODIFIED, MODIFIED or BLOCKED.", since="3.1.172") int getChangeState()Returns the change state of this PackagePoolItem eitherUNMODIFIED
,MODIFIED
orBLOCKED
. -1 will be returned for items which aren'tsubscribed item's
or if the state could not be established- Returns:
- the change state (
UNMODIFIED
,MODIFIED
orBLOCKED
) - Since:
- 3.1.172
-
setChangeState
@ApiDoc(comment="Sets the change state for this PackagePoolItem.", since="3.1.172") void setChangeState(int changeState) throws IllegalAccessException - Parameters:
changeState
- eitherUNMODIFIED
,MODIFIED
orBLOCKED
- Throws:
IllegalAccessException
- if this item isn't asubscribed item
- Since:
- 3.1.172
-