|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drools.brms.server.ServiceImplementation
@Name(value="org.drools.brms.client.rpc.RepositoryService") @AutoCreate public class ServiceImplementation
This is the implementation of the repository service to drive the GWT based front end.
Field Summary | |
---|---|
RulesRepository |
repository
|
Constructor Summary | |
---|---|
ServiceImplementation()
|
Method Summary | |
---|---|
BuilderResult[] |
buildAsset(RuleAsset asset)
This will build the asset and return any build results (errors). |
String |
buildAssetSource(RuleAsset asset)
This will return the effective source for an asset (in DRL). |
BuilderResult[] |
buildPackage(String packageUUID)
Build the package (may be a snapshot) and return the result. |
String |
buildPackageSource(String packageUUID)
This will return the effective DRL for a package. |
void |
changeAssetPackage(String uuid,
String newPackage,
String comment)
This moves an asset to the given target package. |
void |
changeState(String uuid,
String newState,
boolean wholePackage)
This will change the state of an asset or package. |
String |
checkinVersion(RuleAsset asset)
This checks in a new version of an asset. |
void |
clearRulesRepository()
Clear the rules repositoty, Use at your own risk. |
String |
copyAsset(String assetUUID,
String newPackage,
String newName)
Copies an asset into a new destination package. |
void |
copyOrRemoveSnapshot(String packageName,
String snapshotName,
boolean delete,
String newSnapshotName)
This alters an existing snapshot, it can be used to copy or delete it. |
Boolean |
createCategory(String path,
String name,
String description)
This will create a new category at the specified path. |
String |
createNewRule(String ruleName,
String description,
String initialCategory,
String initialPackage,
String format)
This will create a new asset. |
String |
createPackage(String name,
String description)
This creates a package of the given name, and checks it in. |
void |
createPackageSnapshot(String packageName,
String snapshotName,
boolean replaceExisting,
String comment)
Create a package snapshot for deployment. |
String |
createState(String name)
Create a state (status). |
void |
deleteUncheckedRule(String uuid,
String initialPackage)
Delete un checked in Asset |
byte[] |
exportRepository()
Export rules repository to a compressed array of bytes |
TableDataResult |
listAssets(String uuid,
String[] formats,
int numRows,
int startRow)
Given a format, this will return assets that match. |
PackageConfigData[] |
listPackages()
This returns a list of packages where rules may be added. |
SnapshotInfo[] |
listSnapshots(String packageName)
This will load a list of snapshots for the given package. |
String[] |
listStates()
Returns a list of valid states. |
TableDataResult |
loadAssetHistory(String uuid)
This will load the history of the given asset, in a summary format suitable for display in a table. |
String[] |
loadChildCategories(String categoryPath)
|
PackageConfigData |
loadPackageConfig(String uuid)
Loads a package by its uuid. |
RuleAsset |
loadRuleAsset(String uuid)
This actually does the hard work of loading up an asset based on its format. |
TableDataResult |
loadRuleListForCategories(String categoryPath)
Return a a 2d array/grid of results for rules. |
SuggestionCompletionEngine |
loadSuggestionCompletionEngine(String packageName)
Loads up the SuggestionCompletionEngine for the given package. |
TableConfig |
loadTableConfig(String listName)
This will return a TableConfig of header names. |
TableDataResult |
quickFindAsset(String searchText,
int max,
boolean searchArchived)
This will quickly return a list of asset names/descriptions. |
void |
removeCategory(String categoryPath)
This will remove a category. |
void |
restoreVersion(String versionUUID,
String assetUUID,
String comment)
This will restore the specified version in the repository, saving, and creating a new version (with all the restored content). |
ValidatedResponse |
savePackage(PackageConfigData data)
Saves the package config data in place (does not create a new version of anything). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@In public RulesRepository repository
Constructor Detail |
---|
public ServiceImplementation()
Method Detail |
---|
@WebRemote public String[] loadChildCategories(String categoryPath)
loadChildCategories
in interface RepositoryService
categoryPath
- A "/" delimited path to a category.@WebRemote public Boolean createCategory(String path, String name, String description)
RepositoryService
createCategory
in interface RepositoryService
@WebRemote public String createNewRule(String ruleName, String description, String initialCategory, String initialPackage, String format) throws com.google.gwt.user.client.rpc.SerializableException
createNewRule
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public void deleteUncheckedRule(String uuid, String initialPackage)
RepositoryService
deleteUncheckedRule
in interface RepositoryService
@WebRemote public PackageConfigData[] listPackages()
RepositoryService
listPackages
in interface RepositoryService
@WebRemote public TableDataResult loadRuleListForCategories(String categoryPath) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
loadRuleListForCategories
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public TableConfig loadTableConfig(String listName)
RepositoryService
loadTableConfig
in interface RepositoryService
listName
- The name of the list that we are going to render.@WebRemote public RuleAsset loadRuleAsset(String uuid) throws com.google.gwt.user.client.rpc.SerializableException
loadRuleAsset
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public String checkinVersion(RuleAsset asset) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
checkinVersion
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public TableDataResult loadAssetHistory(String uuid) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
loadAssetHistory
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public void restoreVersion(String versionUUID, String assetUUID, String comment)
RepositoryService
restoreVersion
in interface RepositoryService
@WebRemote public byte[] exportRepository() throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
exportRepository
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public String createPackage(String name, String description) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
createPackage
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public PackageConfigData loadPackageConfig(String uuid)
RepositoryService
loadPackageConfig
in interface RepositoryService
@WebRemote public ValidatedResponse savePackage(PackageConfigData data) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
savePackage
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public TableDataResult listAssets(String uuid, String[] formats, int numRows, int startRow) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
listAssets
in interface RepositoryService
uuid
- The package uuid to search inside.numRows
- The number of rows to return. -1 means all.startRow
- The starting row number if paging - if numRows is -1 then this is ignored.
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public String createState(String name) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
createState
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public String[] listStates() throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
listStates
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public void changeState(String uuid, String newState, boolean wholePackage)
RepositoryService
changeState
in interface RepositoryService
uuid
- The UUID of the asset we are tweaking.newState
- The new state to set. It must be valid in the repo.wholePackage
- true if it is a package we are setting the state of.
If this is true, UUID must be the status of a package, if false, it must be an asset.@WebRemote public void changeAssetPackage(String uuid, String newPackage, String comment)
RepositoryService
changeAssetPackage
in interface RepositoryService
@WebRemote public String copyAsset(String assetUUID, String newPackage, String newName)
RepositoryService
copyAsset
in interface RepositoryService
assetUUID
- The source assetID.newPackage
- The destination package (may be the same as the current source package, but
in that case the asset has to have a different name).newName
- The new name of the asset.@WebRemote public SnapshotInfo[] listSnapshots(String packageName)
RepositoryService
listSnapshots
in interface RepositoryService
@WebRemote public void createPackageSnapshot(String packageName, String snapshotName, boolean replaceExisting, String comment)
RepositoryService
createPackageSnapshot
in interface RepositoryService
packageName
- THe name of the package to copy.snapshotName
- The name of the snapshot. Has to be unique unless existing one is to be replaced.replaceExisting
- Replace the existing one (must be true to replace an existing snapshot of the same name).comment
- A comment to be added to the copied one.@WebRemote public void copyOrRemoveSnapshot(String packageName, String snapshotName, boolean delete, String newSnapshotName) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
copyOrRemoveSnapshot
in interface RepositoryService
packageName
- The package name that we are dealing with.snapshotName
- The snapshot name (this must exist)delete
- true if the snapshotName is to be removed.newSnapshotName
- The name of the target snapshot that the contents will be copied to.
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public TableDataResult quickFindAsset(String searchText, int max, boolean searchArchived)
RepositoryService
quickFindAsset
in interface RepositoryService
@WebRemote public void removeCategory(String categoryPath) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
removeCategory
in interface RepositoryService
categoryPath
- The full path to the category. Any sub categories will also
be removed.
com.google.gwt.user.client.rpc.SerializableException
- For when it all goes horribly wrong.@WebRemote public void clearRulesRepository()
RepositoryService
clearRulesRepository
in interface RepositoryService
@WebRemote public SuggestionCompletionEngine loadSuggestionCompletionEngine(String packageName) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
loadSuggestionCompletionEngine
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public BuilderResult[] buildPackage(String packageUUID) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
buildPackage
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public String buildPackageSource(String packageUUID) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
buildPackageSource
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public String buildAssetSource(RuleAsset asset) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
buildAssetSource
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
@WebRemote public BuilderResult[] buildAsset(RuleAsset asset) throws com.google.gwt.user.client.rpc.SerializableException
RepositoryService
buildAsset
in interface RepositoryService
com.google.gwt.user.client.rpc.SerializableException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |