org.drools.guvnor.server
Class RepositoryServiceServlet

java.lang.Object
  extended by javax.servlet.GenericServlet
      extended by javax.servlet.http.HttpServlet
          extended by com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
              extended by com.google.gwt.user.server.rpc.RemoteServiceServlet
                  extended by org.drools.guvnor.server.RepositoryServiceServlet
All Implemented Interfaces:
com.google.gwt.user.client.rpc.RemoteService, com.google.gwt.user.server.rpc.SerializationPolicyProvider, Serializable, javax.servlet.Servlet, javax.servlet.ServletConfig, AssetService, CategoryService, PackageService, RepositoryService

public class RepositoryServiceServlet
extends com.google.gwt.user.server.rpc.RemoteServiceServlet
implements RepositoryService, AssetService, PackageService, CategoryService

GWT RPC service endpoint for Repository service. A place to hang some exception handling mainly. This passes on all requests unmolested to the underlying ServiceImplemention class.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
perThreadRequest, perThreadResponse
 
Constructor Summary
RepositoryServiceServlet()
           
 
Method Summary
 List addToDiscussionForAsset(String p0, String p1)
          Append a discussion item for the current user.
 void archiveAsset(String p0)
           
 void archiveAssets(String[] p0, boolean p1)
          Archive assets based on uuid
 BuilderResult buildAsset(RuleAsset p0)
          This will build the asset and return any build results (errors).
 String buildAssetSource(RuleAsset p0)
          This will return the effective source for an asset (in DRL).
 BuilderResult buildPackage(String p0, boolean p1, String p2, String p3, String p4, boolean p5, String p6, String p7, boolean p8, String p9)
          Build the package (may be a snapshot) and return the result.
 String buildPackageSource(String p0)
          This will return the effective DRL for a package.
 void changeAssetPackage(String p0, String p1, String p2)
          This moves an asset to the given target package.
 void changePackageState(String p0, String p1)
          This will change the state of package.
 void changeState(String p0, String p1)
          This will change the state of an asset.
 String checkinVersion(RuleAsset p0)
          This checks in a new version of an asset.
 void cleanLog()
          clean up the log entry.
 void clearAllDiscussionsForAsset(String p0)
          Only for admins, they can nuke it from orbit to clear it out
 void clearRulesRepository()
          Clear the rules repositoty, Use at your own risk.
 SnapshotComparisonPageResponse compareSnapshots(SnapshotComparisonPageRequest p0)
           
 SnapshotDiffs compareSnapshots(String p0, String p1, String p2)
          Compare two snapshots.
 String copyAsset(String p0, String p1, String p2)
          Copies an asset into a new destination package.
 void copyOrRemoveSnapshot(String p0, String p1, boolean p2, String p3)
          This alters an existing snapshot, it can be used to copy or delete it.
 String copyPackage(String p0, String p1)
          Copy the package (everything).
 Boolean createCategory(String p0, String p1, String p2)
          This will create a new category at the specified path.
 String createNewImportedRule(String p0, String p1)
          Creates a new rule which is imported from global area.
 String createNewRule(String p0, String p1, String p2, String p3, String p4)
          Creates a brand new rule with the initial category.
 String createPackage(String p0, String p1)
          This creates a package of the given name, and checks it in.
 void createPackageSnapshot(String p0, String p1, boolean p2, String p3)
          Create a package snapshot for deployment.
 String createState(String p0)
          Create a state (status).
 String createSubPackage(String p0, String p1, String p2)
          This creates a package of the given name, and checks it in.
 void createUser(String p0)
          create new user.
 void createWorkspace(String p0)
          This creates a workspace
 void deleteUncheckedRule(String p0)
          Delete un checked in Asset
 void deleteUser(String p0)
          Removes user security data.
protected  void doUnexpectedFailure(Throwable e)
           
 PageResponse findAssetPage(AssetPageRequest p0)
          Supports filtering and pagination.
 String getAssetLockerUserName(String p0)
          Returns the lockers user name
static RepositoryAssetService getAssetService()
           
static RepositoryCategoryService getCategoryService()
           
 String[] getCustomSelectors()
          return custom selector names
 String[] getDependencies(String p0)
           
static RepositoryPackageService getPackageService()
           
static ServiceImplementation getService()
          This is used by the pass through methods below.
 void installSampleRepository()
          Installs the sample repository, wiping out what was already there.
 Boolean isHostedMode()
           
 PackageConfigData[] listArchivedPackages()
          This returns a list of archived packages.
 TableDataResult listAssets(String p0, String[] p1, int p2, int p3, String p4)
          Given a format, this will return assets that match.
 TableDataResult listAssetsWithPackageName(String p0, String[] p1, int p2, int p3, String p4)
          Given a format, this will return assets that match.
 String[] listAvailablePermissionTypes()
          List the available permission types.
 PackageConfigData[] listPackages()
          This returns a list of packages where rules may be added.
 PackageConfigData[] listPackages(String p0)
          PLACE THE FOLLOWING IN RepositoryServiceServlet.java
 String[] listRulesInPackage(String p0)
          This will list the rules available in a package.
 SnapshotInfo[] listSnapshots(String p0)
          This will load a list of snapshots for the given package.
 String[] listStates()
          Returns a list of valid states.
 String[] listTypesInPackage(String p0)
          List the fact types (class names) in the scope of a given package.
 Map listUserPermissions()
           
 PageResponse listUserPermissions(PageRequest p0)
           
 String[] listWorkspaces()
          This returns a list of workspaces
 TableDataResult loadArchivedAssets(int p0, int p1)
          This will load all archived assets, in a summary format suitable for display in a table.
 PageResponse loadArchivedAssets(PageRequest p0)
          This will load all archived assets, in a summary format suitable for display in a table.
 TableDataResult loadAssetHistory(String p0, String p1)
          This will load the history of the given asset, in a summary format suitable for display in a table.
 String[] loadChildCategories(String p0)
          PLACE THE FOLLOWING IN RepositoryServiceServlet.java
 List loadDiscussionForAsset(String p0)
          Return a list of discussion items for a given asset...
 String[] loadDropDownExpression(String[] p0, String p1)
           
 PackageConfigData loadGlobalPackage()
          This returns the global packages.
 PageResponse loadInbox(InboxPageRequest p0)
          Load the data for a given inbox for the currently logged in user.
 TableDataResult loadInbox(String p0)
          Load the data for a given inbox for the currently logged in user.
 TableDataResult loadItemHistory(String p0)
          This will load the history of the given asset or package, in a summary format suitable for display in a table.
 PackageConfigData loadPackageConfig(String p0)
          Loads a package by its uuid.
 RuleAsset loadRuleAsset(String p0)
          This loads up all the stuff for a rule asset based on the UUID (always latest and editable version).
 RuleAsset[] loadRuleAssets(String[] p0)
           
 PageResponse loadRuleListForCategories(CategoryPageRequest p0)
          Return a list of Assets by category.
 TableDataResult loadRuleListForCategories(String p0, int p1, int p2, String p3)
          Return a a 2d array/grid of results for rules.
 PageResponse loadRuleListForState(StatePageRequest p0)
          PLACE THE FOLLOWING IN RepositoryServiceServlet.java
 TableDataResult loadRuleListForState(String p0, int p1, int p2, String p3)
          Return a a 2d array/grid of results for rules.
 Map loadSpringContextElementData()
          Returns the Spring context elements specified by SpringContextElementsManager
 SuggestionCompletionEngine loadSuggestionCompletionEngine(String p0)
          Loads up the SuggestionCompletionEngine for the given package.
 TableConfig loadTableConfig(String p0)
          This will return a TableConfig of header names.
 void lockAsset(String p0)
          Locks the asset, if a lock already exists this over writes it.
 String processTemplate(String p0, Map p1)
          Load and process the repository configuration templates.
 void promoteAssetToGlobalArea(String p0)
          Prompt an asset into Global area.
 PageResponse queryFullText(QueryPageRequest p0)
          Runs a full text search using JCR.
 TableDataResult queryFullText(String p0, boolean p1, int p2, int p3)
          Runs a full text search using JCR.
 TableDataResult queryMetaData(MetaDataQuery[] p0, Date p1, Date p2, Date p3, Date p4, boolean p5, int p6, int p7)
          Run a meta data search.
 PageResponse queryMetaData(QueryMetadataPageRequest p0)
          Run a meta data search.
 PageResponse quickFindAsset(QueryPageRequest p0)
          PLACE THE FOLLOWING IN RepositoryServiceServlet.java
 TableDataResult quickFindAsset(String p0, boolean p1, int p2, int p3)
          This will quickly return a list of assets
 void rebuildPackages()
          This will force a rebuild of all packages binary data.
 void rebuildSnapshots()
          This will force a rebuild of all snapshots binary data.
 void removeAsset(String p0)
          Remove an asset based on uuid
 void removeAssets(String[] p0)
          Remove assets based on uuid
 void removeCategory(String p0)
          This will remove a category.
 void removePackage(String p0)
          Permanently remove a package (delete it).
 void removeState(String p0)
          Removes a state.
 void removeWorkspace(String p0)
          This removes a workspace
 String renameAsset(String p0, String p1)
          Rename an asset.
 void renameCategory(String p0, String p1)
          Rename a category - taking in the full path, and just the new name.
 String renamePackage(String p0, String p1)
          Rename a package.
 void renameState(String p0, String p1)
          Renames a state.
 void restoreVersion(String p0, String p1, String p2)
          This will restore the specified version in the repository, saving, and creating a new version (with all the restored content).
 Map retrieveUserPermissions(String p0)
          Loads the user permissions.
 SingleScenarioResult runScenario(String p0, Scenario p1)
           
 BulkTestRunResult runScenariosInPackage(String p0)
          This should be pretty obvious what it does !
 void savePackage(PackageConfigData p0)
          Saves the package config data in place (does not create a new version of anything).
 LogEntry[] showLog()
          This will list the last N log entryies logged by the server.
 PageResponse showLog(PageRequest p0)
          This will list log entries logged by the server.
 List subscribe()
          Subscribe for a "callback" for a given request.
 void unArchiveAsset(String p0)
           
 void unLockAsset(String p0)
          Unlocks the asset.
 void updateDependency(String p0, String p1)
           
 void updateUserPermissions(String p0, Map p1)
          Update the user permissions - takes the userName, and a map from permission type to the list of targets it applies to.
 void updateWorkspace(String p0, String[] p1, String[] p2)
          This removes a workspace
 ValidatedResponse validatePackageConfiguration(PackageConfigData p0)
          Validate package configuration
 
