|
jBPM Designer - Backend 6.0.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jbpm.designer.repository.guvnor.GuvnorRepository
@Alternative public class GuvnorRepository
Repository implementation that is using Guvnor as a storage
Constructor Summary | |
---|---|
GuvnorRepository()
|
Method Summary | |
---|---|
boolean |
assetExists(String assetUniqueId)
Examines repository if asset given by the assetUniqueId exists |
boolean |
copyAsset(String uniqueId,
String location)
Copy asset given by uniqueId into destination given by location |
boolean |
copyDirectory(String uniqueId,
String location)
Copy directory given by uniqueId into destination given by location |
String |
createAsset(Asset asset)
Stores given asset in the repository. |
Directory |
createDirectory(String location)
Stores new directory in given location, in case of sub folders existence in the location all sub folders are created as well. |
boolean |
deleteAsset(String assetUniqueId)
Deletes asset from repository identified by assetUniqueId if exists |
boolean |
deleteAssetFromPath(String path)
Deletes asset from repository given by the path if exists |
boolean |
deleteDirectory(String directory,
boolean failIfNotEmpty)
Deletes directory from repository including its content NOTE: Directory should be always relative to the repository root |
boolean |
directoryExists(String directory)
Examines repository if given directory exists in the repository NOTE: Directory should be always relative to the repository root |
String |
getName()
Returns name used to identify this repository. |
Collection<Asset> |
listAssets(String location)
Retrieves all assets stored in the given location. |
Collection<Asset> |
listAssets(String location,
Filter filter)
Retrieves all assets stored in the given location. |
Collection<Asset> |
listAssetsRecursively(String startAt,
Filter filter)
Retrieves all directories stored under startAt location including all sub folders. |
Collection<Directory> |
listDirectories(String startAt)
Retrieves all directories stored under startAt location. |
Asset |
loadAsset(String assetUniqueId)
Loads an asset given by the assetUniqueId including actual content of the asset. |
Asset |
loadAssetFromPath(String path)
Loads an asset given by the path including actual content of the asset. |
boolean |
moveAsset(String uniqueId,
String location,
String name)
Moves asset given by uniqueId into destination given by location
and renames it with given name |
boolean |
moveDirectory(String uniqueId,
String location,
String name)
Moves directory given by uniqueId into destination given by location
and renames it with given name |
String |
updateAsset(Asset asset,
String commitMessage)
Updates content of the asset |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GuvnorRepository()
Method Detail |
---|
public String getName()
Repository
getName
in interface Repository
public Collection<Directory> listDirectories(String startAt)
Repository
startAt
location.
NOTE: Directory should be always relative to the repository root
listDirectories
in interface Repository
startAt
- - location where directories should be fetched from
public Collection<Asset> listAssetsRecursively(String startAt, Filter filter)
Repository
startAt
location including all sub folders.
NOTE: Directory should be always relative to the repository root
listAssetsRecursively
in interface Repository
startAt
- - location where directories should be fetched fromfilter
- - filter that allows to narrow the results
public Directory createDirectory(String location)
Repository
createDirectory
in interface Repository
location
- - location in the repository to be created
public boolean directoryExists(String directory)
Repository
directoryExists
in interface Repository
directory
- - directory to check
public boolean deleteDirectory(String directory, boolean failIfNotEmpty)
Repository
deleteDirectory
in interface Repository
directory
- - directory to be deletedfailIfNotEmpty
- - indicates if delete operation should fail in case given directory is not empty
public boolean copyDirectory(String uniqueId, String location)
Repository
uniqueId
into destination given by location
copyDirectory
in interface Repository
uniqueId
- - source directory path relative to repository rootlocation
- - destination where directory will be copied to
public boolean moveDirectory(String uniqueId, String location, String name)
Repository
uniqueId
into destination given by location
and renames it with given name
moveDirectory
in interface Repository
uniqueId
- - source directory path relative to repository rootlocation
- - final destination where directory should be moved toname
- - name of the directory after move, if null is given name is not changed
public Collection<Asset> listAssets(String location)
Repository
listAssets
in interface Repository
location
- - location that assets should be collected from
public Collection<Asset> listAssets(String location, Filter filter)
Repository
listAssets
in interface Repository
location
- - location that assets should be collected fromfilter
- - allows to defined filter criteria to fetch only assets of interest
public Asset loadAsset(String assetUniqueId) throws AssetNotFoundException
Repository
assetUniqueId
including actual content of the asset.
loadAsset
in interface Repository
assetUniqueId
- - unique identifier of the asset to load
AssetNotFoundException
- - throws in case of asset given by id does not existpublic Asset loadAssetFromPath(String path) throws AssetNotFoundException
Repository
path
including actual content of the asset.
loadAssetFromPath
in interface Repository
path
- - complete path of the asset to load (relative to the repository root)
AssetNotFoundException
- - throws in case of asset given by id does not existpublic String createAsset(Asset asset)
Repository
asset
need to have all meta data and content available
for the operation to successfully complete.
createAsset
in interface Repository
asset
- - asset to be stored
public String updateAsset(Asset asset, String commitMessage) throws AssetNotFoundException
Repository
updateAsset
in interface Repository
asset
- - asset to be stored with new content in it, all other data (like name, location) should be same
AssetNotFoundException
- - throws in case of asset given by id does not existpublic boolean deleteAsset(String assetUniqueId)
Repository
assetUniqueId
if exists
deleteAsset
in interface Repository
assetUniqueId
- - unique identifier of the asset
public boolean deleteAssetFromPath(String path)
Repository
path
if exists
deleteAssetFromPath
in interface Repository
path
- - complete path of the asset to delete
public boolean assetExists(String assetUniqueId)
Repository
assetUniqueId
exists
assetExists
in interface Repository
assetUniqueId
- - unique identifier of the asset
public boolean copyAsset(String uniqueId, String location)
Repository
uniqueId
into destination given by location
copyAsset
in interface Repository
uniqueId
- - source asset unique idlocation
- - destination where asset will be copied to
public boolean moveAsset(String uniqueId, String location, String name)
Repository
uniqueId
into destination given by location
and renames it with given name
moveAsset
in interface Repository
uniqueId
- - source asset unique idlocation
- - final destination where asset should be moved toname
- - name of the asset after move, if null is given name is not changed
|
jBPM Designer - Backend 6.0.3-SNAPSHOT | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |