Package org.ametys.odf.cdmfr
Class CDMFRHandler
java.lang.Object
org.ametys.odf.cdmfr.CDMFRHandler
- All Implemented Interfaces:
Component
,Contextualizable
,Serviceable
CDM-fr handler to deposit or send CDM-fr
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Context
The contextprotected DepositCDMfrProcessor
The deposit CDM-fr processorprotected ODFHelper
The ODF helperprotected AmetysObjectResolver
The Ametys object resolverprotected SendCDMfrProcessor
The send CDM-fr processorstatic final String
The component role.static final String
Key to get if the CDM-fr observer is suspended -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
contextualize
(Context context) getProgramParents
(Content content) Get the program parents for CDM-fr treatmentvoid
handleCDMFR
(List<ModifiableContent> contents) Handle CDM-fr for the given contentsboolean
true
if the CDM-fr observer is suspendedboolean
Check if at least one of the external CDM-fr actions is active.void
service
(ServiceManager manager) void
Suspend CDM-fr observers.void
unsuspendCDMFRObserver
(Set<String> waitingContentIds) Unsuspend CDM-fr observers.
-
Field Details
-
ROLE
The component role. -
SUSPEND_CDMFR
Key to get if the CDM-fr observer is suspended- See Also:
-
_resolver
The Ametys object resolver -
_odfHelper
The ODF helper -
_sendCDMfrProcessor
The send CDM-fr processor -
_depositCDMfrProcessor
The deposit CDM-fr processor -
_context
The context
-
-
Constructor Details
-
CDMFRHandler
public CDMFRHandler()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Throws:
ServiceException
-
contextualize
- Specified by:
contextualize
in interfaceContextualizable
- Throws:
ContextException
-
needToHandle
Check if at least one of the external CDM-fr actions is active.- Returns:
true
if one of the action is active and the handler is useful
-
handleCDMFR
Handle CDM-fr for the given contents- Parameters:
contents
- the list of contents
-
getProgramParents
Get the program parents for CDM-fr treatment- Parameters:
content
- the content- Returns:
- the set of program parents
-
isSuspended
true
if the CDM-fr observer is suspended- Returns:
true
if the CDM-fr observer is suspended
-
suspendCDMFRObserver
Suspend CDM-fr observers. If you call this method, theunsuspendCDMFRObserver(Set)
method should be call at the end of you treatments. -
unsuspendCDMFRObserver
Unsuspend CDM-fr observers. You can give content identifiers to the method to be handled.- Parameters:
waitingContentIds
- The collection of content identifiers waiting to be handle, can be null
-