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.RevisionProviderNested classes/interfaces inherited from interface de.espirit.firstspirit.access.store.IDProvider
IDProvider.DependentReleaseType, IDProvider.RevertType, IDProvider.UidType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intIndicator for the blocked state.static final intIndicator for the modified state.static final intIndicator for the unmodified state.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, RELEASED -
Method Summary
Modifier and TypeMethodDescriptionvoidaddToPackage(Package pck) Adds this node, all children andreferenced nodeswhich arePackagePoolItems to the specified package.int@Nullable PackageReturns thePackagethis item belongs to ornull.Returns the name of the package this item belongs to.booleanbooleanChecks if this PackagePoolItem is changeable.booleanbooleanvoidremoveFromPackage(Package pck) Removes this node, all children andnodes referencing this nodeswhich arePackagePoolItems'sfrom the specified package.
This node needn't to belockedwhen calling this method.voidsetChangeState(int changeState) Sets the change state for this PackagePoolItem.Methods inherited from interface java.lang.Comparable
compareToMethods 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.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, 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
-
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:
trueif 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:
trueif 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 nodeswhich arePackagePoolItems to the specified package. To be added, this node must be present and must not be locked. Additionally, the givenPackagemust 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 enhancementis activated - adds "@package-Name" to the display name, if
namespace enhancementis 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_CHANGEis not grantedIllegalStateException- if the node is not lockedUnsupportedOperationException- if this node is from release storeLockExceptionElementDeletedException- 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 nodeswhich arePackagePoolItems'sfrom the specified package.
This node needn't to belockedwhen calling this method. The givenPackagemust be locked when removing this node and must be saved afterwards.- Parameters:
pck- the package to remove this node from- Throws:
LockExceptionElementDeletedException- 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:
trueif this node is neither an package nor an subscribed item and is an allowed content type 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()deliverstruea call to this method will also delivertrue
Forsubscribed itemsthis method checks against the read-only attribute in the belonging subscription (Subscription.isChangeable())- Returns:
trueif this subscribed item is changeable,falseotherwise- 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 thePackagethis item belongs to ornull.- Returns:
- the package this item belongs to
- Throws:
ServiceNotFoundException- if this element belongs to apackageor asubscriptionbut theppool serviceis 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,MODIFIEDorBLOCKED. -1 will be returned for items which aren'tsubscribed item'sor if the state could not be established- Returns:
- the change state (
UNMODIFIED,MODIFIEDorBLOCKED) - 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,MODIFIEDorBLOCKED- Throws:
IllegalAccessException- if this item isn't asubscribed item- Since:
- 3.1.172
-