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 WorkspaceFiltergetFilter()Returns the workspace filterPackageIdgetId()Returns the package id.PackageTypegetPackageType()Returns the package type.static @Nullable PackageInforead(@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:
getIdin interfacePackageInfo- Returns:
- the package id.
-
getFilter
public WorkspaceFilter getFilter()
Returns the workspace filter- Specified by:
getFilterin interfacePackageInfo- Returns:
- the filter
-
getPackageType
public PackageType getPackageType()
Returns the package type.- Specified by:
getPackageTypein interfacePackageInfo- Returns:
- the package type
-
-