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 from DefaultMetaInf.load(java.io.InputStream, java.lang.String)
  • Constructor Details

  • Method Details

    • 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 interface PackageInfo
      Returns:
      the package id.
    • getFilter

      public WorkspaceFilter getFilter()
      Returns the workspace filter
      Specified by:
      getFilter in interface PackageInfo
      Returns:
      the filter
    • getPackageType

      public PackageType getPackageType()
      Returns the package type.
      Specified by:
      getPackageType in interface PackageInfo
      Returns:
      the package type