Interface Packaging
-
@ProviderType public interface Packaging
Default access point to package managers.- Since:
- 2.4.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description JcrPackageDefinition
createPackageDefinition(Node defNode)
Creates a new jcr package definition based on the given node.PackageManager
getPackageManager()
Returns a non-repository based package manager.JcrPackageManager
getPackageManager(Session session)
Returns a repository based package manager.JcrPackage
open(Node node, boolean allowInvalid)
Opens a package that is based on the given node.
-
-
-
Method Detail
-
getPackageManager
PackageManager getPackageManager()
Returns a non-repository based package manager.- Returns:
- the package manager
-
getPackageManager
JcrPackageManager getPackageManager(Session session)
Returns a repository based package manager.- Parameters:
session
- repository session- Returns:
- the package manager
-
createPackageDefinition
JcrPackageDefinition createPackageDefinition(Node defNode)
Creates a new jcr package definition based on the given node.- Parameters:
defNode
- the node- Returns:
- the definition
-
open
JcrPackage open(Node node, boolean allowInvalid) throws RepositoryException
Opens a package that is based on the given node. IfallowInvalid
istrue
also invalid packages are returned, but only if the node is file like (i.e. is nt:hierarchyNode and has a jcr:content/jcr:data property). This is a shortcut version ofJcrPackageManager.open(javax.jcr.Node, boolean)
which does not create a package manager instance.- Parameters:
node
- the underlying nodeallowInvalid
- iftrue
invalid packages are opened, too.- Returns:
- the new package or
null
it the package is not valid unlessallowInvalid
istrue
. - Throws:
RepositoryException
- if an error occurs- Since:
- 2.3.0
-
-