public class FlowConfigsV2Resource extends com.linkedin.restli.server.resources.ComplexKeyResourceTemplate<FlowId,FlowStatusId,FlowConfig>
| Modifier and Type | Field and Description |
|---|---|
static FlowConfigsResourceHandler |
global_flowConfigsResourceHandler |
static String |
INJECT_READY_TO_USE |
| Constructor and Description |
|---|
FlowConfigsV2Resource() |
| Modifier and Type | Method and Description |
|---|---|
void |
checkPropertyUpdatesAllowed(List<ServiceRequester> requesterList,
FlowConfig updatedFlowConfig)
Check that the properties being updated are allowed to be updated.
|
void |
checkRequester(FlowConfig originalFlowConfig,
List<ServiceRequester> requesterList)
Check that all
ServiceRequesters in this request are contained within the original service requester list
or is part of the original requester's owning group when the flow was submitted. |
void |
checkUpdateDeleteAllowed(FlowConfig originalFlowConfig,
FlowConfig updatedFlowConfig)
Check that this update or delete operation is allowed, throw a
FlowConfigLoggedException if not. |
com.linkedin.restli.server.CreateKVResponse |
create(FlowConfig flowConfig)
Create a flow configuration that the service will forward to execution instances for execution
|
com.linkedin.restli.server.UpdateResponse |
delete(com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId> key)
Delete a configured flow.
|
FlowConfig |
get(com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId> key)
Retrieve the flow configuration with the given key
|
List<FlowConfig> |
getAll(com.linkedin.restli.server.PagingContext pagingContext)
Retrieve all the flow configurations
|
List<FlowConfig> |
getFilteredFlows(com.linkedin.restli.server.PagingContext context,
String flowGroup,
String flowName,
String templateUri,
String userToProxy,
String sourceIdentifier,
String destinationIdentifier,
String schedule,
Boolean isRunImmediately,
String owningGroup,
String propertyFilter)
Get all
FlowConfigs that matches the provided parameters. |
String |
runImmediately(com.linkedin.restli.server.PathKeys pathKeys)
Trigger a new execution of an existing flow
|
com.linkedin.restli.server.UpdateResponse |
update(com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId> key,
FlowConfig flowConfig)
Update the flow configuration with the specified key.
|
com.linkedin.restli.server.UpdateResponse |
update(com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId> key,
com.linkedin.restli.common.PatchRequest<FlowConfig> flowConfigPatch)
Partial update the flowConfig specified
|
batchCreate, batchDelete, batchGet, batchUpdate, batchUpdategetContext, setContextpublic static final String INJECT_READY_TO_USE
public static FlowConfigsResourceHandler global_flowConfigsResourceHandler
public FlowConfig get(com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId> key)
get in interface com.linkedin.restli.server.resources.CollectionResource<com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId>,FlowConfig>get in class com.linkedin.restli.server.resources.ComplexKeyResourceTemplate<FlowId,FlowStatusId,FlowConfig>key - flow config id key containing group name and flow nameFlowConfig with flow configurationpublic List<FlowConfig> getAll(com.linkedin.restli.server.PagingContext pagingContext)
getAll in interface com.linkedin.restli.server.resources.CollectionResource<com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId>,FlowConfig>getAll in class com.linkedin.restli.server.resources.ComplexKeyResourceTemplate<FlowId,FlowStatusId,FlowConfig>public List<FlowConfig> getFilteredFlows(com.linkedin.restli.server.PagingContext context, String flowGroup, String flowName, String templateUri, String userToProxy, String sourceIdentifier, String destinationIdentifier, String schedule, Boolean isRunImmediately, String owningGroup, String propertyFilter)
FlowConfigs that matches the provided parameters. All the parameters are optional.
If a parameter is null, it is ignored. FlowConfigV2Resource#getFilteredFlowspublic com.linkedin.restli.server.CreateKVResponse create(FlowConfig flowConfig)
create in interface com.linkedin.restli.server.resources.CollectionResource<com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId>,FlowConfig>create in class com.linkedin.restli.server.resources.ComplexKeyResourceTemplate<FlowId,FlowStatusId,FlowConfig>flowConfig - flow configurationCreateResponsepublic com.linkedin.restli.server.UpdateResponse update(com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId> key, FlowConfig flowConfig)
update in interface com.linkedin.restli.server.resources.CollectionResource<com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId>,FlowConfig>update in class com.linkedin.restli.server.resources.ComplexKeyResourceTemplate<FlowId,FlowStatusId,FlowConfig>key - composite key containing group name and flow name that identifies the flow to updateflowConfig - new flow configurationUpdateResponsepublic com.linkedin.restli.server.UpdateResponse update(com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId> key, com.linkedin.restli.common.PatchRequest<FlowConfig> flowConfigPatch)
update in interface com.linkedin.restli.server.resources.CollectionResource<com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId>,FlowConfig>update in class com.linkedin.restli.server.resources.ComplexKeyResourceTemplate<FlowId,FlowStatusId,FlowConfig>key - composite key containing group name and flow name that identifies the flow to updateflowConfigPatch - patch describing what fields to changeUpdateResponsepublic com.linkedin.restli.server.UpdateResponse delete(com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId> key)
delete in interface com.linkedin.restli.server.resources.CollectionResource<com.linkedin.restli.common.ComplexResourceKey<FlowId,FlowStatusId>,FlowConfig>delete in class com.linkedin.restli.server.resources.ComplexKeyResourceTemplate<FlowId,FlowStatusId,FlowConfig>key - composite key containing flow group and flow name that identifies the flow to remove from the flow catalogUpdateResponsepublic String runImmediately(com.linkedin.restli.server.PathKeys pathKeys)
pathKeys - key of FlowId specified in pathpublic void checkUpdateDeleteAllowed(FlowConfig originalFlowConfig, FlowConfig updatedFlowConfig)
FlowConfigLoggedException if not.public void checkPropertyUpdatesAllowed(List<ServiceRequester> requesterList, FlowConfig updatedFlowConfig)
RequesterService.REQUESTER_LIST is being modified, and only allow it if a user is changing
it to themselves.public void checkRequester(FlowConfig originalFlowConfig, List<ServiceRequester> requesterList)
ServiceRequesters in this request are contained within the original service requester list
or is part of the original requester's owning group when the flow was submitted. If they are not, throw a FlowConfigLoggedException with HttpStatus.S_401_UNAUTHORIZED.
If there is a failure when deserializing the original requester list, throw a FlowConfigLoggedException with
HttpStatus.S_400_BAD_REQUEST.originalFlowConfig - original flow config to find original requesterrequesterList - list of requesters for this request