Class PackagingService
java.lang.Object
org.apache.jackrabbit.vault.packaging.PackagingService
Default access point to package managers for non OSGi clients.
- Since:
- 2.0
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic JcrPackageDefinitioncreatePackageDefinition(Node defNode) Creates a new jcr package definition based on the given node.static PackageManagerReturns a non-repository based package manager.static JcrPackageManagergetPackageManager(Session session) Returns a repository based package manager.static JcrPackageOpens a package that is based on the given node.
-
Constructor Details
-
PackagingService
public PackagingService()
-
-
Method Details
-
getPackageManager
Returns a non-repository based package manager.- Returns:
- the package manager
-
getPackageManager
Returns a repository based package manager.- Parameters:
session- repository session- Returns:
- the package manager
-
createPackageDefinition
Creates a new jcr package definition based on the given node.- Parameters:
defNode- the node- Returns:
- the definition
- Since:
- 2.2.14
-
open
Opens a package that is based on the given node. IfallowInvalidistruealso 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(Node, boolean)which does not create a package manager instance.- Parameters:
node- the underlying nodeallowInvalid- iftrueinvalid packages are openend, too.- Returns:
- the new package or
nullit the package is not valid unlessallowInvalidistrue. - Throws:
RepositoryException- if an error occurs- Since:
- 2.3.0
-