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 ContextThe contextprotected DepositCDMfrProcessorThe deposit CDM-fr processorprotected ODFHelperThe ODF helperprotected AmetysObjectResolverThe Ametys object resolverprotected SendCDMfrProcessorThe send CDM-fr processorstatic final StringThe component role.static final StringKey to get if the CDM-fr observer is suspended -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcontextualize(Context context) getProgramParents(Content content) Get the program parents for CDM-fr treatmentvoidhandleCDMFR(List<ModifiableContent> contents) Handle CDM-fr for the given contentsbooleantrueif the CDM-fr observer is suspendedbooleanCheck if at least one of the external CDM-fr actions is active.voidservice(ServiceManager manager) voidSuspend CDM-fr observers.voidunsuspendCDMFRObserver(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:
servicein interfaceServiceable- Throws:
ServiceException
-
contextualize
- Specified by:
contextualizein interfaceContextualizable- Throws:
ContextException
-
needToHandle
Check if at least one of the external CDM-fr actions is active.- Returns:
trueif 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
trueif the CDM-fr observer is suspended- Returns:
trueif 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
-