Methods inherited from class com.google.gwt.user.server.rpc.RemoteServiceServlet
checkPermutationStrongName, doGetSerializationPolicy, getSerializationPolicy, onAfterResponseSerialized, onBeforeRequestDeserialized, processCall, processPost, shouldCompressResponse
 
Methods inherited from class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet
doPost, getPermutationStrongName, getThreadLocalRequest, getThreadLocalResponse, onAfterRequestDeserialized, readContent
 
Methods inherited from class javax.servlet.http.HttpServlet
doDelete, doGet, doHead, doOptions, doPut, doTrace, getLastModified, service, service
 
Methods inherited from class javax.servlet.GenericServlet
destroy, getInitParameter, getInitParameterNames, getServletConfig, getServletContext, getServletInfo, getServletName, init, init, log, log
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RepositoryServiceServlet

public RepositoryServiceServlet()
Method Detail

getService

public static ServiceImplementation getService()
This is used by the pass through methods below. Michael got tired of trying to read other peoples overly abstracted code, so its just generated dumb code to reduce dependencies on libraries.


getAssetService

public static RepositoryAssetService getAssetService()

getPackageService

public static RepositoryPackageService getPackageService()

getCategoryService

public static RepositoryCategoryService getCategoryService()

doUnexpectedFailure

protected void doUnexpectedFailure(Throwable e)
Overrides:
doUnexpectedFailure in class com.google.gwt.user.server.rpc.AbstractRemoteServiceServlet

loadChildCategories

public String[] loadChildCategories(String p0)
PLACE THE FOLLOWING IN RepositoryServiceServlet.java

Specified by:
loadChildCategories in interface CategoryService
Parameters:
p0 - A "/" delimited path to a category.

loadRuleListForCategories

public TableDataResult loadRuleListForCategories(String p0,
                                                 int p1,
                                                 int p2,
                                                 String p3)
                                          throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: CategoryService
Return a a 2d array/grid of results for rules.

Specified by:
loadRuleListForCategories in interface CategoryService
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadRuleListForCategories

public PageResponse loadRuleListForCategories(CategoryPageRequest p0)
                                       throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: CategoryService
Return a list of Assets by category.

Specified by:
loadRuleListForCategories in interface CategoryService
Parameters:
p0 - Request specific details
Throws:
com.google.gwt.user.client.rpc.SerializationException

createCategory

public Boolean createCategory(String p0,
                              String p1,
                              String p2)
Description copied from interface: CategoryService
This will create a new category at the specified path.

Specified by:
createCategory in interface CategoryService

removeCategory

public void removeCategory(String p0)
                    throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: CategoryService
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.

Specified by:
removeCategory in interface CategoryService
Parameters:
p0 - The full path to the category. Any sub categories will also be removed.
Throws:
com.google.gwt.user.client.rpc.SerializationException - For when it all goes horribly wrong.

renameCategory

public void renameCategory(String p0,
                           String p1)
Description copied from interface: CategoryService
Rename a category - taking in the full path, and just the new name.

Specified by:
renameCategory in interface CategoryService

listPackages

public PackageConfigData[] listPackages(String p0)
PLACE THE FOLLOWING IN RepositoryServiceServlet.java

Specified by:
listPackages in interface PackageService

