public interface PackageManagerClient
Modifier and Type | Method and Description |
---|---|
DetailedResponse |
build(PackId packageId)
Builds the specified package
|
DetailedResponse |
build(PackId packageId,
ResponseProgressListener listener)
Builds the specified package
|
DetailedResponse |
contents(PackId packageId)
Prints the contents of the package to the response
|
DetailedResponse |
contents(PackId packageId,
ResponseProgressListener listener)
Prints the contents of the package to the response
|
SimpleResponse |
create(PackId packageId)
Create a package with the specified packageId
|
SimpleResponse |
delete(PackId packageId)
Delete a package from the server.
|
DownloadResponse |
download(PackId packageId,
File toFile)
Downloads the package identified by
packageId to the absolute path specified by toFile |
DownloadResponse |
downloadToDirectory(PackId packageId,
File toDirectory)
Downloads the package to a qualified relative path under
toDirectory |
DetailedResponse |
dryRun(PackId packageId)
Performs a dryRun of an installation of the specified package
|
DetailedResponse |
dryRun(PackId packageId,
ResponseProgressListener listener)
Performs a dryRun of an installation of the specified package
|
boolean |
existsOnServer(PackId packageId)
Checks if a package with the specified packageId has already been uploaded to the server.
|
String |
getBaseUrl() |
String |
getConsoleUiUrl(PackId packageId)
Return the Console UI Url for the specified package, which is useful for creating HTML links.
|
PackId |
identify(File file)
Identify a CRX package based on its metadata.
|
PackId |
identify(File file,
boolean strict)
Identify a CRX package based on its metadata
|
DetailedResponse |
install(PackId packageId,
boolean recursive,
int autosave,
ACHandling acHandling)
Install a package that has already been uploaded to the server.
|
DetailedResponse |
install(PackId packageId,
boolean recursive,
int autosave,
ACHandling acHandling,
ResponseProgressListener listener)
Install a package that has already been uploaded to the server.
|
ListResponse |
list()
List all packages
|
ListResponse |
list(PackId packageId,
boolean includeVersions)
List one package matching
packageId or many packages matching the package group and name
up to the first hyphen. |
ListResponse |
list(String query)
List all packages and filter by
query |
SimpleResponse |
move(PackId packageId,
PackId moveToId)
Move/Rename a package on the server
|
SimpleResponse |
replicate(PackId packageId)
Replicates the package using the server's default replication agents
|
DetailedResponse |
rewrap(PackId packageId)
Rewraps the specified package
|
DetailedResponse |
rewrap(PackId packageId,
ResponseProgressListener listener)
Rewraps the specified package
|
void |
setRequestTimeout(long requestTimeout)
Set the amount of time in milliseconds to wait for a response for any given
request.
|
void |
setServiceTimeout(long serviceTimeout)
Set the amount of time in milliseconds to wait for service availability,
which may span multiple retry requests.
|
void |
setWaitDelay(long waitDelay)
Set a delay in milliseconds for calls to the
waitForService() method. |
DetailedResponse |
uninstall(PackId packageId)
Uninstalls the specified package
|
DetailedResponse |
uninstall(PackId packageId,
ResponseProgressListener listener)
Uninstalls the specified package
|
SimpleResponse |
updateFilter(PackId packageId,
WspFilter filter)
Update a package definition with the specified
WspFilter |
SimpleResponse |
upload(File file,
boolean force,
PackId packageId)
Upload a package to the server.
|
boolean |
waitForService()
Wait for service availability.
|
void setRequestTimeout(long requestTimeout)
requestTimeout
- timeout in millisecondsvoid setServiceTimeout(long serviceTimeout)
serviceTimeout
- timeout in millisecondsvoid setWaitDelay(long waitDelay)
waitForService()
method.
Increase this value to account for delayed OSGi bundle cycling on the server after
installing packages with embedded bundles.
Set this to a negative number or zero for no delay.waitDelay
- delay in millisecondsString getBaseUrl()
String getConsoleUiUrl(PackId packageId)
packageId
- the PackId
representing the packagePackId identify(File file) throws IOException
file
- a File
representing the packagePackId
object if the file represents a package, or null
otherwiseIOException
- if the file can not be read, or it is not a zip filePackId identify(File file, boolean strict) throws IOException
file
- a File
representing the packagestrict
- set to true to require a META-INF/vault/properties.xml file.PackId
object if the file represents a package, or null
otherwiseIOException
- if the file can not be read, or it is not a zip fileboolean waitForService() throws Exception
Exception
- on timeout, interruption, or IOExceptionboolean existsOnServer(PackId packageId) throws Exception
ListResponse list() throws Exception
Exception
- for unknown errorsListResponse list(String query) throws Exception
query
query
- can be null or empty stringquery
Exception
- for unknown errorsListResponse list(PackId packageId, boolean includeVersions) throws Exception
packageId
or many packages matching the package group and name
up to the first hyphen.packageId
- the PackId
representing the group:name(:version)? to matchincludeVersions
- set to true to match on group:name up to the first hyphen in the "name-version"
string, which effectively matches against all versions of the packageException
- for unknown errorsSimpleResponse upload(File file, boolean force, PackId packageId) throws Exception
file
- the package file to be uploadedforce
- set to true
for the uploaded file to replace an existing package on the
server that has the same id. Has no effect if no existing package is found.packageId
- optional PackId
providing the installation path. If null
,
the file
will be identified and that PackId
will be used.Exception
- for unknown errorsDownloadResponse download(PackId packageId, File toFile) throws Exception
packageId
to the absolute path specified by toFile
DownloadResponse downloadToDirectory(PackId packageId, File toDirectory) throws Exception
toDirectory
SimpleResponse delete(PackId packageId) throws Exception
SimpleResponse replicate(PackId packageId) throws Exception
DetailedResponse contents(PackId packageId) throws Exception
DetailedResponse contents(PackId packageId, ResponseProgressListener listener) throws Exception
DetailedResponse install(PackId packageId, boolean recursive, int autosave, ACHandling acHandling) throws Exception
packageId
- PackId
representing package to be installedrecursive
- set to true
to also install subpackagesautosave
- number of changes between session saves.acHandling
- Access Control Handling value ACHandling
. Unspecified if null
.Exception
- for unknown errorsDetailedResponse install(PackId packageId, boolean recursive, int autosave, ACHandling acHandling, ResponseProgressListener listener) throws Exception
packageId
- PackId
representing package to be installedrecursive
- set to true
to also install subpackagesautosave
- number of changes between session saves.acHandling
- Access Control Handling value ACHandling
. Unspecified if null
.listener
- response progress listenerException
- for unknown errorsDetailedResponse dryRun(PackId packageId) throws Exception
DetailedResponse dryRun(PackId packageId, ResponseProgressListener listener) throws Exception
SimpleResponse create(PackId packageId) throws Exception
SimpleResponse updateFilter(PackId packageId, WspFilter filter) throws Exception
WspFilter
SimpleResponse move(PackId packageId, PackId moveToId) throws Exception
DetailedResponse build(PackId packageId) throws Exception
DetailedResponse build(PackId packageId, ResponseProgressListener listener) throws Exception
DetailedResponse rewrap(PackId packageId) throws Exception
DetailedResponse rewrap(PackId packageId, ResponseProgressListener listener) throws Exception
DetailedResponse uninstall(PackId packageId) throws Exception
DetailedResponse uninstall(PackId packageId, ResponseProgressListener listener) throws Exception
Copyright © 2013-2017. All Rights Reserved.