Class ToDoActionHandler
java.lang.Object
org.odpi.openmetadata.frameworkservices.omf.client.handlers.ToDoActionHandler
-
Constructor Summary
ConstructorsConstructorDescriptionToDoActionHandler
(String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) Create a new client that passes userId and password in each HTTP request.ToDoActionHandler
(String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) Create a new client with no authentication embedded in the HTTP request. -
Method Summary
Modifier and TypeMethodDescriptioncreateToDo
(String userId, String originatorGUID, String actionSponsorGUID, String assignToActorGUID, List<NewToDoActionTargetProperties> newActionTargetProperties, ToDoProperties properties) Create a new to do action and link it to the supplied role and targets (if applicable).void
deleteToDo
(String userId, String toDoGUID) Delete an existing to do.findToDos
(String userId, String searchString, ToDoStatus toDoStatus, int startFrom, int pageSize) Retrieve the "To Dos" that match the search string.getActionsForActionTarget
(String userId, String elementGUID, ToDoStatus toDoStatus, int startFrom, int pageSize) Retrieve the "To Dos" that are chained off of an action target element.getActionsForSponsor
(String userId, String elementGUID, ToDoStatus toDoStatus, int startFrom, int pageSize) Retrieve the "To Dos" that are chained off of a sponsor's element.getAssignedActions
(String userId, String actorGUID, ToDoStatus toDoStatus, int startFrom, int pageSize) Retrieve the "To Dos" for a particular actor.Retrieve a "To Do" by unique identifier.getToDosByType
(String userId, String toDoType, ToDoStatus toDoStatus, int startFrom, int pageSize) Retrieve the "To Dos" that match the type name and status.void
reassignToDo
(String userId, String toDoGUID, String actorGUID) Assign a "To Do" to a new actor.void
updateActionTargetProperties
(String userId, String actionTargetGUID, boolean isMergeUpdate, ToDoActionTargetProperties actionTargetProperties) Update the properties associated with an Action Target.void
updateToDo
(String userId, String toDoGUID, boolean isMergeUpdate, ToDoProperties properties) Update the properties associated with a "To Do".
-
Constructor Details
-
ToDoActionHandler
public ToDoActionHandler(String localServerName, String serverName, String serverPlatformURLRoot, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) throws InvalidParameterException Create a new client with no authentication embedded in the HTTP request.- Parameters:
localServerName
- name of this server (view server)serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesauditLog
- logging destinationaccessServiceURLMarker
- which access service to callserviceName
- local service namemaxPageSize
- maximum number of results supported by this server- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
ToDoActionHandler
public ToDoActionHandler(String localServerName, String serverName, String serverPlatformURLRoot, String userId, String password, AuditLog auditLog, String accessServiceURLMarker, String serviceName, int maxPageSize) throws InvalidParameterException Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.- Parameters:
serverName
- name of the server to connect toserverPlatformURLRoot
- the network address of the server running the OMAS REST servicesuserId
- caller's userId embedded in all HTTP requestspassword
- caller's userId embedded in all HTTP requestsmaxPageSize
- maximum number of results supported by this serverauditLog
- logging destination- Throws:
InvalidParameterException
- there is a problem creating the client-side components to issue any REST API calls.
-
-
Method Details
-
createToDo
public String createToDo(String userId, String originatorGUID, String actionSponsorGUID, String assignToActorGUID, List<NewToDoActionTargetProperties> newActionTargetProperties, ToDoProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Create a new to do action and link it to the supplied role and targets (if applicable).- Parameters:
userId
- calling useroriginatorGUID
- optional originator element (such as a person or Governance Service)actionSponsorGUID
- optional element that maintains the "To Do" on their listassignToActorGUID
- optional actor to assign the action tonewActionTargetProperties
- optional list of elements that the action is to targetproperties
- properties of the to do action- Returns:
- unique identifier of the to do
- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
updateToDo
public void updateToDo(String userId, String toDoGUID, boolean isMergeUpdate, ToDoProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties associated with a "To Do".- Parameters:
userId
- calling usertoDoGUID
- unique identifier of the to doisMergeUpdate
- should the properties overlay the existing stored properties or replace themproperties
- properties to change- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
updateActionTargetProperties
public void updateActionTargetProperties(String userId, String actionTargetGUID, boolean isMergeUpdate, ToDoActionTargetProperties actionTargetProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties associated with an Action Target.- Parameters:
userId
- calling useractionTargetGUID
- unique identifier of the action target relationshipisMergeUpdate
- should the actionTargetProperties overlay the existing stored properties or replace themactionTargetProperties
- properties to change- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
reassignToDo
public void reassignToDo(String userId, String toDoGUID, String actorGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Assign a "To Do" to a new actor.- Parameters:
userId
- calling usertoDoGUID
- unique identifier of the to doactorGUID
- actor to assign the action to- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
deleteToDo
public void deleteToDo(String userId, String toDoGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Delete an existing to do.- Parameters:
userId
- calling usertoDoGUID
- unique identifier of the to do- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
getToDo
public ToDoElement getToDo(String userId, String toDoGUID) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve a "To Do" by unique identifier.- Parameters:
userId
- calling usertoDoGUID
- unique identifier of the to do- Returns:
- to do bean
- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
getActionsForActionTarget
public List<ToDoElement> getActionsForActionTarget(String userId, String elementGUID, ToDoStatus toDoStatus, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve the "To Dos" that are chained off of an action target element.- Parameters:
userId
- calling userelementGUID
- unique identifier of the element to start withtoDoStatus
- optional "To Do" statusstartFrom
- initial position of the results to returnpageSize
- maximum number of results to return- Returns:
- list of to do beans
- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
getActionsForSponsor
public List<ToDoElement> getActionsForSponsor(String userId, String elementGUID, ToDoStatus toDoStatus, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve the "To Dos" that are chained off of a sponsor's element.- Parameters:
userId
- calling userelementGUID
- unique identifier of the element to start withtoDoStatus
- optional "To Do" statusstartFrom
- initial position of the results to returnpageSize
- maximum number of results to return- Returns:
- list of to do beans
- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
getAssignedActions
public List<ToDoElement> getAssignedActions(String userId, String actorGUID, ToDoStatus toDoStatus, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve the "To Dos" for a particular actor.- Parameters:
userId
- calling useractorGUID
- unique identifier of the roletoDoStatus
- optional "To Do" statusstartFrom
- initial position of the results to returnpageSize
- maximum number of results to return- Returns:
- list of to do beans
- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
findToDos
public List<ToDoElement> findToDos(String userId, String searchString, ToDoStatus toDoStatus, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve the "To Dos" that match the search string.- Parameters:
userId
- calling usersearchString
- string to search for (may include RegExs)toDoStatus
- optional "To Do" statusstartFrom
- initial position of the results to returnpageSize
- maximum number of results to return- Returns:
- list of to do beans
- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-
getToDosByType
public List<ToDoElement> getToDosByType(String userId, String toDoType, ToDoStatus toDoStatus, int startFrom, int pageSize) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Retrieve the "To Dos" that match the type name and status.- Parameters:
userId
- calling usertoDoType
- type to search fortoDoStatus
- optional "To Do" statusstartFrom
- initial position of the results to returnpageSize
- maximum number of results to return- Returns:
- list of to do beans
- Throws:
InvalidParameterException
- a parameter is invalidPropertyServerException
- the server is not availableUserNotAuthorizedException
- the calling user is not authorized to issue the call
-