listPackages

public PackageConfigData[] listPackages()
Description copied from interface: PackageService
This returns a list of packages where rules may be added. Only the UUID and the name need to be populated.

Specified by:
listPackages in interface PackageService

listArchivedPackages

public PackageConfigData[] listArchivedPackages()
Description copied from interface: PackageService
This returns a list of archived packages.

Specified by:
listArchivedPackages in interface PackageService

loadGlobalPackage

public PackageConfigData loadGlobalPackage()
Description copied from interface: PackageService
This returns the global packages.

Specified by:
loadGlobalPackage in interface PackageService

createPackage

public String createPackage(String p0,
                            String p1)
                     throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
This creates a package of the given name, and checks it in.

Specified by:
createPackage in interface PackageService
Returns:
UUID of the created item.
Throws:
com.google.gwt.user.client.rpc.SerializationException

createSubPackage

public String createSubPackage(String p0,
                               String p1,
                               String p2)
                        throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
This creates a package of the given name, and checks it in.

Specified by:
createSubPackage in interface PackageService
Returns:
UUID of the created item.
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadPackageConfig

public PackageConfigData loadPackageConfig(String p0)
Description copied from interface: PackageService
Loads a package by its uuid.

Specified by:
loadPackageConfig in interface PackageService
Returns:
Well, its pretty obvious if you think about it for a minute. Really.

validatePackageConfiguration

public ValidatedResponse validatePackageConfiguration(PackageConfigData p0)
                                               throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
Validate package configuration

Specified by:
validatePackageConfiguration in interface PackageService
Returns:
A ValidatedReponse, with any errors to be reported. No payload is in the response. If there are any errors, the user should 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).
Throws:
com.google.gwt.user.client.rpc.SerializationException

savePackage

public void savePackage(PackageConfigData p0)
                 throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
Saves the package config data in place (does not create a new version of anything).

Specified by:
savePackage in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

createPackageSnapshot

public void createPackageSnapshot(String p0,
                                  String p1,
                                  boolean p2,
                                  String p3)
Description copied from interface: PackageService
Create a package snapshot for deployment.

Specified by:
createPackageSnapshot in interface PackageService
Parameters:
p0 - THe name of the package to copy.
p1 - The name of the snapshot. Has to be unique unless existing one is to be replaced.
p2 - Replace the existing one (must be true to replace an existing snapshot of the same name).
p3 - A comment to be added to the copied one.

copyOrRemoveSnapshot

public void copyOrRemoveSnapshot(String p0,
                                 String p1,
                                 boolean p2,
                                 String p3)
                          throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
This alters an existing snapshot, it can be used to copy or delete it.

Specified by:
copyOrRemoveSnapshot in interface PackageService
Parameters:
p0 - The package name that we are dealing with.
p1 - The snapshot name (this must exist)
p2 - true if the snapshotName is to be removed.
p3 - The name of the target snapshot that the contents will be copied to.
Throws:
com.google.gwt.user.client.rpc.SerializationException

buildPackage

public BuilderResult buildPackage(String p0,
                                  boolean p1,
                                  String p2,
                                  String p3,
                                  String p4,
                                  boolean p5,
                                  String p6,
                                  String p7,
                                  boolean p8,
                                  String p9)
                           throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
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.

Specified by:
buildPackage in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

buildPackageSource

public String buildPackageSource(String p0)
                          throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
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

Specified by:
buildPackageSource in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

copyPackage

public String copyPackage(String p0,
                          String p1)
                   throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
Copy the package (everything).

Specified by:
copyPackage in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

removePackage

public void removePackage(String p0)
Description copied from interface: PackageService
Permanently remove a package (delete it).

Specified by:
removePackage in interface PackageService
Parameters:
p0 - of the package.

renamePackage

public String renamePackage(String p0,
                            String p1)
Description copied from interface: PackageService
Rename a package.

Specified by:
renamePackage in interface PackageService

rebuildSnapshots

public void rebuildSnapshots()
                      throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
This will force a rebuild of all snapshots binary data. No errors are expected, as there will be no change. If there are errors, an expert will need to look at them.

Specified by:
rebuildSnapshots in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

rebuildPackages

public void rebuildPackages()
                     throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
This will force a rebuild of all packages binary data. No errors are expected, as there will be no change. If there are errors, an expert will need to look at them.

Specified by:
rebuildPackages in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

listRulesInPackage

public String[] listRulesInPackage(String p0)
                            throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
