| org.enhydra.shark.api.client.wfservice.PackageAdministration
All known Subclasses: org.enhydra.shark.ws.PackageAdministrationWrapper, org.enhydra.shark.PackageAdmin,
PackageAdministration | public interface PackageAdministration (Code) | | Interface used to perform some administrative operations related to packages (XPDLs).
author: Sasa Bojanic author: Vladimir Puskas |
Method Summary | |
void | clearXPDLCache(WMSessionHandle shandle) Clears XPDL caches. | WMEntityIterator | closeAllPackagesForId(WMSessionHandle shandle, String id) Allows administrator to unload all package versions with the given id from shark.
After successful unload, there will no longer be possible to instantiate processes
from definitions that were contained within that package.
Parameters: id - The id of package that is loaded into engine, and has to be closed. throws: Exception - If something unexpected happens. | WMEntity | closePackage(WMSessionHandle shandle, String id, String ver) Allows administrator to unload the package with the given id and given version from
shark. | String | getCurrentPackageVersion(WMSessionHandle shandle, String pkgId) Returns the current version of the package.
Parameters: pkgId - Id of package which current version we want to know. | String[] | getOpenedPackageIds(WMSessionHandle shandle) Returns an array of strings representing Ids of packages that are loaded into
engine. | byte[] | getPackageContent(WMSessionHandle shandle, String pkgId, String pkgVer) Returns the content of XPDL file containing package definition with the given Id and
version as an array of bytes. | WMEntity | getPackageEntity(WMSessionHandle shandle, String pkgId, String pkgVer) Returns the WMEntity representing package definition with the given Id and version.
The package has to be loaded into shark engine.
If version parameter is an empty string or null, method returns the content of the
current version of XPDL.
Parameters: pkgId - Id of package which XPDL file content has to be returned. Parameters: pkgVer - The version of package which XPDL file content has to be returned. | String[] | getPackageVersions(WMSessionHandle shandle, String pkgId) Returns an array of strings representing versions of package with given Id that are
loaded into engine. | boolean | isPackageOpened(WMSessionHandle shandle, String pkgId) Returns true if package with the given Id is loaded into engine.
Parameters: pkgId - Id of package to be tested if it is loaded into engine. | boolean | isPackageReferenced(WMSessionHandle shandle, String pkgId) Returns information if the current version of package with given id, that is loaded
into engine, is referenced from other package (as an external package) that is also
loaded into engine.
Parameters: pkgId - The Id of package we want to check if it is referenced. | WMEntity | openPackage(WMSessionHandle shandle, String absolutePath) Allows administrator to load a package that is defined in XPDL file which path is
given as a parameter. | void | refreshXPDLCache(WMSessionHandle shandle) Synchronizes XPDL caches with the repository state. | void | synchronizeXPDLCache(WMSessionHandle shandle) Synchronizes XPDL caches with the repository state. | WMEntity | updatePackage(WMSessionHandle shandle, String id, byte[] schemaContent) Allows administrator to update a package that is loaded into shark and has the given
id, with the package which XPDL representation is provided as a given byte[]. | WMEntity | updatePackageFromFile(WMSessionHandle shandle, String id, String absolutePathToNewPackage) Allows administrator to update a package that is loaded into shark and has the given
id, with the package that can be found in XPDL file that is placed at given path.
After successful update, every process that has already been instantiated from the
process definitions contained within the package will continue its execution based
on old definition, but one can instantiate processes based on new (updated) process
definition.
Parameters: id - The id of package that is loaded into engine, and has to be updated. Parameters: absolutePathToNewPackage - path of XPDL file containing the 'updater' package throws: Exception - If something unexpected happens. | WMEntity | uploadPackage(WMSessionHandle shandle, byte[] schemaContent) Allows administrator to load a package that is defined as byte[] representation of
Package's XPDL schema. | WMEntity | uploadPackages(WMSessionHandle shandle, byte[][] schemaContents) Allows administrator to load a packages that are defined as byte[] representation of
Packages' XPDL schemas. |
clearXPDLCache | void clearXPDLCache(WMSessionHandle shandle) throws Exception(Code) | | Clears XPDL caches. After clearing caches, first time some XPDL instance is
required, the cache is being filled with all instances that exist in DB.
throws: Exception - If something unexpected happens. |
closeAllPackagesForId | WMEntityIterator closeAllPackagesForId(WMSessionHandle shandle, String id) throws Exception(Code) | | Allows administrator to unload all package versions with the given id from shark.
After successful unload, there will no longer be possible to instantiate processes
from definitions that were contained within that package.
Parameters: id - The id of package that is loaded into engine, and has to be closed. throws: Exception - If something unexpected happens. PackageInUse exception is thrownif this package is used by any other package that references it as anexternal package, and is also loaded into engine,PackageHasActiveProcesses is thrown if there are processes written ininstance persistence repository, that are instantiated from processdefinitions contained within package we want to unload. |
closePackage | WMEntity closePackage(WMSessionHandle shandle, String id, String ver) throws Exception(Code) | | Allows administrator to unload the package with the given id and given version from
shark. After successful unload, there will no longer be possible to instantiate
processes from definitions that were contained within that package.
If version parameter is an empty string or null, all the versions for the given id
will be unloaded if possible (otherwise, exception will be thrown).
Parameters: id - The id of package that is loaded into engine, and has to be closed. throws: Exception - If something unexpected happens. PackageInUse exception is thrownif this package is used by any other package that references it as anexternal package, and is also loaded into engine,PackageHasActiveProcesses is thrown if there are processes written ininstance persistence repository, that are instantiated from processdefinitions contained within package we want to unload. |
getCurrentPackageVersion | String getCurrentPackageVersion(WMSessionHandle shandle, String pkgId) throws Exception(Code) | | Returns the current version of the package.
Parameters: pkgId - Id of package which current version we want to know. the current package version throws: Exception - If something unexpected happens. |
getOpenedPackageIds | String[] getOpenedPackageIds(WMSessionHandle shandle) throws Exception(Code) | | Returns an array of strings representing Ids of packages that are loaded into
engine.
Array of package Ids that are loaded into engine. throws: Exception - If something unexpected happens. |
getPackageContent | byte[] getPackageContent(WMSessionHandle shandle, String pkgId, String pkgVer) throws Exception(Code) | | Returns the content of XPDL file containing package definition with the given Id and
version as an array of bytes. The package has to be loaded into shark engine.
If version parameter is an empty string or null, method returns the content of the
current version of XPDL.
Parameters: pkgId - Id of package which XPDL file content has to be returned. Parameters: pkgVer - The version of package which XPDL file content has to be returned. Content of XPDL file. throws: Exception - If something unexpected happens. |
getPackageEntity | WMEntity getPackageEntity(WMSessionHandle shandle, String pkgId, String pkgVer) throws Exception(Code) | | Returns the WMEntity representing package definition with the given Id and version.
The package has to be loaded into shark engine.
If version parameter is an empty string or null, method returns the content of the
current version of XPDL.
Parameters: pkgId - Id of package which XPDL file content has to be returned. Parameters: pkgVer - The version of package which XPDL file content has to be returned. WMEntity representing XPDL file. throws: Exception - If something unexpected happens. |
getPackageVersions | String[] getPackageVersions(WMSessionHandle shandle, String pkgId) throws Exception(Code) | | Returns an array of strings representing versions of package with given Id that are
loaded into engine.
Array of versions of package with given Id that are loaded into engine. throws: Exception - If something unexpected happens. |
isPackageOpened | boolean isPackageOpened(WMSessionHandle shandle, String pkgId) throws Exception(Code) | | Returns true if package with the given Id is loaded into engine.
Parameters: pkgId - Id of package to be tested if it is loaded into engine. true if package with the given Id is loaded into engine, otherwuse false. throws: Exception - If something unexpected happens. |
isPackageReferenced | boolean isPackageReferenced(WMSessionHandle shandle, String pkgId) throws Exception(Code) | | Returns information if the current version of package with given id, that is loaded
into engine, is referenced from other package (as an external package) that is also
loaded into engine.
Parameters: pkgId - The Id of package we want to check if it is referenced. true if package is referenced from other package, otherwise false. throws: Exception - If something unexpected happens. |
openPackage | WMEntity openPackage(WMSessionHandle shandle, String absolutePath) throws Exception(Code) | | Allows administrator to load a package that is defined in XPDL file which path is
given as a parameter. After the package is loaded into shark engine, the processes
can be instantiated from process definitions that are contained within the package.
Parameters: absolutePath - path of package XPDL file to open The id of package that is going to be opened. throws: Exception - If something unexpected happens. PackageInvalid exception isthrown if package that user wants to open hadn't passed shark'svalidation process and ExternalPackageInvalid is thrown if package thatuser wants to open has a external package, and this external packagehadn't passed shark's validation. |
refreshXPDLCache | void refreshXPDLCache(WMSessionHandle shandle) throws Exception(Code) | | Synchronizes XPDL caches with the repository state. It is supposed to be used in
scenario when there are several VMs using shark, and when one of them loads new XPDL
or updates existing.
It first clears all instances from the cache, and then checks for all XPDLs in
repository, and loads them into cache.
Note: for better performance, use #synchronizeXPDLCache method.
throws: Exception - If something unexpected happens. |
synchronizeXPDLCache | void synchronizeXPDLCache(WMSessionHandle shandle) throws Exception(Code) | | Synchronizes XPDL caches with the repository state. It is supposed to be used in
scenario when there are several VMs using shark, and when one of them loads new XPDL
or updates existing.
It checks for all XPDLs in repository, and compares it against the cached ones, and
determines which cached instances should be removed from cache permanently, which
new instances should be loaded, and which old instances should be reloaded (because
the change of their external package instance).
throws: Exception - If something unexpected happens. |
updatePackage | WMEntity updatePackage(WMSessionHandle shandle, String id, byte[] schemaContent) throws Exception(Code) | | Allows administrator to update a package that is loaded into shark and has the given
id, with the package which XPDL representation is provided as a given byte[]. After
successful update, every process that has already been instantiated from the process
definitions contained within the package will continue its execution based on old
definition, but one can instantiate processes based on new (updated) process
definition.
Parameters: id - The id of package that is loaded into engine, and has to be updated. Parameters: schemaContent - byte[] representation of XPDL schema defining a Package throws: Exception - If something unexpected happens. PackageUpdateNotAllowed is thrownif package update is currently not allowed, PackageInvalid exception isthrown if package that user wants to open hadn't passed shark'svalidation process and ExternalPackageInvalid is thrown if package thatuser wants to open has a external package, and this external packagehadn't passed shark's validation. |
updatePackageFromFile | WMEntity updatePackageFromFile(WMSessionHandle shandle, String id, String absolutePathToNewPackage) throws Exception(Code) | | Allows administrator to update a package that is loaded into shark and has the given
id, with the package that can be found in XPDL file that is placed at given path.
After successful update, every process that has already been instantiated from the
process definitions contained within the package will continue its execution based
on old definition, but one can instantiate processes based on new (updated) process
definition.
Parameters: id - The id of package that is loaded into engine, and has to be updated. Parameters: absolutePathToNewPackage - path of XPDL file containing the 'updater' package throws: Exception - If something unexpected happens. PackageUpdateNotAllowed is thrownif package update is currently not allowed, PackageInvalid exception isthrown if package that user wants to open hadn't passed shark'svalidation process and ExternalPackageInvalid is thrown if package thatuser wants to open has a external package, and this external packagehadn't passed shark's validation. |
uploadPackage | WMEntity uploadPackage(WMSessionHandle shandle, byte[] schemaContent) throws Exception(Code) | | Allows administrator to load a package that is defined as byte[] representation of
Package's XPDL schema. After the package is loaded into shark engine, the processes
can be instantiated from process definitions that are contained within the package.
Parameters: schemaContent - byte[] representation of the Package's XPDL schema The id of package that is going to be opened. throws: Exception - If something unexpected happens. PackageInvalid exception isthrown if package that user wants to open hadn't passed shark'svalidation process and ExternalPackageInvalid is thrown if package thatuser wants to open has a external package, and this external packagehadn't passed shark's validation. |
uploadPackages | WMEntity uploadPackages(WMSessionHandle shandle, byte[][] schemaContents) throws Exception(Code) | | Allows administrator to load a packages that are defined as byte[] representation of
Packages' XPDL schemas. After the package is loaded into shark engine, the processes
can be instantiated from process definitions that are contained within the package.
Parameters: schemaContents - List of byte[] representation of the Packages' XPDL schemas The id of the main package that is going to be opened. throws: Exception - If something unexpected happens. PackageInvalid exception isthrown if package that user wants to open hadn't passed shark'svalidation process and ExternalPackageInvalid is thrown if package thatuser wants to open has a external package, and this external packagehadn't passed shark's validation. |
|
|