| org.drools.brms.client.rpc.RepositoryService
All known Subclasses: org.drools.brms.server.ServiceImplementation,
RepositoryService | public interface RepositoryService extends RemoteService(Code) | | This is what the remote service will implement, as a servlet.
(in hosted/debug mode, you could also use an implementation that was in-process).
|
Method Summary | |
public void | archiveAsset(String uuid, boolean value) | public BuilderResult[] | buildAsset(RuleAsset asset) This will build the asset and return any build results (errors). | public String | buildAssetSource(RuleAsset asset) This will return the effective source for an asset (in DRL). | public BuilderResult[] | buildPackage(String packageUUID, String selectorName) Build the package (may be a snapshot) and return the result.
This will then store the result in the package as an attachment.
if a non null selectorName is passed in it will lookup a selector as configured
in the systems selectors.properties file. | public String | buildPackageSource(String packageUUID) This will return the effective DRL for a package. | public void | changeAssetPackage(String uuid, String newPackage, String comment) This moves an asset to the given target package. | public void | changeState(String uuid, String newState, boolean wholePackage) This will change the state of an asset or package.
Parameters: uuid - The UUID of the asset we are tweaking. Parameters: newState - The new state to set. | public String | checkinVersion(RuleAsset asset) This checks in a new version of an asset. | public void | clearRulesRepository() Clear the rules repositoty, Use at your own risk. | public String | copyAsset(String assetUUID, String newPackage, String newName) Copies an asset into a new destination package. | public void | copyOrRemoveSnapshot(String packageName, String snapshotName, boolean delete, String newSnapshotName) This alters an existing snapshot, it can be used to copy or delete it. | public void | copyPackage(String sourcePackageName, String destPackageName) Copy the package (everything). | public Boolean | createCategory(String path, String name, String description) This will create a new category at the specified path. | public String | createNewRule(String ruleName, String description, String initialCategory, String initialPackage, String format) Creates a brand new rule with the initial category. | public String | createPackage(String name, String description) This creates a package of the given name, and checks it in. | public void | createPackageSnapshot(String packageName, String snapshotName, boolean replaceExisting, String comment) Create a package snapshot for deployment.
Parameters: packageName - THe name of the package to copy. Parameters: snapshotName - The name of the snapshot. | public String | createState(String name) Create a state (status). | public void | deleteUncheckedRule(String ruleName, String initialPackage) | public byte[] | exportRepository() | public TableDataResult | listAssets(String packageUUID, String formats, int numRows, int startRow) Given a format, this will return assets that match.
It can also be used for "pagination" by passing in start and
finish row numbers.
Parameters: packageUUID - The package uuid to search inside. Parameters: format - The format to filter on. Parameters: numRows - The number of rows to return. | public PackageConfigData[] | listPackages() This returns a list of packages where rules may be added. | public SnapshotInfo[] | listSnapshots(String packageName) This will load a list of snapshots for the given package. | public String[] | listStates() Returns a list of valid states. | public TableDataResult | loadArchivedAssets() This will load all archived assets, in a summary format suitable
for display in a table. | public TableDataResult | loadAssetHistory(String uuid) This will load the history of the given asset, in a summary format suitable
for display in a table. | public String[] | loadChildCategories(String categoryPath) | public PackageConfigData | loadPackageConfig(String uuid) Loads a package by its uuid.
Well, its pretty obvious if you think about it for a minute. | public RuleAsset | loadRuleAsset(String UUID) This loads up all the stuff for a
rule asset based on the UUID (always latest and editable version). | public TableDataResult | loadRuleListForCategories(String categoryPath) Return a a 2d array/grid of results for rules. | public SuggestionCompletionEngine | loadSuggestionCompletionEngine(String packageName) Loads up the SuggestionCompletionEngine for the given package.
As this doesn't change that often, its safe to cache. | public TableConfig | loadTableConfig(String listName) This will return a TableConfig of header names. | public TableDataResult | quickFindAsset(String searchText, int maxMatches, boolean searchArchived) This will quickly return a list of asset names/descriptions. | public void | removeAsset(String uuid) | public void | removeCategory(String categoryPath) This will remove a category. | public String | renameAsset(String uuid, String newName) Rename an asset. | public String | renamePackage(String uuid, String newName) Rename a package. | public 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). | public ValidatedResponse | savePackage(PackageConfigData data) Saves the package config data in place (does not create a new version of anything).
A ValidatedReponse, with any errors to be reported.No payload is in the response. |
archiveAsset | public void archiveAsset(String uuid, boolean value)(Code) | | Archive asset based on uuid
Parameters: uuid - |
buildAsset | public BuilderResult[] buildAsset(RuleAsset asset) throws SerializableException(Code) | | This will build the asset and return any build results (errors).
This is only to report on the results - it will generally not store any state or apply any changed.
|
buildAssetSource | public String buildAssetSource(RuleAsset asset) throws SerializableException(Code) | | This will return the effective source for an asset (in DRL).
Used as an aid for debugging.
|
buildPackage | public BuilderResult[] buildPackage(String packageUUID, String selectorName) throws SerializableException(Code) | | Build the package (may be a snapshot) and return the result.
This will then store the result in the package as an attachment.
if a non null selectorName is passed in it will lookup a selector as configured
in the systems selectors.properties file. This will then apply the filter to the
package being built.
|
buildPackageSource | public String buildPackageSource(String packageUUID) throws SerializableException(Code) | | This will return the effective DRL for a package.
This would be the equivalent if all the rules were written by hand in the one file.
It may not actually be compiled this way in the implementation, so this is for display and
debugging assistance only.
It should still generate
throws: SerializableException - |
changeAssetPackage | public void changeAssetPackage(String uuid, String newPackage, String comment)(Code) | | This moves an asset to the given target package.
|
changeState | public void changeState(String uuid, String newState, boolean wholePackage)(Code) | | This will change the state of an asset or package.
Parameters: uuid - The UUID of the asset we are tweaking. Parameters: newState - The new state to set. It must be valid in the repo. Parameters: 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. |
checkinVersion | public String checkinVersion(RuleAsset asset) throws SerializableException(Code) | | This checks in a new version of an asset.
the UUID of the asset you are checking in,null if there was some problem (and an exception was not thrown). |
clearRulesRepository | public void clearRulesRepository()(Code) | | Clear the rules repositoty, Use at your own risk.
|
copyAsset | public String copyAsset(String assetUUID, String newPackage, String newName)(Code) | | Copies an asset into a new destination package.
Parameters: assetUUID - The source assetID. Parameters: newPackage - The destination package (may be the same as the current source package, butin that case the asset has to have a different name). Parameters: newName - The new name of the asset. |
copyOrRemoveSnapshot | public void copyOrRemoveSnapshot(String packageName, String snapshotName, boolean delete, String newSnapshotName) throws SerializableException(Code) | | This alters an existing snapshot, it can be used to copy or delete it.
Parameters: packageName - The package name that we are dealing with. Parameters: snapshotName - The snapshot name (this must exist) Parameters: delete - true if the snapshotName is to be removed. Parameters: newSnapshotName - The name of the target snapshot that the contents will be copied to. |
copyPackage | public void copyPackage(String sourcePackageName, String destPackageName) throws SerializableException(Code) | | Copy the package (everything).
Parameters: sourcePackageName - Parameters: destPackageName - |
createNewRule | public String createNewRule(String ruleName, String description, String initialCategory, String initialPackage, String format) throws SerializableException(Code) | | Creates a brand new rule with the initial category.
Return the UUID of the item created.
This will not check in the rule, but just leave it as saved in the repo.
|
createPackage | public String createPackage(String name, String description) throws SerializableException(Code) | | This creates a package of the given name, and checks it in.
UUID of the created item. |
createPackageSnapshot | public void createPackageSnapshot(String packageName, String snapshotName, boolean replaceExisting, String comment)(Code) | | Create a package snapshot for deployment.
Parameters: packageName - THe name of the package to copy. Parameters: snapshotName - The name of the snapshot. Has to be unique unless existing one is to be replaced. Parameters: replaceExisting - Replace the existing one (must be true to replace an existing snapshot of the same name). Parameters: comment - A comment to be added to the copied one. |
createState | public String createState(String name) throws SerializableException(Code) | | Create a state (status).
the UUID of the created StateItem. |
deleteUncheckedRule | public void deleteUncheckedRule(String ruleName, String initialPackage)(Code) | | Delete un checked in Asset
|
exportRepository | public byte[] exportRepository() throws SerializableException(Code) | | Export rules repository to a compressed array of bytes
|
listAssets | public TableDataResult listAssets(String packageUUID, String formats, int numRows, int startRow) throws SerializableException(Code) | | Given a format, this will return assets that match.
It can also be used for "pagination" by passing in start and
finish row numbers.
Parameters: packageUUID - The package uuid to search inside. Parameters: format - The format to filter on. Parameters: numRows - The number of rows to return. -1 means all. Parameters: startRow - The starting row number if paging - if numRows is -1 then this is ignored. |
listPackages | public PackageConfigData[] listPackages()(Code) | | This returns a list of packages where rules may be added.
Only the UUID and the name need to be populated.
|
listSnapshots | public SnapshotInfo[] listSnapshots(String packageName)(Code) | | This will load a list of snapshots for the given package. Snapshots are created
by taking a labelled copy of a package, at a point in time, for instance for deployment.
|
listStates | public String[] listStates() throws SerializableException(Code) | | Returns a list of valid states.
|
loadArchivedAssets | public TableDataResult loadArchivedAssets() throws SerializableException(Code) | | This will load all archived assets, in a summary format suitable
for display in a table.
|
loadAssetHistory | public TableDataResult loadAssetHistory(String uuid) throws SerializableException(Code) | | This will load the history of the given asset, in a summary format suitable
for display in a table.
|
loadChildCategories | public String[] loadChildCategories(String categoryPath)(Code) | | Parameters: categoryPath - A "/" delimited path to a category. Parameters: callback - |
loadPackageConfig | public PackageConfigData loadPackageConfig(String uuid)(Code) | | Loads a package by its uuid.
Well, its pretty obvious if you think about it for a minute. Really. |
loadRuleAsset | public RuleAsset loadRuleAsset(String UUID) throws SerializableException(Code) | | This loads up all the stuff for a
rule asset based on the UUID (always latest and editable version).
|
loadRuleListForCategories | public TableDataResult loadRuleListForCategories(String categoryPath) throws SerializableException(Code) | | Return a a 2d array/grid of results for rules.
Parameters: A - "/" delimited path to a category. |
loadSuggestionCompletionEngine | public SuggestionCompletionEngine loadSuggestionCompletionEngine(String packageName) throws SerializableException(Code) | | Loads up the SuggestionCompletionEngine for the given package.
As this doesn't change that often, its safe to cache. However, if a change is made to
a package, should blow away the cache.
|
loadTableConfig | public TableConfig loadTableConfig(String listName)(Code) | | This will return a TableConfig of header names.
Parameters: listName - The name of the list that we are going to render. |
quickFindAsset | public TableDataResult quickFindAsset(String searchText, int maxMatches, boolean searchArchived)(Code) | | This will quickly return a list of asset names/descriptions.
This list will be limited, and it will be flagged if more are found then can be shown.
Returning an extra empty row means there are more to come...
The id of a row is the UUID, the first value is the name, the next the description.
Finally, if there is "more" rows, a row will be returned which has "MORE" as its ID.
|
removeAsset | public void removeAsset(String uuid)(Code) | | Remove an asset based on uuid
Parameters: uuid - |
removeCategory | public void removeCategory(String categoryPath) throws SerializableException(Code) | | This will remove a category. A category must have no
current assets linked to it, or else it will not be able to be removed.
Parameters: categoryPath - The full path to the category. Any sub categories will alsobe removed. throws: SerializableException - For when it all goes horribly wrong. |
restoreVersion | public void restoreVersion(String versionUUID, String assetUUID, String comment)(Code) | | This will restore the specified version in the repository, saving, and creating
a new version (with all the restored content).
|
savePackage | public ValidatedResponse savePackage(PackageConfigData data) throws SerializableException(Code) | | Saves the package config data in place (does not create a new version of anything).
A ValidatedReponse, with any errors to be reported.No payload is in the response. If there are any errors, the usershould be given the option to review them, and correct them if needed(but a save will not be prevented this way - as its not an exception). |
|
|