|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
public interface Package
The Package object needs to be locked for
modifying operations. Use Lockable.isLocked() and Lockable.lock() to
manage the locking of the packge.
All changes to the package needs to be commited by calling Lockable.save()
to make the changes persistent on the server.
To rollback changes to a package, call Lockable.refresh() instead of Lockable.save()
| Field Summary | |
|---|---|
static int |
CONTENT_PACKAGE
|
static int |
TEMPLATE_PACKAGE
|
static byte |
WF_ACTUALIZE
|
static byte |
WF_CONFLICT
|
static byte |
WF_ERROR
|
static byte |
WF_OK
|
static byte |
WF_RELEASE
|
| Method Summary | |
|---|---|
void |
addAuthorisedUser(User user)
Adds the given user to the list of authorised User's of this package. |
void |
addPublishUser(User user)
Adds the given user to the list of User's
which have the permission 'publish' for this package. |
void |
addResponsibleUser(User user)
Adds the given user to the list of responsible User's of this package. |
void |
addStartNode(IDProvider storeElement)
Add a start node. |
boolean |
containsStartNode(IDProvider node)
Checks if the given start node is existing in the underlying start node list of this package. |
PackageVersion |
createVersion(String tag,
String comment)
Create a new version. |
PackageVersion |
createVersion(String tag,
String comment,
boolean update)
Creates a new version. |
void |
delete()
|
Map<Class<? extends PackagePoolItem>,Boolean> |
getAllNameSpaceEnhancements()
Get all defined NameSpaceEnhancement Settings for this package. |
Map<Class<? extends PackagePoolItem>,Boolean> |
getAllOverwriteDuringImportSettings()
Get all defined OverwriteDuringImport Settings for this package. |
List<User> |
getAuthorisedUsers()
Gets an unmodifiable list of authorised User's
of this package. |
String |
getComment()
Returns the comment of this package. |
Set<String> |
getCustomEventNames()
Returns a Set of all defined custom event names of this package. |
String |
getCustomEventScriptName(String eventName)
Returns the name of the script which is mapped to the specified custom event. |
Map<String,String> |
getCustomEventScripts()
Returns a read-only map of all defined custom events. |
long |
getId()
Gets the id of this package. |
String |
getName()
Returns the name of this package. |
Project |
getPublisher()
Gets the publisher Project of this package. |
List<User> |
getPublishUsers()
Gets an unmodifiable list of User's which have the
permission 'publish' for this package. |
List<User> |
getResponsibleUsers()
Gets an unmodifiable list of responsible User's
of this package. |
Collection<IDProvider> |
getStartNodes()
Returns a read-only List of StoreElement's of
start nodes existing in this package. |
Collection<IDProvider> |
getStartNodes(Store.Type storeType)
Returns a read-only List of StoreElement's of
start nodes existing in this package from the given Store type. |
int |
getType()
Returns the type of this package. |
int |
getVersion()
Gets the version of this package. |
List<PackageVersion> |
getVersions()
Returns a readonly list of PackageVersion's
existing for this package. |
String |
getWorkflowName(byte type)
Gets the name of the Workflow which is mapped to
the given event type. |
boolean |
isAvailable()
This flag indicates if the package is available. |
boolean |
isReadOnly()
Read only packages: Content in subscribing may not be changed. |
boolean |
isValidNodeType(StoreElement node)
|
boolean |
overwriteDuringImport()
Indicates how to handle package pool items which causes an uid conflict
during import of this package. |
boolean |
overwriteDuringImport(Class<? extends PackagePoolItem> clazz)
Indicates how to handle package pool items of the given clazz which causes an uid conflict
during import of this package. |
void |
publishPackage()
Publish this package. |
void |
publishPackage(PublishGroup publishGroup)
Publish this package for the specified group. |
void |
removeAuthorisedUser(User user)
Removes the given user from the list of authorised User's of this package. |
void |
removeCustomEvent(String eventName)
Removes the given custom event name from the list of custom events. |
void |
removePublishUser(User user)
Removes the given user from the list of User's
which have the permission 'publish' for this package. |
void |
removeResponsibleUser(User user)
Removes the given user from the list of responsible User's of this package. |
void |
removeStartNode(IDProvider storeElement)
Removes the given StoreElement from the list of start nodes. |
void |
removeVersion(PackageVersion version)
Removes the given PackageVersion from this package. |
void |
setAvailable(boolean available)
Set this package available / not available. |
void |
setComment(String comment)
Sets the comment for this package. |
void |
setCustomScriptName(String eventName,
String scriptName)
Map the script specified by the given script name to the given custom event name. |
void |
setLocked(boolean lock)
Deprecated. since 4.0.17 - use Lockable.lock() or Lockable.unlock() |
void |
setName(String name)
Sets the name for this package. |
void |
setOverwriteDuringImport(boolean overwrite)
Defines how to handle elements which causes an uid conflict
during import of this package. |
void |
setOverwriteDuringImport(boolean overwrite,
Class<? extends PackagePoolItem>... clazz)
Set overwrite handling for specified types. |
void |
setReadOnly(boolean value)
Read only packages: Content in subscribing may not be changed. |
void |
setUseNameSpaceEnhancement(boolean enhanceNameSpace)
Set use name space enhancement. |
void |
setUseNameSpaceEnhancement(boolean useEnhancement,
Class<? extends PackagePoolItem>... clazz)
Set use name space enhancement for specified types. |
void |
setWorkflow(byte type,
Workflow workflow)
Map the given workflow to the given event type. |
Subscription |
subscribePackage(Project subscriber)
Creates a new Subscription to this package from
the given Project. |
Subscription |
subscribePackage(Project subscriber,
PublishGroup publishGroup)
Creates a new Subscription to this package from
the given Project and with the given PublishGroup. |
boolean |
useNameSpaceEnhancement()
Indicates whether the uid of elements which are added
to this package will be enhanced with '@PACKAGE_NAME' or not. |
boolean |
useNameSpaceEnhancement(Class<? extends PackagePoolItem> clazz)
Indicates whether the uid of an element of the given clazz should be enhanced with '@PACKAGE_NAME' or not during PackagePoolItem.addToPackage(Package). |
| Methods inherited from interface de.espirit.firstspirit.access.Lockable |
|---|
isChanged, isLocked, lock, refresh, save, unlock |
| Methods inherited from interface java.lang.Comparable |
|---|
compareTo |
| Field Detail |
|---|
static final int CONTENT_PACKAGE
static final int TEMPLATE_PACKAGE
static final byte WF_OK
static final byte WF_ERROR
static final byte WF_CONFLICT
static final byte WF_RELEASE
static final byte WF_ACTUALIZE
| Method Detail |
|---|
long getId()
String getName()
void setName(String name)
name - String the new nameString getComment()
void setComment(String comment)
comment - String the new commentint getType()
Package.CONTENT_PACKAGE or Package.TEMPLATE_PACKAGEboolean isValidNodeType(StoreElement node)
true if the type of the specified node is a valid content type for this package,
false otherwise. Only nodes wich implement PackagePoolItem may be a valid.Collection<IDProvider> getStartNodes()
StoreElement's of
start nodes existing in this package.
StoreElementboolean containsStartNode(IDProvider node)
node - to check against
true if the given node is existing, false otherwiseCollection<IDProvider> getStartNodes(Store.Type storeType)
StoreElement's of
start nodes existing in this package from the given Store type.
storeType -
StoreElement) for the specified store (maybe empty)void addStartNode(IDProvider storeElement)
storeElement -
IllegalArgumentException - if the provided store element does not belong to the
publisher project or e.g. a template node is added to a content packagevoid removeStartNode(IDProvider storeElement)
StoreElement from the list of start nodes.
storeElement - the StoreElement to removeint getVersion()
Lockable.save() increases this
version if the package was changed.
List<PackageVersion> getVersions()
PackageVersion's
existing for this package.
PackageVersion's
PackageVersion createVersion(String tag,
String comment)
Lockable.save() for this package to create version zip on the server.
tag - the tag for the new versioncomment - the comment for the new version
PackageVersion createVersion(String tag,
String comment,
boolean update)
Lockable.save() for this package to create version zip on the server.
If update == true the version zip creation during Lockable.save() will ignore not released elements.
tag - the tag for the new versioncomment - the comment for the new versionupdate - indicates whether the created version should be an update version
void removeVersion(PackageVersion version)
version - the PackageVersion to removeSubscription subscribePackage(Project subscriber)
Subscription to this package from
the given Project.Subscription is created with the default PublishGroup.
To create a subscription with a different publishgroup use
Package.subscribePackage(Project, PublishGroup)
subscriber - the Project which subscribes the package
Subscription the new subscription
Subscription subscribePackage(Project subscriber,
PublishGroup publishGroup)
Subscription to this package from
the given Project and with the given PublishGroup.
subscriber - the Project which subscribes the packagepublishGroup - the PublishGroup to create the subscription for
Subscription the new subscriptionvoid publishPackage(PublishGroup publishGroup)
Subscription's of this package which uses the given
PublishGroup.
void publishPackage()
Subscription's of this package on the server.
@Nullable Project getPublisher()
Project of this package.null.
Project master projectboolean isReadOnly()
Package.setReadOnly(boolean)void setReadOnly(boolean value)
Package.isReadOnly()boolean isAvailable()
true if this package is available,
false otherwise.void setAvailable(boolean available)
available - true to activate,
false to deactivate the packageList<User> getPublishUsers()
User's which have the
permission 'publish' for this package.
User'svoid addPublishUser(User user)
User's
which have the permission 'publish' for this package.
user - the user to addvoid removePublishUser(User user)
User's
which have the permission 'publish' for this package.
user - the user to removeList<User> getResponsibleUsers()
User's
of this package.
User'svoid addResponsibleUser(User user)
User's of this package.
user - the user to addvoid removeResponsibleUser(User user)
User's of this package.
user - the user to removeList<User> getAuthorisedUsers()
User's
of this package.
User'svoid addAuthorisedUser(User user)
User's of this package.
user - the user to addvoid removeAuthorisedUser(User user)
User's of this package.
user - the user to removeString getWorkflowName(byte type)
Workflow which is mapped to
the given event type.
type - Package.WF_OK, Package.WF_ERROR, Package.WF_CONFLICT, Package.WF_RELEASE, Package.WF_ACTUALIZE
null if no workflow is defined for this type, else the node id of the workflow node
void setWorkflow(byte type,
Workflow workflow)
type - Package.WF_OK, Package.WF_ERROR, Package.WF_CONFLICT, Package.WF_RELEASE, Package.WF_ACTUALIZEworkflow - the workflow to map to the event typeSet<String> getCustomEventNames()
String'sMap<String,String> getCustomEventScripts()
String custom event nameString the name of the script
which is started when the event is triggered
void setCustomScriptName(String eventName,
String scriptName)
eventName - the custom event name to map the script toscriptName - the name of the script to map to the custom eventvoid removeCustomEvent(String eventName)
eventName - the custom event name to removeString getCustomEventScriptName(String eventName)
eventName - the name of the custom event
null if no binding
is definedvoid delete()
lock to this package
@Deprecated
void setLocked(boolean lock)
throws LockException
Lockable.lock() or Lockable.unlock()
LockExceptionboolean useNameSpaceEnhancement()
added
to this package will be enhanced with '@PACKAGE_NAME' or not.
This flag is used as fallback if there is no special type setting for the element which is added.
true (default) if elements should be enhanced with '@PACKAGE_NAME' during add to package, false otherwisePackage.setUseNameSpaceEnhancement(boolean),
Package.setUseNameSpaceEnhancement(boolean, Class[])void setUseNameSpaceEnhancement(boolean enhanceNameSpace)
true to enable name space enhancement with '@PACKAGE_NAME' for the uid of elements
which are added to this package.
For type specific settings use Package.setUseNameSpaceEnhancement(boolean, Class[])
Package.useNameSpaceEnhancement(),
Package.setUseNameSpaceEnhancement(boolean, Class[])boolean useNameSpaceEnhancement(Class<? extends PackagePoolItem> clazz)
PackagePoolItem.addToPackage(Package).
This method also regards inheritance of the given class and the fallback setting Package.useNameSpaceEnhancement() if there is no special
setting for the given clazz.false for Template.class
a call to useNameSpaceEnhancement(TableTemplate.class) delivers false cause TableTemplate inherites interface Template
true if elements should be enhanced with '@PACKAGE_NAME', false otherwisePackage.useNameSpaceEnhancement(),
Package.setUseNameSpaceEnhancement(boolean, Class[])
void setUseNameSpaceEnhancement(boolean useEnhancement,
Class<? extends PackagePoolItem>... clazz)
Package.useNameSpaceEnhancement(Class)Map<Class<? extends PackagePoolItem>,Boolean> getAllNameSpaceEnhancements()
Package.useNameSpaceEnhancement()boolean overwriteDuringImport()
uid conflict
during import of this package.true if package pool items should be overwritten, false otherwise.
true if elements with uid conflict should be overwritten during import, false (default) otherwisevoid setOverwriteDuringImport(boolean overwrite)
uid conflict
during import of this package.true existing elements in target project with the same uid will be overwritten with the package pool
item of this package.false (default) existing elements will be retained and the package pool item of this package will inserted with an unified
uid
Package.overwriteDuringImport()boolean overwriteDuringImport(Class<? extends PackagePoolItem> clazz)
uid conflict
during import of this package.true if package pool items should be overwritten, false otherwise.
This method also regards inheritance of the given class and the fallback setting Package.overwriteDuringImport() if there is no special
setting for the given clazz.overwrite during import is set to false for Template.class
a call to overwriteDuringImport(TableTemplate.class) delivers false cause TableTemplate inherites interface Template
true if elements with uid conflict should be overwritten during import, false otherwisePackage.overwriteDuringImport(),
Package.setOverwriteDuringImport(boolean, Class[])
void setOverwriteDuringImport(boolean overwrite,
Class<? extends PackagePoolItem>... clazz)
),
)Map<Class<? extends PackagePoolItem>,Boolean> getAllOverwriteDuringImportSettings()
Package.overwriteDuringImport()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||