Class JcrRegisteredPackage
- java.lang.Object
-
- org.apache.jackrabbit.vault.packaging.registry.impl.JcrRegisteredPackage
-
- All Implemented Interfaces:
AutoCloseable
,Comparable<RegisteredPackage>
,RegisteredPackage
public class JcrRegisteredPackage extends Object implements RegisteredPackage
JcrRegisteredPackage
...
-
-
Constructor Summary
Constructors Constructor Description JcrRegisteredPackage(JcrPackage pkg)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
Closes this package and releases underlying data.int
compareTo(RegisteredPackage o)
Dependency[]
getDependencies()
Returns the dependencies of this package@NotNull PackageId
getId()
Returns the id of this package@Nullable Calendar
getInstallationTime()
Returns the date when the package was installedJcrPackage
getJcrPackage()
@NotNull VaultPackage
getPackage()
Returns the vault package stored in the data of this packagePackageProperties
getPackageProperties()
Returns thePackageProperties
of this packagelong
getSize()
Returns the size of the underlying package.WorkspaceFilter
getWorkspaceFilter()
Returns theWorkspaceFilter
of this packageboolean
isInstalled()
Checks if this package is installed.
-
-
-
Constructor Detail
-
JcrRegisteredPackage
public JcrRegisteredPackage(JcrPackage pkg) throws IOException, RepositoryException
- Throws:
IOException
RepositoryException
-
-
Method Detail
-
getJcrPackage
public JcrPackage getJcrPackage()
-
getId
@NotNull public @NotNull PackageId getId()
Description copied from interface:RegisteredPackage
Returns the id of this package- Specified by:
getId
in interfaceRegisteredPackage
- Returns:
- the id of this package.
-
getPackage
@NotNull public @NotNull VaultPackage getPackage() throws IOException
Description copied from interface:RegisteredPackage
Returns the vault package stored in the data of this package- Specified by:
getPackage
in interfaceRegisteredPackage
- Returns:
- the package
- Throws:
IOException
- if an I/O error occurs
-
isInstalled
public boolean isInstalled()
Description copied from interface:RegisteredPackage
Checks if this package is installed.- Specified by:
isInstalled
in interfaceRegisteredPackage
- Returns:
true
if this package is installed.
-
getSize
public long getSize()
Description copied from interface:RegisteredPackage
Returns the size of the underlying package.- Specified by:
getSize
in interfaceRegisteredPackage
- Returns:
- the size in bytes
-
getInstallationTime
@Nullable public @Nullable Calendar getInstallationTime()
Description copied from interface:RegisteredPackage
Returns the date when the package was installed- Specified by:
getInstallationTime
in interfaceRegisteredPackage
- Returns:
- the installed date or
null
if not installed.
-
close
public void close()
Description copied from interface:RegisteredPackage
Closes this package and releases underlying data.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceRegisteredPackage
-
compareTo
public int compareTo(RegisteredPackage o)
- Specified by:
compareTo
in interfaceComparable<RegisteredPackage>
-
getDependencies
public Dependency[] getDependencies()
Description copied from interface:RegisteredPackage
Returns the dependencies of this package- Specified by:
getDependencies
in interfaceRegisteredPackage
- Returns:
- the dependencies of this package.
-
getWorkspaceFilter
public WorkspaceFilter getWorkspaceFilter()
Description copied from interface:RegisteredPackage
Returns theWorkspaceFilter
of this package- Specified by:
getWorkspaceFilter
in interfaceRegisteredPackage
- Returns:
WorkspaceFilter
of this package
-
getPackageProperties
public PackageProperties getPackageProperties() throws IOException
Description copied from interface:RegisteredPackage
Returns thePackageProperties
of this package- Specified by:
getPackageProperties
in interfaceRegisteredPackage
- Returns:
PackageProperties
of this package- Throws:
IOException
- if an I/O error occurs
-
-