org.drools.guvnor.client.rpc
Interface RepositoryService

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

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

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
 void cleanLog()
          clean up the log entry.
 void clearRulesRepository()
          Clear the rules repositoty, Use at your own risk.
 String createNewImportedRule(String sharedAssetName, String initialPackage)
          Creates a new rule which is imported from global area.
 String createNewRule(String ruleName, String description, String initialCategory, String initialPackage, String format)
          Creates a brand new rule with the initial category.
 String createState(String name)
          Create a state (status).
 void createUser(String userName)
          create new user.
 void createWorkspace(String workspace)
          This creates a workspace
 void deleteUncheckedRule(String ruleName)
          Delete un checked in Asset
 void deleteUser(String userName)
          Removes user security data.
 String[] getCustomSelectors()
          return custom selector names
 Boolean isHostedMode()
           
 String[] listAvailablePermissionTypes()
          List the available permission types.
 String[] listStates()
          Returns a list of valid states.
 Map<String,List<String>> listUserPermissions()
          Deprecated. in favour of listUserPermissions(PageRequest)
 PageResponse<PermissionsPageRow> listUserPermissions(PageRequest request)
           
 String[] listWorkspaces()
          This returns a list of workspaces
 String[] loadDropDownExpression(String[] valuePairs, String expression)
           
 PageResponse<InboxPageRow> loadInbox(InboxPageRequest request)
          Load the data for a given inbox for the currently logged in user.
 TableDataResult loadInbox(String inboxName)
          Deprecated. in favour of loadInbox(InboxPageRequest)
 PageResponse<StatePageRow> loadRuleListForState(StatePageRequest request)
          Return a list of Assets by status
 TableDataResult loadRuleListForState(String state, int skip, int numRows, String tableConfig)
          Deprecated. in favour of loadRuleListForState(StatePageRequest)
 Map<String,String> loadSpringContextElementData()
          Returns the Spring context elements specified by SpringContextElementsManager
 SuggestionCompletionEngine loadSuggestionCompletionEngine(String packageName)
          Loads up the SuggestionCompletionEngine for the given package.
 TableConfig loadTableConfig(String listName)
          Deprecated. in favour of AbstractPagedTable
 String processTemplate(String name, Map<String,Object> data)
          Load and process the repository configuration templates.
 PageResponse<QueryPageRow> queryFullText(QueryPageRequest request)
          Runs a full text search using JCR.
 TableDataResult queryMetaData(MetaDataQuery[] qr, Date createdAfter, Date createdBefore, Date modifiedAfter, Date modifiedBefore, boolean seekArchived, int skip, int numRows)
          Deprecated. in favour of queryMetaData(QueryPageRequest)
 PageResponse<QueryPageRow> queryMetaData(QueryMetadataPageRequest request)
          Run a meta data search.
 void removeState(String name)
          Removes a state.
 void removeWorkspace(String workspace)
          This removes a workspace
 void renameState(String oldName, String newName)
          Renames a state.
 Map<String,List<String>> retrieveUserPermissions(String userName)
          Loads the user permissions.
 LogEntry[] showLog()
          Deprecated. in favour of showLogEntries()
 PageResponse<LogPageRow> showLog(PageRequest request)
          This will list log entries logged by the server.
 List<PushResponse> subscribe()
          Subscribe for a "callback" for a given request.
 void updateUserPermissions(String userName, Map<String,List<String>> perms)
          Update the user permissions - takes the userName, and a map from permission type to the list of targets it applies to.
 void updateWorkspace(String workspace, String[] selectedModules, String[] unselectedModules)
          This removes a workspace
 

Method Detail

loadRuleListForState

TableDataResult loadRuleListForState(String state,
                                     int skip,
                                     int numRows,
                                     String tableConfig)
                                     throws com.google.gwt.user.client.rpc.SerializationException
Deprecated. in favour of loadRuleListForState(StatePageRequest)

Return a a 2d array/grid of results for rules.

Parameters:
The - name of the state.
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadRuleListForState

PageResponse<StatePageRow> loadRuleListForState(StatePageRequest request)
                                                throws com.google.gwt.user.client.rpc.SerializationException
Return a list of Assets by status

Parameters:
request - Request specific details
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadTableConfig

TableConfig loadTableConfig(String listName)
Deprecated. in favour of AbstractPagedTable

This will return a TableConfig of header names.

Parameters:
listName - The name of the list that we are going to render.

createNewRule

String createNewRule(String ruleName,
                     String description,
                     String initialCategory,
                     String initialPackage,
                     String format)
                     throws com.google.gwt.user.client.rpc.SerializationException
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.

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

createNewImportedRule

String createNewImportedRule(String sharedAssetName,
                             String initialPackage)
                             throws com.google.gwt.user.client.rpc.SerializationException
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.

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

deleteUncheckedRule

void deleteUncheckedRule(String ruleName)
Delete un checked in Asset


clearRulesRepository

void clearRulesRepository()
Clear the rules repositoty, Use at your own risk.


listWorkspaces

String[] listWorkspaces()
This returns a list of workspaces


createWorkspace

void createWorkspace(String workspace)
This creates a workspace


removeWorkspace

void removeWorkspace(String workspace)
This removes a workspace


updateWorkspace

void updateWorkspace(String workspace,
                     String[] selectedModules,
                     String[] unselectedModules)
This removes a workspace


listStates

String[] listStates()
                    throws com.google.gwt.user.client.rpc.SerializationException
Returns a list of valid states.

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

createState

String createState(String name)
                   throws com.google.gwt.user.client.rpc.SerializationException
Create a state (status).

Returns:
the UUID of the created StateItem.
Throws:
com.google.gwt.user.client.rpc.SerializationException

renameState

void renameState(String oldName,
                 String newName)
                 throws com.google.gwt.user.client.rpc.SerializationException
Renames a state.

Parameters:
oldName - states old name.
newName - states new name.
Throws:
com.google.gwt.user.client.rpc.SerializationException

removeState

void removeState(String name)
                 throws com.google.gwt.user.client.rpc.SerializationException
Removes a state.

Parameters:
name - state name that will be removed.
Throws:
com.google.gwt.user.client.rpc.SerializationException

loadSuggestionCompletionEngine

SuggestionCompletionEngine loadSuggestionCompletionEngine(String packageName)
                                                          throws com.google.gwt.user.client.rpc.SerializationException
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.

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

getCustomSelectors

String[] getCustomSelectors()
                            throws com.google.gwt.user.client.rpc.SerializationException
return custom selector names

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

showLog

LogEntry[] showLog()
Deprecated. in favour of showLogEntries()

This will list the last N log entryies logged by the server. For debugging purposes in the GUI.


showLog

PageResponse<LogPageRow> showLog(PageRequest request)
This will list log entries logged by the server. For debugging purposes in the GUI. This is an equivalent function to showLog() which has been deprecated in favour of DTO centric operations.


cleanLog

void cleanLog()
clean up the log entry.


loadDropDownExpression

String[] loadDropDownExpression(String[] valuePairs,
                                String expression)
Parameters:
valuePairs - key=value pairs to be interpolated into the expression.
expression - The expression, which will then be eval'ed to generate a String[]

queryFullText

PageResponse<QueryPageRow> queryFullText(QueryPageRequest request)
                                         throws com.google.gwt.user.client.rpc.SerializationException
Runs a full text search using JCR.

Parameters:
request -
Returns:
Throws:
com.google.gwt.user.client.rpc.SerializationException

queryMetaData

TableDataResult queryMetaData(MetaDataQuery[] qr,
                              Date createdAfter,
                              Date createdBefore,
                              Date modifiedAfter,
                              Date modifiedBefore,
                              boolean seekArchived,
                              int skip,
                              int numRows)
                              throws com.google.gwt.user.client.rpc.SerializationException
Deprecated. in favour of queryMetaData(QueryPageRequest)

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

Parameters:
qr -
createdAfter -
createdBefore -
modifiedAfter -
modifiedBefore -
seekArchived -
skip -
numRows -
Returns:
Throws:
com.google.gwt.user.client.rpc.SerializationException

queryMetaData

PageResponse<QueryPageRow> queryMetaData(QueryMetadataPageRequest request)
                                         throws com.google.gwt.user.client.rpc.SerializationException
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).

Parameters:
request -
Returns:
Throws:
com.google.gwt.user.client.rpc.SerializationException

listUserPermissions

Map<String,List<String>> listUserPermissions()
                                             throws DetailedSerializationException
Deprecated. in favour of listUserPermissions(PageRequest)

Returns:
A map of username : list of permission types for display reasons.
Throws:
DetailedSerializationException

listUserPermissions

PageResponse<PermissionsPageRow> listUserPermissions(PageRequest request)
                                                     throws DetailedSerializationException
Returns:
A map of username : list of permission types for display reasons.
Throws:
DetailedSerializationException

retrieveUserPermissions

Map<String,List<String>> retrieveUserPermissions(String userName)
Loads the user permissions.

Parameters:
userName -
Returns:
A map of permission type to the targets it applies to.

updateUserPermissions

void updateUserPermissions(String userName,
                           Map<String,List<String>> perms)
Update the user permissions - takes the userName, and a map from permission type to the list of targets it applies to.


listAvailablePermissionTypes

String[] listAvailablePermissionTypes()
List the available permission types.

Returns:

deleteUser

void deleteUser(String userName)
Removes user security data.


createUser

void createUser(String userName)
create new user.


subscribe

List<PushResponse> subscribe()
Subscribe for a "callback" for a given request.


loadInbox

TableDataResult loadInbox(String inboxName)
                          throws DetailedSerializationException
Deprecated. in favour of loadInbox(InboxPageRequest)

Load the data for a given inbox for the currently logged in user.

Throws:
DetailedSerializationException

processTemplate

String processTemplate(String name,
                       Map<String,Object> data)
Load and process the repository configuration templates.


isHostedMode

Boolean isHostedMode()

loadInbox

PageResponse<InboxPageRow> loadInbox(InboxPageRequest request)
                                     throws DetailedSerializationException
Load the data for a given inbox for the currently logged in user.

Throws:
DetailedSerializationException

loadSpringContextElementData

Map<String,String> loadSpringContextElementData()
                                                throws DetailedSerializationException
Returns the Spring context elements specified by SpringContextElementsManager

Returns:
a Map containing the key,value pairs of data.
Throws:
DetailedSerializationException


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