public class ActivityServiceImpl extends Object implements ActivityService
Constructor and Description |
---|
ActivityServiceImpl() |
Modifier and Type | Method and Description |
---|---|
boolean |
activityExists(URI uri)
Returns true if and only if the activity type exists.
|
Activity<?> |
createActivity(URI activityType,
com.fasterxml.jackson.databind.JsonNode configuration)
Returns the activity for the specified activity type.
|
com.fasterxml.jackson.databind.JsonNode |
getActivityConfigurationSchema(URI activityType)
Returns the JSON Schema for the configuration required by an activity.
|
Set<InputActivityPort> |
getActivityInputPorts(URI activityType,
com.fasterxml.jackson.databind.JsonNode configuration)
Returns the input ports that the activity type requires to be present in
order to execute with the specified configuration.
|
Set<OutputActivityPort> |
getActivityOutputPorts(URI activityType,
com.fasterxml.jackson.databind.JsonNode configuration)
Returns the output ports that the activity type requires to be present in
order to execute with the specified configuration.
|
Set<URI> |
getActivityTypes()
Returns the available activity types.
|
void |
setActivityFactories(List<ActivityFactory> activityFactories)
Sets the list of available
ActivityFactory s. |
public Set<URI> getActivityTypes()
ActivityService
getActivityTypes
in interface ActivityService
public boolean activityExists(URI uri)
ActivityService
activityExists
in interface ActivityService
public com.fasterxml.jackson.databind.JsonNode getActivityConfigurationSchema(URI activityType) throws ActivityNotFoundException
ActivityService
getActivityConfigurationSchema
in interface ActivityService
activityType
- the activity typeActivityNotFoundException
- if an activity cannot be found for the specified URIpublic Activity<?> createActivity(URI activityType, com.fasterxml.jackson.databind.JsonNode configuration) throws ActivityNotFoundException, ActivityConfigurationException
ActivityService
createActivity
in interface ActivityService
activityType
- the activity typeconfiguration
- the configuration for the activity, can be null
ActivityNotFoundException
- if an activity cannot be found for the specified activity
typeActivityConfigurationException
- if the configuration is not validpublic Set<InputActivityPort> getActivityInputPorts(URI activityType, com.fasterxml.jackson.databind.JsonNode configuration) throws ActivityNotFoundException, ActivityConfigurationException
ActivityService
If the activity does not require any input port for the configuration then an empty set is returned.
getActivityInputPorts
in interface ActivityService
configuration
- the activity configurationActivityNotFoundException
- if the activity cannot be foundActivityConfigurationException
- if the activity configuration is incorrectpublic Set<OutputActivityPort> getActivityOutputPorts(URI activityType, com.fasterxml.jackson.databind.JsonNode configuration) throws ActivityNotFoundException, ActivityConfigurationException
ActivityService
If the activity type does not require any output ports for the configuration then an empty set is returned.
getActivityOutputPorts
in interface ActivityService
configuration
- the activity configurationActivityNotFoundException
- if the activity cannot be foundActivityConfigurationException
- if the activity configuration is incorrectpublic void setActivityFactories(List<ActivityFactory> activityFactories)
ActivityFactory
s. In a production
environment this should be set by Spring DM.activityFactories
- the list of available ActivityFactory
sCopyright © 2015–2016 The Apache Software Foundation. All rights reserved.