Interface JcrPackageDefinition
-
@ProviderType public interface JcrPackageDefinition
Specifies the interface of a package definition stored in the repository.
-
-
Field Summary
Fields Modifier and Type Field Description static StringNN_FILTERNode name of the filter nodestatic StringPN_AC_HANDLINGProperty name of the access control handling modestatic StringPN_BUILD_COUNTProperty name of the build countstatic StringPN_CND_PATTERNProperty name of the cnd pattern filterstatic StringPN_CREATEDProperty name of the creation datestatic StringPN_CREATED_BYProperty name of the creation user idstatic StringPN_DEPENDENCIESProperty name of the package dependenciesstatic StringPN_DESCRIPTIONProperty name of the package descriptionstatic StringPN_DISABLE_INTERMEDIATE_SAVEProperty name of the disable intermediate save flagstatic StringPN_GROUPProperty name of the 'group'static StringPN_LAST_UNPACKEDProperty name of the last unpacked datestatic StringPN_LAST_UNPACKED_BYProperty name of the last unpacked user idstatic StringPN_LAST_UNWRAPPEDProperty name of the last unwrapped datestatic StringPN_LAST_UNWRAPPED_BYProperty name of the last unwrapped user idstatic StringPN_LAST_WRAPPEDProperty name of the last wrapped datestatic StringPN_LAST_WRAPPED_BYProperty name of the last wrapped user idstatic StringPN_LASTMODIFIEDProperty name of the last modification datestatic StringPN_LASTMODIFIED_BYProperty name of the last modification user idstatic StringPN_MODEProperty name of the filter rootstatic StringPN_NAMEProperty name of the 'name'static StringPN_PATTERNProperty name of the rule patternstatic StringPN_REQUIRES_RESTARTProperty name of the "require restart" flagstatic StringPN_REQUIRES_ROOTProperty name of the "requires root" flagstatic StringPN_ROOTProperty name of the filter rootstatic StringPN_RULESProperty name of the filter rulesstatic StringPN_SUB_PACKAGESProperty name of the sub packages (only used in snapshots)static StringPN_TYPEProperty name of the rule typestatic StringPN_VERSIONProperty name of the package version
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description voiddumpCoverage(ProgressTrackerListener listener)Dumps the coverage of this definition to the given listenerStringget(String name)Generic method to retrieve a string property of this definition.AccessControlHandlinggetAccessControlHandling()Returns the access control handling defined in the definition, ornullif not defined.booleangetBoolean(String name)Generic method to retrieve a boolean property of this definition.longgetBuildCount()Returns the build count of this packageCalendargetCalendar(String name)Generic method to retrieve a date property of this definition.CalendargetCreated()Returns the created dateStringgetCreatedBy()Returns the creator user idDependency[]getDependencies()Returns the dependencies stored in this definitionStringgetDescription()Returns the description of this packagePackageIdgetId()Returns the package idCalendargetLastModified()Returns the last modified dateStringgetLastModifiedBy()Returns the last modified user idCalendargetLastUnpacked()Returns the date when the package was unpackedStringgetLastUnpackedBy()Returns the user id who unpacked the packageCalendargetLastUnwrapped()Returns the last unwrapped dateStringgetLastUnwrappedBy()Returns the last unwrapped user idCalendargetLastWrapped()Returns the last wrapped dateStringgetLastWrappedBy()Returns the wrapper user idMetaInfgetMetaInf()Returns the meta inf of this packageNodegetNode()Returns the underlying nodebooleanisModified()Checks if the definition was modified since it was last wrapped.booleanisUnwrapped()Checks if this definition is unwrapped, i.e.booleanrequiresRestart()Returnstrueif this package needs restart after installation.booleanrequiresRoot()Deprecated.voidset(String name, boolean value, boolean autoSave)Generic method to set a boolean property to this definition.voidset(String name, String value, boolean autoSave)Generic method to set a string property to this definition.voidset(String name, Calendar value, boolean autoSave)Generic method to set a date property to this definition.voidsetDependencies(Dependency[] dependencies, boolean autoSave)Sets the dependencies to this definition and stores it in a node representation.voidsetFilter(WorkspaceFilter filter, boolean autoSave)Sets the filter to this definition and stores it in a node representation.voidsetId(PackageId id, boolean autoSave)Writes the properties derived from the package id to the contentvoidtouch(Calendar now, boolean autoSave)Touches the last modified and last modified by property.voidunwrap(VaultPackage pack, boolean force, boolean autoSave)Unwraps the package definition to the underlying node.
-
-
-
Field Detail
-
PN_LAST_UNPACKED
static final String PN_LAST_UNPACKED
Property name of the last unpacked date- See Also:
- Constant Field Values
-
PN_LAST_UNPACKED_BY
static final String PN_LAST_UNPACKED_BY
Property name of the last unpacked user id- See Also:
- Constant Field Values
-
PN_CREATED
static final String PN_CREATED
Property name of the creation date- See Also:
- Constant Field Values
-
PN_CREATED_BY
static final String PN_CREATED_BY
Property name of the creation user id- See Also:
- Constant Field Values
-
PN_LASTMODIFIED
static final String PN_LASTMODIFIED
Property name of the last modification date- See Also:
- Constant Field Values
-
PN_LASTMODIFIED_BY
static final String PN_LASTMODIFIED_BY
Property name of the last modification user id- See Also:
- Constant Field Values
-
PN_LAST_WRAPPED
static final String PN_LAST_WRAPPED
Property name of the last wrapped date- Since:
- 2.2.22
- See Also:
- Constant Field Values
-
PN_LAST_WRAPPED_BY
static final String PN_LAST_WRAPPED_BY
Property name of the last wrapped user id- Since:
- 2.2.22
- See Also:
- Constant Field Values
-
PN_DESCRIPTION
static final String PN_DESCRIPTION
Property name of the package description- See Also:
- Constant Field Values
-
PN_VERSION
static final String PN_VERSION
Property name of the package version- See Also:
- Constant Field Values
-
PN_BUILD_COUNT
static final String PN_BUILD_COUNT
Property name of the build count- See Also:
- Constant Field Values
-
PN_NAME
static final String PN_NAME
Property name of the 'name'- Since:
- 2.2
- See Also:
- Constant Field Values
-
PN_GROUP
static final String PN_GROUP
Property name of the 'group'- Since:
- 2.2
- See Also:
- Constant Field Values
-
PN_REQUIRES_ROOT
static final String PN_REQUIRES_ROOT
Property name of the "requires root" flag- See Also:
- Constant Field Values
-
PN_REQUIRES_RESTART
static final String PN_REQUIRES_RESTART
Property name of the "require restart" flag- See Also:
- Constant Field Values
-
PN_DEPENDENCIES
static final String PN_DEPENDENCIES
Property name of the package dependencies- See Also:
- Constant Field Values
-
PN_SUB_PACKAGES
static final String PN_SUB_PACKAGES
Property name of the sub packages (only used in snapshots)- See Also:
- Constant Field Values
-
PN_LAST_UNWRAPPED
static final String PN_LAST_UNWRAPPED
Property name of the last unwrapped date- See Also:
- Constant Field Values
-
PN_LAST_UNWRAPPED_BY
static final String PN_LAST_UNWRAPPED_BY
Property name of the last unwrapped user id- See Also:
- Constant Field Values
-
PN_AC_HANDLING
static final String PN_AC_HANDLING
Property name of the access control handling mode- See Also:
- Constant Field Values
-
PN_CND_PATTERN
static final String PN_CND_PATTERN
Property name of the cnd pattern filter- See Also:
- Constant Field Values
-
NN_FILTER
static final String NN_FILTER
Node name of the filter node- See Also:
- Constant Field Values
-
PN_ROOT
static final String PN_ROOT
Property name of the filter root- See Also:
- Constant Field Values
-
PN_MODE
static final String PN_MODE
Property name of the filter root- See Also:
- Constant Field Values
-
PN_RULES
static final String PN_RULES
Property name of the filter rules- See Also:
- Constant Field Values
-
PN_TYPE
static final String PN_TYPE
Property name of the rule type- See Also:
- Constant Field Values
-
PN_PATTERN
static final String PN_PATTERN
Property name of the rule pattern- See Also:
- Constant Field Values
-
PN_DISABLE_INTERMEDIATE_SAVE
static final String PN_DISABLE_INTERMEDIATE_SAVE
Property name of the disable intermediate save flag- See Also:
- Constant Field Values
-
-
Method Detail
-
setId
void setId(@Nonnull PackageId id, boolean autoSave)
Writes the properties derived from the package id to the content- Parameters:
id- the package idautoSave- iftruethe changes are saved automatically.- Since:
- 2.2
-
isUnwrapped
boolean isUnwrapped()
Checks if this definition is unwrapped, i.e. if the definition structured was extracted from a VaultPackage.- Returns:
trueif unwrapped.
-
isModified
boolean isModified()
Checks if the definition was modified since it was last wrapped. new packages are considered modified.- Returns:
trueif modified
-
unwrap
void unwrap(@Nullable VaultPackage pack, boolean force, boolean autoSave) throws RepositoryException, IOException
Unwraps the package definition to the underlying node.- Parameters:
pack- the packageforce- iftrueunwrapping is forcedautoSave- iftruemodifications are saved automatically- Throws:
RepositoryException- if an error occursIOException- if an I/O error occurs
-
dumpCoverage
void dumpCoverage(@Nonnull ProgressTrackerListener listener) throws RepositoryException
Dumps the coverage of this definition to the given listener- Parameters:
listener- the listener- Throws:
RepositoryException- if an error occurrs
-
getDependencies
@Nonnull Dependency[] getDependencies()
Returns the dependencies stored in this definition- Returns:
- the dependencies
-
setDependencies
void setDependencies(@Nonnull Dependency[] dependencies, boolean autoSave)
Sets the dependencies to this definition and stores it in a node representation.- Parameters:
dependencies- the package dependenciesautoSave- iftruethe modifications are saved automatically.- Since:
- 3.1.32
-
get
@CheckForNull String get(@Nonnull String name)
Generic method to retrieve a string property of this definition.- Parameters:
name- the name of the property.- Returns:
- the property value or
nullif it does not exist.
-
getBoolean
boolean getBoolean(@Nonnull String name)
Generic method to retrieve a boolean property of this definition.- Parameters:
name- the name of the property.- Returns:
- the property value or
nullif it does not exist.
-
getCalendar
@CheckForNull Calendar getCalendar(@Nonnull String name)
Generic method to retrieve a date property of this definition.- Parameters:
name- the name of the property.- Returns:
- the property value or
nullif it does not exist.
-
set
void set(@Nonnull String name, @Nullable String value, boolean autoSave)
Generic method to set a string property to this definition.- Parameters:
name- the name of the propertyvalue- the value ornullto clear the propertyautoSave- iftruethe modifications are saved automatically.
-
set
void set(@Nonnull String name, @Nullable Calendar value, boolean autoSave)
Generic method to set a date property to this definition.- Parameters:
name- the name of the propertyvalue- the value ornullto clear the propertyautoSave- iftruethe modifications are saved automatically.
-
set
void set(@Nonnull String name, boolean value, boolean autoSave)
Generic method to set a boolean property to this definition.- Parameters:
name- the name of the propertyvalue- the valueautoSave- iftruethe modifications are saved automatically.
-
touch
void touch(@Nullable Calendar now, boolean autoSave)
Touches the last modified and last modified by property.- Parameters:
now- calendar ornullautoSave- iftruethe modifications are saved automatically.
-
setFilter
void setFilter(@Nullable WorkspaceFilter filter, boolean autoSave)
Sets the filter to this definition and stores it in a node representation.- Parameters:
filter- the filter to setautoSave- iftruethe modifications are saved automatically.
-
getLastModified
@CheckForNull Calendar getLastModified()
Returns the last modified date- Returns:
- the last modified date
-
getLastModifiedBy
@CheckForNull String getLastModifiedBy()
Returns the last modified user id- Returns:
- the last modified user id
-
getCreated
@CheckForNull Calendar getCreated()
Returns the created date- Returns:
- the created date
-
getCreatedBy
@CheckForNull String getCreatedBy()
Returns the creator user id- Returns:
- the creator
-
getLastWrapped
@CheckForNull Calendar getLastWrapped()
Returns the last wrapped date- Returns:
- the last wrapped date
- Since:
- 2.2.22
-
getLastWrappedBy
@CheckForNull String getLastWrappedBy()
Returns the wrapper user id- Returns:
- the wrapper
- Since:
- 2.2.22
-
getLastUnwrapped
@CheckForNull Calendar getLastUnwrapped()
Returns the last unwrapped date- Returns:
- the last unwrapped date
-
getLastUnwrappedBy
@CheckForNull String getLastUnwrappedBy()
Returns the last unwrapped user id- Returns:
- the last unwrapped user id
-
getLastUnpacked
@CheckForNull Calendar getLastUnpacked()
Returns the date when the package was unpacked- Returns:
- the unpacked date
-
getLastUnpackedBy
@CheckForNull String getLastUnpackedBy()
Returns the user id who unpacked the package- Returns:
- the unpacked user id
-
requiresRoot
@Deprecated boolean requiresRoot()
Deprecated.Returnstrueif this package needs a admin user to install it.- Returns:
- the "requires root" flag
-
requiresRestart
boolean requiresRestart()
Returnstrueif this package needs restart after installation.- Returns:
- the "requires restart" flag.
-
getAccessControlHandling
@CheckForNull AccessControlHandling getAccessControlHandling()
Returns the access control handling defined in the definition, ornullif not defined.- Returns:
- the access control handling or
null - Since:
- 2.3.2
-
getDescription
@CheckForNull String getDescription()
Returns the description of this package- Returns:
- the description
-
getBuildCount
long getBuildCount()
Returns the build count of this package- Returns:
- the build count.
-
getMetaInf
@Nonnull MetaInf getMetaInf() throws RepositoryException
Returns the meta inf of this package- Returns:
- the meta inf
- Throws:
RepositoryException- if an error occurs.
-
-