Class PackagePropertiesImpl
- java.lang.Object
-
- org.apache.jackrabbit.vault.packaging.impl.PackagePropertiesImpl
-
- All Implemented Interfaces:
PackageProperties
- Direct Known Subclasses:
DefaultPackageProperties
,FsPackageProperties
,HollowVaultPackage
,JcrPackageProperties
,ZipVaultPackage
public abstract class PackagePropertiesImpl extends Object implements PackageProperties
package properties abstraction
-
-
Field Summary
-
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
-
-
Constructor Summary
Constructors Constructor Description PackagePropertiesImpl()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description AccessControlHandling
getACHandling()
Returns the access control handling defined in this package.long
getBuildCount()
Returns the build count of this packageprotected @Nullable PackageId
getCachedId()
Calendar
getCreated()
Returns the date when this package was built ornull
if n/a.String
getCreatedBy()
Returns the user that built this package or null if n/a.Calendar
getDateProperty(String name)
Returns the date property with the given name ornull
if it does not exist or if the value cannot be converted to a date.Dependency[]
getDependencies()
Returns an unmodifiable list of dependenciesMap<PackageId,URI>
getDependenciesLocations()
Returns a map of dependency locations where key = package id and value = uri of package dependency with that id.String
getDescription()
Returns a description of this package ornull
if n/aMap<String,String>
getExternalHooks()
String
getGenerator()
Returns the name and version of the component that generated the package.PackageId
getId()
Returns the id of this package ornull
if the id can't be determined.Calendar
getLastModified()
Returns the last modification date ornull
if n/a.String
getLastModifiedBy()
Returns the user that last modified the package ornull
if n/a.Calendar
getLastWrapped()
Returns the date when this package was wrapped ornull
if n/a.String
getLastWrappedBy()
Returns the user that wrapped this package or null if n/a.@Nullable PackageType
getPackageType()
Returns the package type ornull
if no package type was specified for this package.protected abstract Properties
getPropertiesMap()
String
getProperty(String name)
Returns the property with the given name ornull
if it does not exist.SubPackageHandling
getSubPackageHandling()
Returns the sub package handling configurationboolean
requiresRestart()
Returnstrue
if this package requires a restart after installation.boolean
requiresRoot()
Returnstrue
if this package can only be extracted by a admin session.
-
-
-
Method Detail
-
getId
public PackageId getId()
Description copied from interface:PackageProperties
Returns the id of this package ornull
if the id can't be determined.- Specified by:
getId
in interfacePackageProperties
- Returns:
- the id of this package.
-
getCachedId
@Nullable protected @Nullable PackageId getCachedId()
-
getLastModified
public Calendar getLastModified()
Returns the last modification date ornull
if n/a.- Specified by:
getLastModified
in interfacePackageProperties
- Returns:
- last modification date or
null
-
getLastModifiedBy
public String getLastModifiedBy()
Returns the user that last modified the package ornull
if n/a.- Specified by:
getLastModifiedBy
in interfacePackageProperties
- Returns:
- the user or
null
-
getCreated
public Calendar getCreated()
Returns the date when this package was built ornull
if n/a.- Specified by:
getCreated
in interfacePackageProperties
- Returns:
- the creation date
-
getCreatedBy
public String getCreatedBy()
Returns the user that built this package or null if n/a.- Specified by:
getCreatedBy
in interfacePackageProperties
- Returns:
- the creator
-
getGenerator
public String getGenerator()
Returns the name and version of the component that generated the package.- Specified by:
getGenerator
in interfacePackageProperties
- Returns:
- the generator or
null
if n/a
-
getLastWrapped
public Calendar getLastWrapped()
Returns the date when this package was wrapped ornull
if n/a.- Specified by:
getLastWrapped
in interfacePackageProperties
- Returns:
- the wrapped date
-
getLastWrappedBy
public String getLastWrappedBy()
Returns the user that wrapped this package or null if n/a.- Specified by:
getLastWrappedBy
in interfacePackageProperties
- Returns:
- the wrapper
-
getDescription
public String getDescription()
Returns a description of this package ornull
if n/a- Specified by:
getDescription
in interfacePackageProperties
- Returns:
- a description
-
getACHandling
public AccessControlHandling getACHandling()
Returns the access control handling defined in this package.- Specified by:
getACHandling
in interfacePackageProperties
- Returns:
- the access control handling.
-
getSubPackageHandling
public SubPackageHandling getSubPackageHandling()
Returns the sub package handling configuration- Specified by:
getSubPackageHandling
in interfacePackageProperties
- Returns:
- the sub package handling configuration.
-
requiresRoot
public boolean requiresRoot()
Returnstrue
if this package can only be extracted by a admin session.- Specified by:
requiresRoot
in interfacePackageProperties
- Returns:
true
if this package requires an admin session for extraction.
-
requiresRestart
public boolean requiresRestart()
Returnstrue
if this package requires a restart after installation.- Specified by:
requiresRestart
in interfacePackageProperties
- Returns:
true
if this package requires a restart after installation.
-
getDependencies
public Dependency[] getDependencies()
Returns an unmodifiable list of dependencies- Specified by:
getDependencies
in interfacePackageProperties
- Returns:
- list of dependencies
-
getDependenciesLocations
public Map<PackageId,URI> getDependenciesLocations()
Returns a map of dependency locations where key = package id and value = uri of package dependency with that id.- Specified by:
getDependenciesLocations
in interfacePackageProperties
- Returns:
- dependencies locations as map
-
getDateProperty
public Calendar getDateProperty(String name)
Returns the date property with the given name ornull
if it does not exist or if the value cannot be converted to a date.- Specified by:
getDateProperty
in interfacePackageProperties
- Parameters:
name
- the property name- Returns:
- the property value or
null
-
getProperty
public String getProperty(String name)
Returns the property with the given name ornull
if it does not exist.- Specified by:
getProperty
in interfacePackageProperties
- Parameters:
name
- the property name- Returns:
- the property value or
null
-
getPackageType
@Nullable public @Nullable PackageType getPackageType()
Returns the package type ornull
if no package type was specified for this package.- Specified by:
getPackageType
in interfacePackageProperties
- Returns:
- the package type
-
getExternalHooks
public Map<String,String> getExternalHooks()
- Specified by:
getExternalHooks
in interfacePackageProperties
- Returns:
- all external hooks registered in a package (key = name, value = fully qualified class name)
-
getBuildCount
public long getBuildCount()
Description copied from interface:PackageProperties
Returns the build count of this package- Specified by:
getBuildCount
in interfacePackageProperties
- Returns:
- the build count.
-
getPropertiesMap
protected abstract Properties getPropertiesMap()
-
-