Interface JcrPackageDefinition
-
- All Superinterfaces:
PackageProperties
- All Known Implementing Classes:
JcrPackageDefinitionImpl
@ProviderType public interface JcrPackageDefinition extends PackageProperties
Specifies the interface of a package definition stored in the repository.
-
-
Field Summary
Fields Modifier and Type Field Description static String
NN_FILTER
Node name of the filter nodestatic String
PN_AC_HANDLING
Property name of the access control handling modestatic String
PN_BUILD_COUNT
Property name of the build countstatic String
PN_CND_PATTERN
Property name of the cnd pattern filterstatic String
PN_CREATED
Property name of the creation datestatic String
PN_CREATED_BY
Property name of the creation user idstatic String
PN_DEPENDENCIES
Property name of the package dependenciesstatic String
PN_DESCRIPTION
Property name of the package descriptionstatic String
PN_DISABLE_INTERMEDIATE_SAVE
Property name of the disable intermediate save flagstatic String
PN_GROUP
Property name of the 'group'static String
PN_LAST_UNPACKED
Property name of the last unpacked datestatic String
PN_LAST_UNPACKED_BY
Property name of the last unpacked user idstatic String
PN_LAST_UNWRAPPED
Property name of the last unwrapped datestatic String
PN_LAST_UNWRAPPED_BY
Property name of the last unwrapped user idstatic String
PN_LAST_WRAPPED
Property name of the last wrapped datestatic String
PN_LAST_WRAPPED_BY
Property name of the last wrapped user idstatic String
PN_LASTMODIFIED
Property name of the last modification datestatic String
PN_LASTMODIFIED_BY
Property name of the last modification user idstatic String
PN_MODE
Property name of the filter rootstatic String
PN_NAME
Property name of the 'name'static String
PN_PATTERN
Property name of the rule patternstatic String
PN_PROPERTY_RULES
Property name of the property filter rulesstatic String
PN_REQUIRES_RESTART
Property name of the "require restart" flagstatic String
PN_REQUIRES_ROOT
Property name of the "requires root" flagstatic String
PN_ROOT
Property name of the filter rootstatic String
PN_RULES
Property name of the path filter rulesstatic String
PN_SUB_PACKAGES
Property name of the sub packages (only used in snapshots)static String
PN_TYPE
Property name of the rule typestatic String
PN_VERSION
Property name of the package version-
Fields 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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
dumpCoverage(@NotNull ProgressTrackerListener listener)
Dumps the coverage of this definition to the given listener@Nullable String
get(@NotNull String name)
Generic method to retrieve a string property of this definition.@Nullable AccessControlHandling
getAccessControlHandling()
Deprecated.UsePackageProperties.getACHandling()
retrieved viagetMetaInf()
andMetaInf.getPackageProperties()
.boolean
getBoolean(@NotNull String name)
Generic method to retrieve a boolean property of this definition.@Nullable Calendar
getCalendar(@NotNull String name)
Generic method to retrieve a date property of this definition.@Nullable Calendar
getLastUnpacked()
Returns the date when the package was unpacked@Nullable String
getLastUnpackedBy()
Returns the user id who unpacked the package@Nullable Calendar
getLastUnwrapped()
Returns the last unwrapped date@Nullable String
getLastUnwrappedBy()
Returns the last unwrapped user id@NotNull MetaInf
getMetaInf()
Returns the meta inf of this package@NotNull Node
getNode()
Returns the underlying nodeboolean
isModified()
Checks if the definition was modified since it was last wrapped.boolean
isUnwrapped()
Checks if this definition is unwrapped, i.e. if the definition structured was extracted from a VaultPackage.void
set(@NotNull String name, boolean value, boolean autoSave)
Generic method to set a boolean property to this definition.void
set(@NotNull String name, @Nullable String value, boolean autoSave)
Generic method to set a string property to this definition.void
set(@NotNull String name, @Nullable Calendar value, boolean autoSave)
Generic method to set a date property to this definition.void
setDependencies(@NotNull Dependency[] dependencies, boolean autoSave)
Sets the dependencies to this definition and stores it in a node representation.void
setFilter(@Nullable WorkspaceFilter filter, boolean autoSave)
Sets the filter to this definition and stores it in a node representation.void
setId(@NotNull PackageId id, boolean autoSave)
Writes the properties derived from the package id to the contentvoid
touch(@Nullable Calendar now, boolean autoSave)
Touches the last modified and last modified by property.void
unwrap(@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 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 path filter rules- See Also:
- Constant Field Values
-
PN_PROPERTY_RULES
static final String PN_PROPERTY_RULES
Property name of the property 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
-
getNode
@NotNull @NotNull Node getNode()
Returns the underlying node- Returns:
- the node
-
setId
void setId(@NotNull @NotNull PackageId id, boolean autoSave)
Writes the properties derived from the package id to the content- Parameters:
id
- the package idautoSave
- iftrue
the 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:
true
if unwrapped.
-
isModified
boolean isModified()
Checks if the definition was modified since it was last wrapped. new packages are considered modified.- Returns:
true
if 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
- iftrue
unwrapping is forcedautoSave
- iftrue
modifications are saved automatically- Throws:
RepositoryException
- if an error occursIOException
- if an I/O error occurs
-
dumpCoverage
void dumpCoverage(@NotNull @NotNull ProgressTrackerListener listener) throws RepositoryException
Dumps the coverage of this definition to the given listener- Parameters:
listener
- the listener- Throws:
RepositoryException
- if an error occurrs
-
setDependencies
void setDependencies(@NotNull @NotNull Dependency[] dependencies, boolean autoSave)
Sets the dependencies to this definition and stores it in a node representation.- Parameters:
dependencies
- the package dependenciesautoSave
- iftrue
the modifications are saved automatically.- Since:
- 3.1.32
-
get
@Nullable @Nullable String get(@NotNull @NotNull String name)
Generic method to retrieve a string property of this definition.- Parameters:
name
- the name of the property.- Returns:
- the property value or
null
if it does not exist.
-
getBoolean
boolean getBoolean(@NotNull @NotNull String name)
Generic method to retrieve a boolean property of this definition.- Parameters:
name
- the name of the property.- Returns:
- the property value or
null
if it does not exist.
-
getCalendar
@Nullable @Nullable Calendar getCalendar(@NotNull @NotNull String name)
Generic method to retrieve a date property of this definition.- Parameters:
name
- the name of the property.- Returns:
- the property value or
null
if it does not exist.
-
set
void set(@NotNull @NotNull String name, @Nullable @Nullable String value, boolean autoSave)
Generic method to set a string property to this definition.- Parameters:
name
- the name of the propertyvalue
- the value ornull
to clear the propertyautoSave
- iftrue
the modifications are saved automatically.
-
set
void set(@NotNull @NotNull String name, @Nullable @Nullable Calendar value, boolean autoSave)
Generic method to set a date property to this definition.- Parameters:
name
- the name of the propertyvalue
- the value ornull
to clear the propertyautoSave
- iftrue
the modifications are saved automatically.
-
set
void set(@NotNull @NotNull 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
- iftrue
the modifications are saved automatically.
-
touch
void touch(@Nullable @Nullable Calendar now, boolean autoSave)
Touches the last modified and last modified by property.- Parameters:
now
- calendar ornull
autoSave
- iftrue
the modifications are saved automatically.
-
setFilter
void setFilter(@Nullable @Nullable WorkspaceFilter filter, boolean autoSave)
Sets the filter to this definition and stores it in a node representation.- Parameters:
filter
- the filter to setautoSave
- iftrue
the modifications are saved automatically.
-
getLastUnwrapped
@Nullable @Nullable Calendar getLastUnwrapped()
Returns the last unwrapped date- Returns:
- the last unwrapped date
-
getLastUnwrappedBy
@Nullable @Nullable String getLastUnwrappedBy()
Returns the last unwrapped user id- Returns:
- the last unwrapped user id
-
getLastUnpacked
@Nullable @Nullable Calendar getLastUnpacked()
Returns the date when the package was unpacked- Returns:
- the unpacked date
-
getLastUnpackedBy
@Nullable @Nullable String getLastUnpackedBy()
Returns the user id who unpacked the package- Returns:
- the unpacked user id
-
getAccessControlHandling
@Nullable @Deprecated @Nullable AccessControlHandling getAccessControlHandling()
Deprecated.UsePackageProperties.getACHandling()
retrieved viagetMetaInf()
andMetaInf.getPackageProperties()
.Returns the access control handling defined in the definition, ornull
if not defined.- Returns:
- the access control handling or
null
- Since:
- 2.3.2
-
getMetaInf
@NotNull @NotNull MetaInf getMetaInf() throws RepositoryException
Returns the meta inf of this package- Returns:
- the meta inf
- Throws:
RepositoryException
- if an error occurs.
-
-