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 AccessControlHandlinggetACHandling()Returns the access control handling defined in this package.longgetBuildCount()Returns the build count of this packageprotected @Nullable PackageIdgetCachedId()CalendargetCreated()Returns the date when this package was built ornullif n/a.StringgetCreatedBy()Returns the user that built this package or null if n/a.CalendargetDateProperty(String name)Returns the date property with the given name ornullif 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.StringgetDescription()Returns a description of this package ornullif n/aMap<String,String>getExternalHooks()StringgetGenerator()Returns the name and version of the component that generated the package.PackageIdgetId()Returns the id of this package ornullif the id can't be determined.CalendargetLastModified()Returns the last modification date ornullif n/a.StringgetLastModifiedBy()Returns the user that last modified the package ornullif n/a.CalendargetLastWrapped()Returns the date when this package was wrapped ornullif n/a.StringgetLastWrappedBy()Returns the user that wrapped this package or null if n/a.@Nullable PackageTypegetPackageType()Returns the package type ornullif no package type was specified for this package.protected abstract PropertiesgetPropertiesMap()StringgetProperty(String name)Returns the property with the given name ornullif it does not exist.SubPackageHandlinggetSubPackageHandling()Returns the sub package handling configurationbooleanrequiresRestart()Returnstrueif this package requires a restart after installation.booleanrequiresRoot()Returnstrueif this package can only be extracted by a admin session.
-
-
-
Method Detail
-
getId
public PackageId getId()
Description copied from interface:PackagePropertiesReturns the id of this package ornullif the id can't be determined.- Specified by:
getIdin interfacePackageProperties- Returns:
- the id of this package.
-
getCachedId
@Nullable protected @Nullable PackageId getCachedId()
-
getLastModified
public Calendar getLastModified()
Returns the last modification date ornullif n/a.- Specified by:
getLastModifiedin interfacePackageProperties- Returns:
- last modification date or
null
-
getLastModifiedBy
public String getLastModifiedBy()
Returns the user that last modified the package ornullif n/a.- Specified by:
getLastModifiedByin interfacePackageProperties- Returns:
- the user or
null
-
getCreated
public Calendar getCreated()
Returns the date when this package was built ornullif n/a.- Specified by:
getCreatedin interfacePackageProperties- Returns:
- the creation date
-
getCreatedBy
public String getCreatedBy()
Returns the user that built this package or null if n/a.- Specified by:
getCreatedByin interfacePackageProperties- Returns:
- the creator
-
getGenerator
public String getGenerator()
Returns the name and version of the component that generated the package.- Specified by:
getGeneratorin interfacePackageProperties- Returns:
- the generator or
nullif n/a
-
getLastWrapped
public Calendar getLastWrapped()
Returns the date when this package was wrapped ornullif n/a.- Specified by:
getLastWrappedin interfacePackageProperties- Returns:
- the wrapped date
-
getLastWrappedBy
public String getLastWrappedBy()
Returns the user that wrapped this package or null if n/a.- Specified by:
getLastWrappedByin interfacePackageProperties- Returns:
- the wrapper
-
getDescription
public String getDescription()
Returns a description of this package ornullif n/a- Specified by:
getDescriptionin interfacePackageProperties- Returns:
- a description
-
getACHandling
public AccessControlHandling getACHandling()
Returns the access control handling defined in this package.- Specified by:
getACHandlingin interfacePackageProperties- Returns:
- the access control handling.
-
getSubPackageHandling
public SubPackageHandling getSubPackageHandling()
Returns the sub package handling configuration- Specified by:
getSubPackageHandlingin interfacePackageProperties- Returns:
- the sub package handling configuration.
-
requiresRoot
public boolean requiresRoot()
Returnstrueif this package can only be extracted by a admin session.- Specified by:
requiresRootin interfacePackageProperties- Returns:
trueif this package requires an admin session for extraction.
-
requiresRestart
public boolean requiresRestart()
Returnstrueif this package requires a restart after installation.- Specified by:
requiresRestartin interfacePackageProperties- Returns:
trueif this package requires a restart after installation.
-
getDependencies
public Dependency[] getDependencies()
Returns an unmodifiable list of dependencies- Specified by:
getDependenciesin 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:
getDependenciesLocationsin interfacePackageProperties- Returns:
- dependencies locations as map
-
getDateProperty
public Calendar getDateProperty(String name)
Returns the date property with the given name ornullif it does not exist or if the value cannot be converted to a date.- Specified by:
getDatePropertyin 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 ornullif it does not exist.- Specified by:
getPropertyin interfacePackageProperties- Parameters:
name- the property name- Returns:
- the property value or
null
-
getPackageType
@Nullable public @Nullable PackageType getPackageType()
Returns the package type ornullif no package type was specified for this package.- Specified by:
getPackageTypein interfacePackageProperties- Returns:
- the package type
-
getExternalHooks
public Map<String,String> getExternalHooks()
- Specified by:
getExternalHooksin interfacePackageProperties- Returns:
- all external hooks registered in a package (key = name, value = fully qualified class name)
-
getBuildCount
public long getBuildCount()
Description copied from interface:PackagePropertiesReturns the build count of this package- Specified by:
getBuildCountin interfacePackageProperties- Returns:
- the build count.
-
getPropertiesMap
protected abstract Properties getPropertiesMap()
-
-