@Transactional(propagation=SUPPORTS,
readOnly=true)
public interface ReferenceSetService
Modifier and Type | Method and Description |
---|---|
boolean |
delete(T2Reference reference) |
void |
deleteReferenceSetsForWorkflowRun(String workflowRunId)
Delete all
ReferenceSet S used by the specific workflow run. |
ReferenceSet |
getReferenceSet(T2Reference id)
Get a previously registered
ReferenceSet by T2Reference . |
void |
getReferenceSetAsynch(T2Reference id,
ReferenceSetServiceCallback callback)
Functionality the same as
getReferenceSet but in asynchronous mode, returning immediately and
using the supplied callback to communicate its results. |
ReferenceSet |
getReferenceSetWithAugmentation(T2Reference id,
Set<Class<ExternalReferenceSPI>> ensureTypes,
ReferenceContext context)
Functionality the same as
getReferenceSet but with the additional option to specify a set of
ExternalReferenceSPI classes. |
void |
getReferenceSetWithAugmentationAsynch(T2Reference id,
Set<Class<ExternalReferenceSPI>> ensureTypes,
ReferenceContext context,
ReferenceSetServiceCallback callback)
Functionality as
getReferenceSetWithAugmentation but with the addition of a callback
interface to report the result or failure of the method. |
ReferenceSet |
registerReferenceSet(Set<ExternalReferenceSPI> references,
ReferenceContext context)
Register a set of
ExternalReferenceSPI instances, all of which
should point to byte equivalent data, and return the newly created
ReferenceSet . |
@Transactional(propagation=REQUIRED, readOnly=false) ReferenceSet registerReferenceSet(Set<ExternalReferenceSPI> references, ReferenceContext context) throws ReferenceSetServiceException
ExternalReferenceSPI
instances, all of which
should point to byte equivalent data, and return the newly created
ReferenceSet
. This method blocks on the underlying store, but
guarantees that the returned value has been persisted.
The created references will be related with a workflow run id passed through ReferenceContext so we can track all data referenced by a specific run.
references
- a set of ExternalReferenceSPI
implementations to
register as a ReferenceSet
ReferenceSet
ReferenceSetServiceException
ReferenceSet getReferenceSet(T2Reference id) throws ReferenceSetServiceException
ReferenceSet
by T2Reference
.
Note that this method blocks and may take some time to return in the case
of distributed reference managers; if this is likely to be an issue then
you should use the asynchronous form
getReferenceSetAsynch
instead of this method.id
- a T2Reference
identifying a ReferenceSet
to
retrieveReferenceSet
ReferenceSetServiceException
void getReferenceSetAsynch(T2Reference id, ReferenceSetServiceCallback callback) throws ReferenceSetServiceException
getReferenceSet
but in asynchronous mode, returning immediately and
using the supplied callback to communicate its results.id
- a T2Reference
identifying a ReferenceSet
to
retrievecallback
- a ReferenceSetServiceCallback
used to convey the
results of the asynchronous callReferenceSetServiceException
- if the reference set service is not correctly configured.
Exceptions encountered when performing the asynchronous call
are not returned here, for obvious reasons, and are instead
messaged through the callback interface.@Transactional(propagation=REQUIRED, readOnly=false) ReferenceSet getReferenceSetWithAugmentation(T2Reference id, Set<Class<ExternalReferenceSPI>> ensureTypes, ReferenceContext context) throws ReferenceSetServiceException
getReferenceSet
but with the additional option to specify a set of
ExternalReferenceSPI
classes. The reference set manager will
attempt to ensure that the returned ReferenceSet
contains an
instance of at least one of the specified classes. This method blocks,
and may potentially incur both the remote lookup overhead of the simpler
version of this call and any translation logic. It is strongly
recommended that you do not use this version of the call and instead use
the asynchronous form
getReferenceSetWithAugmentationAsynch
instead.
If the translation logic cannot provide at least one of the required
types this call will fail, even if the ReferenceSet
requested is
otherwise available.
id
- a T2Reference
identifying a ReferenceSet
to
retrieveensureTypes
- a set of ExternalReferenceSPI
classes. The framework
will attempt to ensure there is an instance of at least one of
these classes in the returned ReferenceSet
context
- if translation of references is required the translation
infrastructure will need information in this
ReferenceContext
parameter.
If null the implementation should insert a new empty context and proceed.
ReferenceSet
ReferenceSetServiceException
@Transactional(propagation=REQUIRED, readOnly=false) void getReferenceSetWithAugmentationAsynch(T2Reference id, Set<Class<ExternalReferenceSPI>> ensureTypes, ReferenceContext context, ReferenceSetServiceCallback callback) throws ReferenceSetServiceException
getReferenceSetWithAugmentation
but with the addition of a callback
interface to report the result or failure of the method.id
- a T2Reference
identifying a ReferenceSet
to
retrieveensureTypes
- a set of ExternalReferenceSPI
classes. The framework
will attempt to ensure there is an instance of at least one of
these classes in the returned ReferenceSet
context
- if translation of references is required the translation
infrastructure will need information in this
ReferenceContext
parameter.
If null the implementation should insert a new empty context and proceed.
callback
- a ReferenceSetServiceCallback
used to convey the
results of the asynchronous call *ReferenceSetServiceException
- if the reference set service is not correctly configured.
Exceptions encountered when performing the asynchronous call
are not returned here, for obvious reasons, and are instead
messaged through the callback interface.@Transactional(propagation=SUPPORTS, readOnly=false) boolean delete(T2Reference reference) throws ReferenceServiceException
ReferenceServiceException
@Transactional(propagation=SUPPORTS, readOnly=false) void deleteReferenceSetsForWorkflowRun(String workflowRunId) throws ReferenceServiceException
ReferenceSet
S used by the specific workflow run.ReferenceServiceException
Copyright © 2015–2016 The Apache Software Foundation. All rights reserved.