Class DefaultPackageInfo
- java.lang.Object
-
- org.apache.jackrabbit.vault.packaging.impl.DefaultPackageInfo
-
- All Implemented Interfaces:
PackageInfo
public class DefaultPackageInfo extends Object implements PackageInfo
Very simple class that reads basic package info from a file. TODO: take over some logic fromDefaultMetaInf.load(java.io.InputStream, java.lang.String)
-
-
Constructor Summary
Constructors Constructor Description DefaultPackageInfo(PackageId id, WorkspaceFilter filter, PackageType packageType)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description WorkspaceFilter
getFilter()
Returns the workspace filterPackageId
getId()
Returns the package id.PackageType
getPackageType()
Returns the package type.static @Nullable PackageInfo
read(@NotNull File file)
Reads the package info from a given file
-
-
-
Constructor Detail
-
DefaultPackageInfo
public DefaultPackageInfo(PackageId id, WorkspaceFilter filter, PackageType packageType)
-
-
Method Detail
-
read
@Nullable public static @Nullable PackageInfo read(@NotNull @NotNull File file) throws IOException
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
public PackageId getId()
Returns the package id.- Specified by:
getId
in interfacePackageInfo
- Returns:
- the package id.
-
getFilter
public WorkspaceFilter getFilter()
Returns the workspace filter- Specified by:
getFilter
in interfacePackageInfo
- Returns:
- the filter
-
getPackageType
public PackageType getPackageType()
Returns the package type.- Specified by:
getPackageType
in interfacePackageInfo
- Returns:
- the package type
-
-