Interface JcrPackageDefinition
- All Superinterfaces:
PackageProperties
- All Known Implementing Classes:
JcrPackageDefinitionImpl
Specifies the interface of a package definition stored in the repository.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringNode name of the filter nodestatic final StringProperty name of the access control handling modestatic final StringProperty name of the build countstatic final StringProperty name of the cnd pattern filterstatic final StringProperty name of the creation datestatic final StringProperty name of the creation user idstatic final StringProperty name of the package dependenciesstatic final StringProperty name of the package descriptionstatic final StringProperty name of the disable intermediate save flagstatic final StringProperty name of the 'group'static final StringProperty name of the last unpacked datestatic final StringProperty name of the last unpacked user idstatic final StringProperty name of the last unwrapped datestatic final StringProperty name of the last unwrapped user idstatic final StringProperty name of the last wrapped datestatic final StringProperty name of the last wrapped user idstatic final StringProperty name of the last modification datestatic final StringProperty name of the last modification user idstatic final StringProperty name of the filter rootstatic final StringProperty name of the 'name'static final StringProperty name of the rule patternstatic final StringProperty name of the property filter rulesstatic final StringProperty name of the "require restart" flagstatic final StringProperty name of the "requires root" flagstatic final StringProperty name of the filter rootstatic final StringProperty name of the path filter rulesstatic final StringProperty name of the sub packages (only used in snapshots)static final StringProperty name of the rule typestatic final StringProperty name of the package versionFields inherited from interface org.apache.jackrabbit.vault.packaging.PackageProperties
MF_KEY_IMPORT_PACKAGE, MF_KEY_PACKAGE_DEPENDENCIES, MF_KEY_PACKAGE_DEPENDENCIES_LOCATIONS, MF_KEY_PACKAGE_DESC, MF_KEY_PACKAGE_ID, MF_KEY_PACKAGE_ROOTS, MF_KEY_PACKAGE_TYPE, NAME_AC_HANDLING, NAME_ALLOW_INDEX_DEFINITIONS, NAME_BUILD_COUNT, NAME_CND_PATTERN, NAME_CREATED, NAME_CREATED_BY, NAME_DEPENDENCIES, NAME_DEPENDENCIES_LOCATIONS, NAME_DESCRIPTION, NAME_DISABLE_INTERMEDIATE_SAVE, NAME_GENERATOR, NAME_GROUP, NAME_LAST_MODIFIED, NAME_LAST_MODIFIED_BY, NAME_LAST_WRAPPED, NAME_LAST_WRAPPED_BY, NAME_NAME, NAME_PACKAGE_TYPE, NAME_REQUIRES_RESTART, NAME_REQUIRES_ROOT, NAME_SUB_PACKAGE_HANDLING, NAME_USE_BINARY_REFERENCES, NAME_VERSION, PREFIX_INSTALL_HOOK -
Method Summary
Modifier and TypeMethodDescriptionvoiddumpCoverage(@NotNull ProgressTrackerListener listener) Dumps the coverage of this definition to the given listener@Nullable StringGeneric method to retrieve a string property of this definition.@Nullable AccessControlHandlingDeprecated.booleangetBoolean(@NotNull String name) Generic method to retrieve a boolean property of this definition.@Nullable CalendargetCalendar(@NotNull String name) Generic method to retrieve a date property of this definition.@Nullable CalendarReturns the date when the package was unpacked@Nullable StringReturns the user id who unpacked the package@Nullable CalendarReturns the last unwrapped date@Nullable StringReturns the last unwrapped user id@NotNull MetaInfReturns the meta inf of this package@NotNull NodegetNode()Returns the underlying nodebooleanChecks if the definition was modified since it was last wrapped.booleanChecks if this definition is unwrapped, i.e. if the definition structured was extracted from a VaultPackage.voidGeneric method to set a boolean property to this definition.voidGeneric method to set a string property to this definition.voidGeneric method to set a date property to this definition.voidsetDependencies(@NotNull Dependency[] dependencies, boolean autoSave) Sets the dependencies to this definition and stores it in a node representation.voidsetFilter(@Nullable WorkspaceFilter filter, boolean autoSave) Sets the filter to this definition and stores it in a node representation.voidWrites the properties derived from the package id to the contentvoidTouches the last modified and last modified by property.voidunwrap(@Nullable VaultPackage pack, boolean force, boolean autoSave) Unwraps the package definition to the underlying node.Methods inherited from interface org.apache.jackrabbit.vault.packaging.PackageProperties
getACHandling, getBuildCount, getCreated, getCreatedBy, getDateProperty, getDependencies, getDependenciesLocations, getDescription, getExternalHooks, getGenerator, getId, getLastModified, getLastModifiedBy, getLastWrapped, getLastWrappedBy, getPackageType, getProperty, getSubPackageHandling, requiresRestart, requiresRoot
-
Field Details
-
PN_LAST_UNPACKED
Property name of the last unpacked date- See Also:
-
PN_LAST_UNPACKED_BY
Property name of the last unpacked user id- See Also:
-
PN_CREATED
Property name of the creation date- See Also:
-
PN_CREATED_BY
Property name of the creation user id- See Also:
-
PN_LASTMODIFIED
Property name of the last modification date- See Also:
-
PN_LASTMODIFIED_BY
Property name of the last modification user id- See Also:
-
PN_LAST_WRAPPED
Property name of the last wrapped date- Since:
- 2.2.22
- See Also:
-
PN_LAST_WRAPPED_BY
Property name of the last wrapped user id- Since:
- 2.2.22
- See Also:
-
PN_DESCRIPTION
Property name of the package description- See Also:
-
PN_VERSION
Property name of the package version- See Also:
-
PN_BUILD_COUNT
Property name of the build count- See Also:
-
PN_NAME
Property name of the 'name'- Since:
- 2.2
- See Also:
-
PN_GROUP
Property name of the 'group'- Since:
- 2.2
- See Also:
-
PN_REQUIRES_ROOT
Property name of the "requires root" flag- See Also:
-
PN_REQUIRES_RESTART
Property name of the "require restart" flag- See Also:
-
PN_DEPENDENCIES
Property name of the package dependencies- See Also:
-
PN_SUB_PACKAGES
Property name of the sub packages (only used in snapshots)- See Also:
-
PN_LAST_UNWRAPPED
Property name of the last unwrapped date- See Also:
-
PN_LAST_UNWRAPPED_BY
Property name of the last unwrapped user id- See Also:
-
PN_AC_HANDLING
Property name of the access control handling mode- See Also:
-
PN_CND_PATTERN
Property name of the cnd pattern filter- See Also:
-
NN_FILTER
Node name of the filter node- See Also:
-
PN_ROOT
Property name of the filter root- See Also:
-
PN_MODE
Property name of the filter root- See Also:
-
PN_RULES
Property name of the path filter rules- See Also:
-
PN_PROPERTY_RULES
Property name of the property filter rules- See Also:
-
PN_TYPE
Property name of the rule type- See Also:
-
PN_PATTERN
Property name of the rule pattern- See Also:
-
PN_DISABLE_INTERMEDIATE_SAVE
Property name of the disable intermediate save flag- See Also:
-
-
Method Details
-
getNode
Returns the underlying node- Returns:
- the node
-
setId
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 @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
Dumps the coverage of this definition to the given listener- Parameters:
listener- the listener- Throws:
RepositoryException- if an error occurrs
-
setDependencies
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
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
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
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
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
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
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
Touches the last modified and last modified by property.- Parameters:
now- calendar ornullautoSave- iftruethe modifications are saved automatically.
-
setFilter
Sets the filter to this definition and stores it in a node representation.- Parameters:
filter- the filter to setautoSave- iftruethe modifications are saved automatically.
-
getLastUnwrapped
Returns the last unwrapped date- Returns:
- the last unwrapped date
-
getLastUnwrappedBy
Returns the last unwrapped user id- Returns:
- the last unwrapped user id
-
getLastUnpacked
Returns the date when the package was unpacked- Returns:
- the unpacked date
-
getLastUnpackedBy
Returns the user id who unpacked the package- Returns:
- the unpacked user id
-
getAccessControlHandling
Deprecated.UsePackageProperties.getACHandling()retrieved viagetMetaInf()andMetaInf.getPackageProperties().Returns the access control handling defined in the definition, ornullif not defined.- Returns:
- the access control handling or
null - Since:
- 2.3.2
-
getMetaInf
Returns the meta inf of this package- Returns:
- the meta inf
- Throws:
RepositoryException- if an error occurs.
-
PackageProperties.getACHandling()retrieved viagetMetaInf()andMetaInf.getPackageProperties().