|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface JcrPackageManager
Extends the PackageManager by repository specific operations.
| Method Summary | |
|---|---|
void |
assemble(JcrPackageDefinition definition,
ProgressTrackerListener listener,
OutputStream out)
Assembles a package directly to a output stream |
void |
assemble(JcrPackage pack,
ProgressTrackerListener listener)
Assembles a package. |
void |
assemble(Node packNode,
JcrPackageDefinition definition,
ProgressTrackerListener listener)
Assembles a package. |
JcrPackage |
create(Node folder,
String name)
Creates a new package below the given folder. |
JcrPackage |
create(String group,
String name)
Creates a new package with the new group and name. |
JcrPackage |
create(String group,
String name,
String version)
Creates a new package with the new group, name and version. |
Node |
getPackageRoot()
Returns the configured package root node. |
Node |
getPackageRoot(boolean noCreate)
Returns the configured package root node. |
List<JcrPackage> |
listPackages()
Returns the list of all packages installed below the package root. |
List<JcrPackage> |
listPackages(String group,
boolean built)
Returns the list of all packages installed below the package root that match the given group. |
List<JcrPackage> |
listPackages(WorkspaceFilter filter)
Returns the list of all packages installed below the package root that are included in the filter. |
JcrPackage |
open(Node node)
Opens a package that is based on the given node. |
JcrPackage |
open(Node node,
boolean allowInvalid)
Opens a package that is based on the given node. |
JcrPackage |
open(PackageId id)
Opens a package with the given package id. |
void |
remove(JcrPackage pack)
Removes a package and its snaphost if present. |
JcrPackage |
rename(JcrPackage pack,
String groupId,
String name)
Renames the given package with a new group id and name. |
JcrPackage |
rename(JcrPackage pack,
String groupId,
String name,
String version)
Renames the given package with a new group id, name and version. |
PackageId |
resolve(Dependency dependency,
boolean onlyInstalled)
Finds the id of the package that matches the given dependency best. |
void |
rewrap(JcrPackage pack,
ProgressTrackerListener listener)
Rewraps the package in respect to its underlying definition. |
JcrPackage |
upload(File file,
boolean isTmpFile,
boolean replace,
String nameHint)
Uploads a package. |
JcrPackage |
upload(File file,
boolean isTmpFile,
boolean replace,
String nameHint,
boolean strict)
Uploads a package. |
JcrPackage |
upload(InputStream in,
boolean replace)
Uploads a package. |
JcrPackage |
upload(InputStream in,
boolean replace,
boolean strict)
Uploads a package. |
| Methods inherited from interface com.day.jcr.vault.packaging.PackageManager |
|---|
assemble, assemble, open, open, rewrap, rewrap |
| Method Detail |
|---|
JcrPackage open(PackageId id)
throws RepositoryException
id - the package id.
null it the package does not exist or is not valid.
RepositoryException - if an error occurs
JcrPackage open(Node node)
throws RepositoryException
node - the underlying node
null it the package is not
valid.
RepositoryException - if an error occurs
JcrPackage open(Node node,
boolean allowInvalid)
throws RepositoryException
allowInvalid
is true 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).
node - the underlying nodeallowInvalid - if true invalid packages are openend, too.
null it the package is not
valid unless allowInvalid is true.
RepositoryException - if an error occurs
PackageId resolve(Dependency dependency,
boolean onlyInstalled)
throws RepositoryException
onlyInstalled is true only installed packages are searched.
dependency - dependency informationonlyInstalled - if true only installed packages are searched.
null if not found.
RepositoryException - if an error occurs
JcrPackage upload(File file,
boolean isTmpFile,
boolean replace,
String nameHint)
throws RepositoryException,
IOException
null is returned unless replace is true.
file - package file to uploadisTmpFile - indicates if the given file is a temp file and can be
deleted when the package is closedreplace - if true existing packages are replaced.nameHint - hint for the name if package does not provide one
null if not installed
RepositoryException - if an error occurrs
IOException - if an I/O error occurrs
JcrPackage upload(File file,
boolean isTmpFile,
boolean replace,
String nameHint,
boolean strict)
throws RepositoryException,
IOException
ItemExistsException is thrown unless replace is
true.
file - package file to uploadisTmpFile - indicates if the given file is a temp file and can be
deleted when the package is closedreplace - if true existing packages are replaced.nameHint - hint for the name if package does not provide onestrict - if true import is more strict in regards to errors
RepositoryException - if an error occurrs
IOException - if an I/O error occurrs
JcrPackage upload(InputStream in,
boolean replace)
throws RepositoryException,
IOException
ItemExistsException is thrown unless replace is
true.
in - input stream that provides the content of the package. note that after this method returns,
the input stream is closed in any case.replace - if true existing packages are replaced.
RepositoryException - if an error occurrs
IOException - if an I/O error occurrs
JcrPackage upload(InputStream in,
boolean replace,
boolean strict)
throws RepositoryException,
IOException
ItemExistsException is thrown unless replace is
true.
in - input stream that provides the content of the package. note that after this method returns,
the input stream is closed in any case.replace - if true existing packages are replaced.strict - if true import is more strict in regards to errors
RepositoryException - if an error occurrs
IOException - if an I/O error occurrs
JcrPackage create(Node folder,
String name)
throws RepositoryException,
IOException
folder - parent foldername - name of the new package
RepositoryException - if a repository error occurrs
IOException - if an I/O exception occurs
JcrPackage create(String group,
String name)
throws RepositoryException,
IOException
group - group of the new packagename - name of the new package
RepositoryException - if a repository error occurrs
IOException - if an I/O exception occurs
JcrPackage create(String group,
String name,
String version)
throws RepositoryException,
IOException
group - group of the new packagename - name of the new packageversion - version of the new package; can be null
RepositoryException - if a repository error occurrs
IOException - if an I/O exception occurs
void remove(JcrPackage pack)
throws RepositoryException
pack - the package to remove
RepositoryException - if a repository error occurrs
JcrPackage rename(JcrPackage pack,
String groupId,
String name)
throws PackageException,
RepositoryException
pack - the package to renamegroupId - the new group id or nullname - the new name or null
RepositoryException - if an error occurs
PackageException - if the package is not unwrapped.
JcrPackage rename(JcrPackage pack,
String groupId,
String name,
String version)
throws PackageException,
RepositoryException
pack - the package to renamegroupId - the new group id or nullname - the new name or nullversion - the new version or null
RepositoryException - if an error occurs
PackageException - if the package is not unwrapped.
void assemble(JcrPackage pack,
ProgressTrackerListener listener)
throws PackageException,
RepositoryException,
IOException
pack - the package to assemblelistener - a progress listener
PackageException - if a package error occurs
RepositoryException - if a repository error occurs
IOException - if an I/O error occurs
void assemble(Node packNode,
JcrPackageDefinition definition,
ProgressTrackerListener listener)
throws PackageException,
RepositoryException,
IOException
packNode - the node of the packagedefinition - the definition of the packagelistener - a progress listener
PackageException - if a package error occurs
RepositoryException - if a repository error occurs
IOException - if an I/O error occurs
void assemble(JcrPackageDefinition definition,
ProgressTrackerListener listener,
OutputStream out)
throws IOException,
RepositoryException,
PackageException
definition - the definition of the packagelistener - a progress listenerout - the output stream to write to
RepositoryException - if a repository error occurs
IOException - if an I/O error occurs
PackageException - if a package error occurs
void rewrap(JcrPackage pack,
ProgressTrackerListener listener)
throws PackageException,
RepositoryException,
IOException
pack - the package to rewraplistener - the progress listener
PackageException - if a package error occurs
RepositoryException - if a repository error occurs
IOException - if an I/O error occurs
Node getPackageRoot()
throws RepositoryException
RepositoryException - if an error occurs
Node getPackageRoot(boolean noCreate)
throws RepositoryException
noCreate - do not create missing root if true
null if not present and noCreate is true.
RepositoryException - if an error occurs
List<JcrPackage> listPackages()
throws RepositoryException
RepositoryException - if an error occurs
List<JcrPackage> listPackages(WorkspaceFilter filter)
throws RepositoryException
filter - filter for packages
RepositoryException - if an error occurs
List<JcrPackage> listPackages(String group,
boolean built)
throws RepositoryException
group is null all
packages are returned.
group - the group filterbuilt - if true only packages with size > 0 are listed
RepositoryException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||