org.drools.guvnor.client.rpc
Interface AssetService

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
RepositoryAssetService, RepositoryServiceServlet

public interface AssetService
extends com.google.gwt.user.client.rpc.RemoteService


Method Summary
 List<DiscussionRecord> addToDiscussionForAsset(String assetId, String comment)
          Append a discussion item for the current user.
 void archiveAsset(String uuid)
           
 void archiveAssets(String[] uuids, boolean value)
          Archive assets based on uuid
 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).
 void changeAssetPackage(String uuid, String newPackage, String comment)
          This moves an asset to the given target package.
 void changePackageState(String uuid, String newStatee)
          This will change the state of package.
 void changeState(String uuid, String newState)
          This will change the state of an asset.
 String checkinVersion(RuleAsset asset)
          This checks in a new version of an asset.
 void clearAllDiscussionsForAsset(String assetId)
          Only for admins, they can nuke it from orbit to clear it out
 String copyAsset(String assetUUID, String newPackage, String newName)
          Copies an asset into a new destination package.
 PageResponse<AssetPageRow> findAssetPage(AssetPageRequest request)
          Supports filtering and pagination.
 String getAssetLockerUserName(String uuid)
          Returns the lockers user name
 TableDataResult listAssets(String packageUUID, String[] formats, int skip, int numRows, String tableConfig)
          Deprecated. by findAssetPage(AssetPageRequest)
 TableDataResult listAssetsWithPackageName(String packageName, String[] formats, int skip, int numRows, String tableConfig)
          Deprecated. by findAssetPage(AssetPageRequest)
 TableDataResult loadArchivedAssets(int skip, int numRows)
          Deprecated. in favor of loadArchivedAssets(PageRequest)
 PageResponse<AdminArchivedPageRow> loadArchivedAssets(PageRequest request)
          This will load all archived assets, in a summary format suitable for display in a table.
 TableDataResult loadAssetHistory(String packageUUID, String assetName)
          This will load the history of the given asset, in a summary format suitable for display in a table.
 List<DiscussionRecord> loadDiscussionForAsset(String assetId)
          Return a list of discussion items for a given asset...
 TableDataResult loadItemHistory(String uuid)
          This will load the history of the given asset or package, in a summary format suitable for display in a table.
 RuleAsset loadRuleAsset(String UUID)
          This loads up all the stuff for a rule asset based on the UUID (always latest and editable version).
 RuleAsset[] loadRuleAssets(String[] UUIDs)
           
 void lockAsset(String uuid)
          Locks the asset, if a lock already exists this over writes it.
 void promoteAssetToGlobalArea(String assetUUID)
          Prompt an asset into Global area.
 TableDataResult queryFullText(String text, boolean seekArchived, int skip, int numRows)
          Deprecated. in favour of queryFullText(QueryPageRequest)
 PageResponse<QueryPageRow> quickFindAsset(QueryPageRequest queryRequest)
          This will quickly return a list of assets
 TableDataResult quickFindAsset(String searchText, boolean searchArchived, int skip, int numRows)
          Deprecated. in favour of quickFindAsset(QueryPageRequest)
 void removeAsset(String uuid)
          Remove an asset based on uuid
 void removeAssets(String[] uuids)
          Remove assets based on uuid
 String renameAsset(String uuid, String newName)
          Rename an asset.
 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).
 void unArchiveAsset(String uuid)
           
 void unLockAsset(String uuid)
          Unlocks the asset.
 

Method Detail

quickFindAsset

TableDataResult quickFindAsset(String searchText,
                               boolean searchArchived,
                               int skip,
                               int numRows)
                               throws com.google.gwt.user.client.rpc.SerializationException
Deprecated. in favour of quickFindAsset(QueryPageRequest)

This will quickly return a list of assets

Throws:
com.google.gwt.user.client.rpc.SerializationException

queryFullText

TableDataResult queryFullText(String text,
                              boolean seekArchived,
                              int skip,
                              int numRows)
                              throws com.google.gwt.user.client.rpc.SerializationException
Deprecated. in favour of queryFullText(QueryPageRequest)

Runs a full text search using JCR.

Parameters:
text -
seekArchived -
skip -
numRows -
Returns:
Throws:
com.google.gwt.user.client.rpc.SerializationException

getAssetLockerUserName

String getAssetLockerUserName(String uuid)
Returns the lockers user name

Parameters:
uuid -
Returns:
Lockers user name or null if there is no lock.

lockAsset

void lockAsset(String uuid)
Locks the asset, if a lock already exists this over writes it.

Parameters:
uuid -

unLockAsset

void unLockAsset(String uuid)
Unlocks the asset.

Parameters:
uuid -

quickFindAsset

PageResponse<QueryPageRow> quickFindAsset(QueryPageRequest queryRequest)
                                          throws com.google.gwt.user.client.rpc.SerializationException
This will quickly return a list of assets

Parameters:
queryRequest - The parameters for the search
Throws:
com.google.gwt.user.client.rpc.SerializationException

archiveAsset

void archiveAsset(String uuid)

unArchiveAsset

void unArchiveAsset(String uuid)

archiveAssets

void archiveAssets(String[] uuids,
                   boolean value)
Archive assets based on uuid

Parameters:
uuids -

removeAsset

void removeAsset(String uuid)
Remove an asset based on uuid

Parameters:
uuid -

removeAssets

void removeAssets(String[] uuids)
Remove assets based on uuid