This will list the rules available in a package. This has an upper limit of what it will return (it just doesn't make sense to show a list of 20K items !).

Specified by:
listRulesInPackage in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

listSnapshots

public SnapshotInfo[] listSnapshots(String p0)
Description copied from interface: PackageService
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.

Specified by:
listSnapshots in interface PackageService

listTypesInPackage

public String[] listTypesInPackage(String p0)
                            throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
List the fact types (class names) in the scope of a given package. This may not include things on the "system" classpath, but only things specifically scoped to the package (eg in jars that have been uploaded to it as an asset).

Specified by:
listTypesInPackage in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

installSampleRepository

public void installSampleRepository()
                             throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
Installs the sample repository, wiping out what was already there. Generally shouldn't call this unless it is new !

Specified by:
installSampleRepository in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

compareSnapshots

public SnapshotDiffs compareSnapshots(String p0,
                                      String p1,
                                      String p2)
Description copied from interface: PackageService
Compare two snapshots.

Specified by:
compareSnapshots in interface PackageService

compareSnapshots

public SnapshotComparisonPageResponse compareSnapshots(SnapshotComparisonPageRequest p0)
Specified by:
compareSnapshots in interface PackageService

runScenario

public SingleScenarioResult runScenario(String p0,
                                        Scenario p1)
                                 throws com.google.gwt.user.client.rpc.SerializationException
Specified by:
runScenario in interface PackageService
Parameters:
p0 - The package name the scenario is to be run in.
p1 - The scenario to run.
Returns:
The scenario, with the results fields populated.
Throws:
com.google.gwt.user.client.rpc.SerializationException

runScenariosInPackage

public BulkTestRunResult runScenariosInPackage(String p0)
                                        throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: PackageService
This should be pretty obvious what it does !

Specified by:
runScenariosInPackage in interface PackageService
Throws:
com.google.gwt.user.client.rpc.SerializationException

quickFindAsset

public PageResponse quickFindAsset(QueryPageRequest p0)
                            throws com.google.gwt.user.client.rpc.SerializationException
PLACE THE FOLLOWING IN RepositoryServiceServlet.java

Specified by:
quickFindAsset in interface AssetService
Parameters:
p0 - The parameters for the search
Throws:
com.google.gwt.user.client.rpc.SerializationException

quickFindAsset

public TableDataResult quickFindAsset(String p0,
                                      boolean p1,
                                      int p2,
                                      int p3)
                               throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
This will quickly return a list of assets

Specified by:
quickFindAsset in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

queryFullText

public TableDataResult queryFullText(String p0,
                                     boolean p1,
                                     int p2,
                                     int p3)
                              throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
Runs a full text search using JCR.

Specified by:
queryFullText in interface AssetService
Returns:
Throws:
com.google.gwt.user.client.rpc.SerializationException

getAssetLockerUserName

public String getAssetLockerUserName(String p0)
Description copied from interface: AssetService
Returns the lockers user name

Specified by:
getAssetLockerUserName in interface AssetService
Returns:
Lockers user name or null if there is no lock.

lockAsset

public void lockAsset(String p0)
Description copied from interface: AssetService
Locks the asset, if a lock already exists this over writes it.

Specified by:
lockAsset in interface AssetService

unLockAsset

public void unLockAsset(String p0)
Description copied from interface: AssetService
Unlocks the asset.

Specified by:
unLockAsset in interface AssetService

archiveAsset

public void archiveAsset(String p0)
Specified by:
archiveAsset in interface AssetService

unArchiveAsset

public void unArchiveAsset(String p0)
Specified by:
unArchiveAsset in interface AssetService

archiveAssets

public void archiveAssets(String[] p0,
                          boolean p1)
Description copied from interface: AssetService
Archive assets based on uuid

Specified by:
archiveAssets in interface AssetService

removeAsset

public void removeAsset(String p0)
Description copied from interface: AssetService
Remove an asset based on uuid

Specified by:
removeAsset in interface AssetService

removeAssets

public void removeAssets(String[] p0)
Description copied from interface: AssetService
Remove assets based on uuid

Specified by:
removeAssets in interface AssetService

buildAssetSource

public String buildAssetSource(RuleAsset p0)
                        throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
This will return the effective source for an asset (in DRL). Used as an aid for debugging.

Specified by:
buildAssetSource in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

buildAsset

public BuilderResult buildAsset(RuleAsset p0)
                         throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
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.

Specified by:
buildAsset in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

renameAsset

public String renameAsset(String p0,
                          String p1)
Description copied from interface: AssetService
Rename an asset.

Specified by:
renameAsset in interface AssetService

loadRuleAsset

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

Specified by:
loadRuleAsset in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadRuleAssets

public RuleAsset[] loadRuleAssets(String[] p0)
                           throws com.google.gwt.user.client.rpc.SerializationException
Specified by:
loadRuleAssets in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadAssetHistory

public TableDataResult loadAssetHistory(String p0,
                                        String p1)
                                 throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
This will load the history of the given asset, in a summary format suitable for display in a table.

Specified by:
loadAssetHistory in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadItemHistory

public TableDataResult loadItemHistory(String p0)
                                throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
This will load the history of the given asset or package, in a summary format suitable for display in a table.

Specified by:
loadItemHistory in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadArchivedAssets

public PageResponse loadArchivedAssets(PageRequest p0)
                                throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
This will load all archived assets, in a summary format suitable for display in a table.

Specified by:
loadArchivedAssets in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadArchivedAssets

public TableDataResult loadArchivedAssets(int p0,
                                          int p1)
                                   throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
This will load all archived assets, in a summary format suitable for display in a table.

Specified by:
loadArchivedAssets in interface AssetService
Throws:
com.google.gwt.user.client.rpc.SerializationException

findAssetPage

public PageResponse findAssetPage(AssetPageRequest p0)
                           throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
Supports filtering and pagination.

Specified by:
findAssetPage in interface AssetService
Parameters:
p0 - never null, contains filter and pagination values
Returns:
never null, contains the List of AssetPageRow
Throws:
com.google.gwt.user.client.rpc.SerializationException

listAssets

public TableDataResult listAssets(String p0,
                                  String[] p1,
                                  int p2,
                                  int p3,
                                  String p4)
                           throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
Given a format, this will return assets that match. It can also be used for "pagination" by passing in start and finish row numbers.

Specified by:
listAssets in interface AssetService
Parameters:
p0 - The package uuid to search inside.
p3 - The number of rows to return. -1 means all.
Throws:
com.google.gwt.user.client.rpc.SerializationException

listAssetsWithPackageName

public TableDataResult listAssetsWithPackageName(String p0,
                                                 String[] p1,
                                                 int p2,
                                                 int p3,
                                                 String p4)
                                          throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
Given a format, this will return assets that match. It can also be used for "pagination" by passing in start and finish row numbers.

Specified by:
listAssetsWithPackageName in interface AssetService
Parameters:
p0 - The name of package to search inside.
p3 - The number of rows to return. -1 means all.
Throws:
com.google.gwt.user.client.rpc.SerializationException

copyAsset

public String copyAsset(String p0,
                        String p1,
                        String p2)
Description copied from interface: AssetService
Copies an asset into a new destination package.

Specified by:
copyAsset in interface AssetService
Parameters:
p0 - The source assetID.
p1 - The destination package (may be the same as the current source package, but in that case the asset has to have a different name).
p2 - The new name of the asset.

promoteAssetToGlobalArea

public void promoteAssetToGlobalArea(String p0)
Description copied from interface: AssetService
Prompt an asset into Global area.

Specified by:
promoteAssetToGlobalArea in interface AssetService
Parameters:
p0 - The source assetID.

changeAssetPackage

public void changeAssetPackage(String p0,
                               String p1,
                               String p2)
Description copied from interface: AssetService
This moves an asset to the given target package.

Specified by:
changeAssetPackage in interface AssetService

changeState

public void changeState(String p0,
                        String p1)
Description copied from interface: AssetService
This will change the state of an asset.

Specified by:
changeState in interface AssetService
Parameters:
p0 - The UUID of the asset we are tweaking.
p1 - The new state to set. It must be valid in the repo.

changePackageState

public void changePackageState(String p0,
                               String p1)
Description copied from interface: AssetService
This will change the state of package.

Specified by:
changePackageState in interface AssetService
Parameters:
p0 - The UUID of the asset we are tweaking.

loadDiscussionForAsset

public List loadDiscussionForAsset(String p0)
Description copied from interface: AssetService
Return a list of discussion items for a given asset...

Specified by:
loadDiscussionForAsset in interface AssetService

addToDiscussionForAsset

public List addToDiscussionForAsset(String p0,
                                    String p1)
Description copied from interface: AssetService
Append a discussion item for the current user.

Specified by:
addToDiscussionForAsset in interface AssetService

clearAllDiscussionsForAsset

public void clearAllDiscussionsForAsset(String p0)
Description copied from interface: AssetService
Only for admins, they can nuke it from orbit to clear it out

Specified by:
clearAllDiscussionsForAsset in interface AssetService

loadRuleListForState

public PageResponse loadRuleListForState(StatePageRequest p0)
                                  throws com.google.gwt.user.client.rpc.SerializationException
PLACE THE FOLLOWING IN RepositoryServiceServlet.java

Specified by:
loadRuleListForState in interface RepositoryService
Parameters:
p0 - Request specific details
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadRuleListForState

public TableDataResult loadRuleListForState(String p0,
                                            int p1,
                                            int p2,
                                            String p3)
                                     throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Return a a 2d array/grid of results for rules.

Specified by:
loadRuleListForState in interface RepositoryService
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadTableConfig

public TableConfig loadTableConfig(String p0)
Description copied from interface: RepositoryService
This will return a TableConfig of header names.

Specified by:
loadTableConfig in interface RepositoryService
Parameters:
p0 - The name of the list that we are going to render.

createNewRule

public String createNewRule(String p0,
                            String p1,
                            String p2,
                            String p3,
                            String p4)
                     throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
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.

Specified by:
createNewRule in interface RepositoryService
Throws:
com.google.gwt.user.client.rpc.SerializationException

createNewImportedRule

public String createNewImportedRule(String p0,
                                    String p1)
                             throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Creates a new rule which is imported from global area. Return the UUID of the item created. This will not check in the rule, but just leave it as saved in the repo.

Specified by:
createNewImportedRule in interface RepositoryService
Throws:
com.google.gwt.user.client.rpc.SerializationException

deleteUncheckedRule

public void deleteUncheckedRule(String p0)
Description copied from interface: RepositoryService
Delete un checked in Asset

Specified by:
deleteUncheckedRule in interface RepositoryService

clearRulesRepository

public void clearRulesRepository()
Description copied from interface: RepositoryService
Clear the rules repositoty, Use at your own risk.

Specified by:
clearRulesRepository in interface RepositoryService

listWorkspaces

public String[] listWorkspaces()
Description copied from interface: RepositoryService
This returns a list of workspaces

Specified by:
listWorkspaces in interface RepositoryService

createWorkspace

public void createWorkspace(String p0)
Description copied from interface: RepositoryService
This creates a workspace

Specified by:
createWorkspace in interface RepositoryService

removeWorkspace

public void removeWorkspace(String p0)
Description copied from interface: RepositoryService
This removes a workspace

Specified by:
removeWorkspace in interface RepositoryService

updateWorkspace

public void updateWorkspace(String p0,
                            String[] p1,
                            String[] p2)
Description copied from interface: RepositoryService
This removes a workspace

Specified by:
updateWorkspace in interface RepositoryService

updateDependency

public void updateDependency(String p0,
                             String p1)
Specified by:
updateDependency in interface PackageService

getDependencies

public String[] getDependencies(String p0)
Specified by:
getDependencies in interface PackageService

checkinVersion

public String checkinVersion(RuleAsset p0)
                      throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: AssetService
This checks in a new version of an asset.

Specified by:
checkinVersion in interface AssetService
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

public void restoreVersion(String p0,
                           String p1,
                           String p2)
Description copied from interface: AssetService
This will restore the specified version in the repository, saving, and creating a new version (with all the restored content).

Specified by:
restoreVersion in interface AssetService

listStates

public String[] listStates()
                    throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Returns a list of valid states.

Specified by:
listStates in interface RepositoryService
Throws:
com.google.gwt.user.client.rpc.SerializationException

createState

public String createState(String p0)
                   throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Create a state (status).

Specified by:
createState in interface RepositoryService
Returns:
the UUID of the created StateItem.
Throws:
com.google.gwt.user.client.rpc.SerializationException

renameState

public void renameState(String p0,
                        String p1)
                 throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Renames a state.

Specified by:
renameState in interface RepositoryService
Parameters:
p0 - states old name.
p1 - states new name.
Throws:
com.google.gwt.user.client.rpc.SerializationException

removeState

public void removeState(String p0)
                 throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Removes a state.

Specified by:
removeState in interface RepositoryService
Parameters:
p0 - state name that will be removed.
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadSuggestionCompletionEngine

public SuggestionCompletionEngine loadSuggestionCompletionEngine(String p0)
                                                          throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
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.

Specified by:
loadSuggestionCompletionEngine in interface RepositoryService
Throws:
com.google.gwt.user.client.rpc.SerializationException

getCustomSelectors

public String[] getCustomSelectors()
                            throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
return custom selector names

Specified by:
getCustomSelectors in interface RepositoryService
Throws:
com.google.gwt.user.client.rpc.SerializationException

showLog

public PageResponse showLog(PageRequest p0)
Description copied from interface: RepositoryService
This will list log entries logged by the server. For debugging purposes in the GUI. This is an equivalent function to RepositoryService.showLog() which has been deprecated in favour of DTO centric operations.

Specified by:
showLog in interface RepositoryService

showLog

public LogEntry[] showLog()
Description copied from interface: RepositoryService
This will list the last N log entryies logged by the server. For debugging purposes in the GUI.

Specified by:
showLog in interface RepositoryService

cleanLog

public void cleanLog()
Description copied from interface: RepositoryService
clean up the log entry.

Specified by:
cleanLog in interface RepositoryService

loadDropDownExpression

public String[] loadDropDownExpression(String[] p0,
                                       String p1)
Specified by:
loadDropDownExpression in interface RepositoryService
Parameters:
p0 - key=value pairs to be interpolated into the expression.
p1 - The expression, which will then be eval'ed to generate a String[]

queryFullText

public PageResponse queryFullText(QueryPageRequest p0)
                           throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Runs a full text search using JCR.

Specified by:
queryFullText in interface RepositoryService
Returns:
Throws:
com.google.gwt.user.client.rpc.SerializationException

queryMetaData

public PageResponse queryMetaData(QueryMetadataPageRequest p0)
                           throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Run a meta data search. All dates are in format as configured for the system. Pass in null and they will not be included in the search (that applies to any field).

Specified by:
queryMetaData in interface RepositoryService
Returns:
Throws:
com.google.gwt.user.client.rpc.SerializationException

queryMetaData

public TableDataResult queryMetaData(MetaDataQuery[] p0,
                                     Date p1,
                                     Date p2,
                                     Date p3,
                                     Date p4,
                                     boolean p5,
                                     int p6,
                                     int p7)
                              throws com.google.gwt.user.client.rpc.SerializationException
Description copied from interface: RepositoryService
Run a meta data search. All dates are in format as configured for the system. Pass in null and they will not be included in the search (that applies to any field).

Specified by:
queryMetaData in interface RepositoryService
Returns:
Throws:
com.google.gwt.user.client.rpc.SerializationException

listUserPermissions

public PageResponse listUserPermissions(PageRequest p0)
                                 throws DetailedSerializationException
Specified by:
listUserPermissions in interface RepositoryService
Returns:
A map of username : list of permission types for display reasons.
Throws:
DetailedSerializationException

listUserPermissions

public Map listUserPermissions()
                        throws DetailedSerializationException
Specified by:
listUserPermissions in interface RepositoryService
Returns:
A map of username : list of permission types for display reasons.
Throws:
DetailedSerializationException

retrieveUserPermissions

public Map retrieveUserPermissions(String p0)
Description copied from interface: RepositoryService
Loads the user permissions.

Specified by:
retrieveUserPermissions in interface RepositoryService
Returns:
A map of permission type to the targets it applies to.

updateUserPermissions

public void updateUserPermissions(String p0,
                                  Map p1)
Description copied from interface: RepositoryService
Update the user permissions - takes the userName, and a map from permission type to the list of targets it applies to.

Specified by:
updateUserPermissions in interface RepositoryService

listAvailablePermissionTypes

public String[] listAvailablePermissionTypes()
Description copied from interface: RepositoryService
List the available permission types.

Specified by:
listAvailablePermissionTypes in interface RepositoryService
Returns:

deleteUser

public void deleteUser(String p0)
Description copied from interface: RepositoryService
Removes user security data.

Specified by:
deleteUser in interface RepositoryService

createUser

public void createUser(String p0)
Description copied from interface: RepositoryService
create new user.

Specified by:
createUser in interface RepositoryService

subscribe

public List subscribe()
Description copied from interface: RepositoryService
Subscribe for a "callback" for a given request.

Specified by:
subscribe in interface RepositoryService

loadInbox

public TableDataResult loadInbox(String p0)
                          throws DetailedSerializationException
Description copied from interface: RepositoryService
Load the data for a given inbox for the currently logged in user.

Specified by:
loadInbox in interface RepositoryService
Throws:
DetailedSerializationException

loadInbox

public PageResponse loadInbox(InboxPageRequest p0)
                       throws DetailedSerializationException
Description copied from interface: RepositoryService
Load the data for a given inbox for the currently logged in user.

Specified by:
loadInbox in interface RepositoryService
Throws:
DetailedSerializationException

processTemplate

public String processTemplate(String p0,
                              Map p1)
Description copied from interface: RepositoryService
Load and process the repository configuration templates.

Specified by:
processTemplate in interface RepositoryService

isHostedMode

public Boolean isHostedMode()
Specified by:
isHostedMode in interface RepositoryService

loadSpringContextElementData

public Map loadSpringContextElementData()
                                 throws DetailedSerializationException
Description copied from interface: RepositoryService
Returns the Spring context elements specified by SpringContextElementsManager

Specified by:
loadSpringContextElementData in interface RepositoryService
Returns:
a Map containing the key,value pairs of data.
Throws:
DetailedSerializationException


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