Class DefaultPackageInfo
java.lang.Object
org.apache.jackrabbit.vault.packaging.impl.DefaultPackageInfo
- All Implemented Interfaces:
PackageInfo
Very simple class that reads basic package info from a file.
TODO: take over some logic from
DefaultMetaInf.load(java.io.InputStream, java.lang.String)-
Constructor Summary
ConstructorsConstructorDescriptionDefaultPackageInfo(PackageId id, WorkspaceFilter filter, PackageType packageType) -
Method Summary
Modifier and TypeMethodDescriptionReturns the workspace filtergetId()Returns the package id.Returns the package type.static @Nullable PackageInfoReads the package info from a given file
-
Constructor Details
-
DefaultPackageInfo
-
-
Method Details
-
read
Reads the package info from a given file- Parameters:
file- the package file as zip or an exploded directory containing metadata.- Returns:
- the package info if the package is valid, otherwise
null. - Throws:
IOException- if an error occurs.
-
getId
Returns the package id.- Specified by:
getIdin interfacePackageInfo- Returns:
- the package id.
-
getFilter
Returns the workspace filter- Specified by:
getFilterin interfacePackageInfo- Returns:
- the filter
-
getPackageType
Returns the package type.- Specified by:
getPackageTypein interfacePackageInfo- Returns:
- the package type
-