public class CmmnCaseProviderProxy extends Object implements AnyWorkObjectProvider, org.springframework.context.ApplicationContextAware
This class is a workaround for the multiple circular dependencies on the AnyWorkObjectService in the CMMN provider.
TODO (guy.brand): find a better way to deal with those dependencies. See CLD-11237
Constructor and Description |
---|
CmmnCaseProviderProxy() |
Modifier and Type | Method and Description |
---|---|
void |
addListener(AnyWorkObjectProviderListener listener)
Registers the listener.
|
void |
cancel(String workObjectId)
Cancels or terminates any background activities / processes associated with the given work object.
|
String |
create(AnyWorkObject template,
String parentId)
Creates a new entity based on the given template.
|
void |
delete(String externalId)
Deletes the entity with the given id .
|
void |
deployDefinitions(List<? extends org.springframework.core.io.Resource> resources,
String deploymentName)
Deploys the given definition resources.
|
CmmnCaseProvider |
getCmmnCaseProvider() |
Collection<AnyWorkObjectDefinition> |
getDefinitions()
Returns all definitions known to the provider.
|
String |
getId()
The object id.
|
String |
getWorkObjectType()
Returns the type of entity that are managed by this provider.
|
void |
removeListener(AnyWorkObjectProviderListener listener)
Unregisters the listener.
|
void |
setApplicationContext(org.springframework.context.ApplicationContext applicationContext) |
void |
update(String workObjectId,
List<FieldChange> changes)
Updates the entity with the given id by applying the submitted changes.
|
public String getId()
Identifiable
The object id.
getId
in interface Identifiable
public void addListener(AnyWorkObjectProviderListener listener)
EntityProvider
Registers the listener. The listener is notified about all all relevant events occurring in the underlying system.
addListener
in interface EntityProvider<AnyWorkObjectProviderListener>
listener
- the listener to be registeredpublic void removeListener(AnyWorkObjectProviderListener listener)
EntityProvider
Unregisters the listener. The listener is no longer notified about any events occurring in the underlying system.
removeListener
in interface EntityProvider<AnyWorkObjectProviderListener>
listener
- the listener to be unregisteredpublic String getWorkObjectType()
DomainObjectProvider
Returns the type of entity that are managed by this provider.
getWorkObjectType
in interface DomainObjectProvider
public Collection<AnyWorkObjectDefinition> getDefinitions()
DomainObjectProvider
Returns all definitions known to the provider.
getDefinitions
in interface DomainObjectProvider
public void deployDefinitions(List<? extends org.springframework.core.io.Resource> resources, String deploymentName)
DomainObjectProvider
Deploys the given definition resources. Typically, the implementation creates definition instances based on the given resources and notifies the provider listeners.
deployDefinitions
in interface DomainObjectProvider
resources
- the definition resources to deploydeploymentName
- the name under which to deploy the given resourcespublic String create(AnyWorkObject template, String parentId)
DomainObjectProvider
Creates a new entity based on the given template.
Typically, the template is used to build the initial data set of the entity that is created. Multiple entities based on the same definition can be created at the same time. Each created entity can be uniquely identified by its id.
create
in interface DomainObjectProvider
template
- the definition id of the entity to createparentId
- the parent work object ID (may be null
)public void cancel(String workObjectId)
WorkObjectProvider
Cancels or terminates any background activities / processes associated with the given work object.
If no background activity is present then this method will have no effect.
cancel
in interface WorkObjectProvider
workObjectId
- ID of the work object to be cancelledpublic void update(String workObjectId, List<FieldChange> changes)
DomainObjectProvider
Updates the entity with the given id by applying the submitted changes.
update
in interface DomainObjectProvider
workObjectId
- the external id of the entity to updatechanges
- the changes to apply on the entitypublic void delete(String externalId)
DomainObjectProvider
Deletes the entity with the given id .
delete
in interface DomainObjectProvider
externalId
- the external id of the entity to deletepublic void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
org.springframework.beans.BeansException
public CmmnCaseProvider getCmmnCaseProvider()
Copyright © 2010 - 2019 edorasware ag. All Rights Reserved.