Parameters:
uuids -

buildAssetSource

String buildAssetSource(RuleAsset asset)
                        throws com.google.gwt.user.client.rpc.SerializationException
This will return the effective source for an asset (in DRL). Used as an aid for debugging.

Throws:
com.google.gwt.user.client.rpc.SerializationException

buildAsset

BuilderResult buildAsset(RuleAsset asset)
                         throws com.google.gwt.user.client.rpc.SerializationException
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.

Throws:
com.google.gwt.user.client.rpc.SerializationException

renameAsset

String renameAsset(String uuid,
                   String newName)
Rename an asset.


loadRuleAsset

RuleAsset loadRuleAsset(String UUID)
                        throws com.google.gwt.user.client.rpc.SerializationException
This loads up all the stuff for a rule asset based on the UUID (always latest and editable version).

Throws:
com.google.gwt.user.client.rpc.SerializationException

loadRuleAssets

RuleAsset[] loadRuleAssets(String[] UUIDs)
                           throws com.google.gwt.user.client.rpc.SerializationException
Throws:
com.google.gwt.user.client.rpc.SerializationException

checkinVersion

String checkinVersion(RuleAsset asset)
                      throws com.google.gwt.user.client.rpc.SerializationException
This checks in a new version of an asset.

Returns:
the UUID of the asset you are checking in, null if there was some problem (and an exception was not thrown).
Throws:
com.google.gwt.user.client.rpc.SerializationException

restoreVersion

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).


loadItemHistory

TableDataResult loadItemHistory(String uuid)
                                throws com.google.gwt.user.client.rpc.SerializationException
This will load the history of the given asset or package, in a summary format suitable for display in a table.

Throws:
com.google.gwt.user.client.rpc.SerializationException

loadAssetHistory

TableDataResult loadAssetHistory(String packageUUID,
                                 String assetName)
                                 throws com.google.gwt.user.client.rpc.SerializationException
This will load the history of the given asset, in a summary format suitable for display in a table.

Throws:
com.google.gwt.user.client.rpc.SerializationException

loadArchivedAssets

TableDataResult loadArchivedAssets(int skip,
                                   int numRows)
                                   throws com.google.gwt.user.client.rpc.SerializationException
Deprecated. in favor of loadArchivedAssets(PageRequest)

This will load all archived assets, in a summary format suitable for display in a table.

Throws:
com.google.gwt.user.client.rpc.SerializationException

loadArchivedAssets

PageResponse<AdminArchivedPageRow> loadArchivedAssets(PageRequest request)
                                                      throws com.google.gwt.user.client.rpc.SerializationException
This will load all archived assets, in a summary format suitable for display in a table.

Throws:
com.google.gwt.user.client.rpc.SerializationException

findAssetPage

PageResponse<AssetPageRow> findAssetPage(AssetPageRequest request)
                                         throws com.google.gwt.user.client.rpc.SerializationException
Supports filtering and pagination.

Parameters:
request - never null, contains filter and pagination values
Returns:
never null, contains the List of AssetPageRow
Throws:
com.google.gwt.user.client.rpc.SerializationException

listAssets

TableDataResult listAssets(String packageUUID,
                           String[] formats,
                           int skip,
                           int numRows,
                           String tableConfig)
                           throws com.google.gwt.user.client.rpc.SerializationException
Deprecated. by findAssetPage(AssetPageRequest)

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.
format - The format to filter on. If this is empty - it will look for all non "known" asset types (ie "misc" stuff).
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.
Throws:
com.google.gwt.user.client.rpc.SerializationException

listAssetsWithPackageName

TableDataResult listAssetsWithPackageName(String packageName,
                                          String[] formats,
                                          int skip,
                                          int numRows,
                                          String tableConfig)
                                          throws com.google.gwt.user.client.rpc.SerializationException
Deprecated. by findAssetPage(AssetPageRequest)

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:
packageName - The name of package to search inside.
format - The format to filter on. If this is empty - it will look for all non "known" asset types (ie "misc" stuff).
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.
Throws:
com.google.gwt.user.client.rpc.SerializationException

copyAsset

String copyAsset(String assetUUID,
                 String newPackage,
                 String newName)
Copies an asset into a new destination package.

Parameters:
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.

promoteAssetToGlobalArea

void promoteAssetToGlobalArea(String assetUUID)
Prompt an asset into Global area.

Parameters:
assetUUID - The source assetID.

changeAssetPackage

void changeAssetPackage(String uuid,
                        String newPackage,
                        String comment)
This moves an asset to the given target package.


loadDiscussionForAsset

List<DiscussionRecord> loadDiscussionForAsset(String assetId)
Return a list of discussion items for a given asset...


addToDiscussionForAsset

List<DiscussionRecord> addToDiscussionForAsset(String assetId,
                                               String comment)
Append a discussion item for the current user.


clearAllDiscussionsForAsset

void clearAllDiscussionsForAsset(String assetId)
Only for admins, they can nuke it from orbit to clear it out


changeState

void changeState(String uuid,
                 String newState)
This will change the state of an asset.

Parameters:
uuid - The UUID of the asset we are tweaking.
newState - The new state to set. It must be valid in the repo.

changePackageState

void changePackageState(String uuid,
                        String newStatee)
This will change the state of package.

Parameters:
uuid - The UUID of the asset we are tweaking.
newState - The new state to set. It must be valid in the repo.


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.