Package org.ametys.odf.workflow
Class EditContextualizedDataFunction
java.lang.Object
org.ametys.plugins.workflow.AbstractWorkflowComponent
org.ametys.cms.workflow.AbstractContentWorkflowComponent
org.ametys.cms.workflow.EditContentFunction
org.ametys.odf.workflow.EditContextualizedDataFunction
- All Implemented Interfaces:
com.opensymphony.workflow.FunctionProvider
,EnhancedFunction
,Initializable
,LogEnabled
,Serviceable
Edit content function restricted to contextualized data, ie. data into repeater with educational path
This function allows to edit data by educational path for which the user is responsible.
-
Nested Class Summary
Nested classes/interfaces inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
AbstractWorkflowComponent.ConditionFailure
Nested classes/interfaces inherited from interface org.ametys.plugins.workflow.EnhancedFunction
EnhancedFunction.FunctionType
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
The workflow action id to edit repeater with educational path onlystatic final String
Name of common attribute in a repeater with education path (means that entry is common to all educational paths)static final String
Name of educational path attribute in a repeater with education pathFields inherited from class org.ametys.cms.workflow.EditContentFunction
_contentDataHelper, _contentTypeExtensionPoint, _contentTypesHelper, _disableConditionsEvaluator, _externalizableDataProviderEP, _i18nUtils, _observationManager, _outgoingReferencesExtractor, _sourceResolver, _userManager, _workflowHelper, FALLBACK_VIEW_NAME, FORM_ELEMENTS_PREFIX, FORM_RAW_VALUES, FORM_RAW_VERSION, GLOBAL_VALIDATION, GLOBAL_VALIDATION_RESULT_KEY, IGNORE_WARNINGS, INTERNAL_FORM_ELEMENTS_PREFIX, INVERT_EDIT_ACTION_ID, INVERT_RELATION_EDIT_WORKFLOW_ACTION_ID, KEY_NOTIFY_ARGUMENTS, LOCAL_ONLY, QUIT, RESULT_STATE_KEY, RESULT_STATE_OK, SYNCHRONIZATION_RESULT, VALIDATION_RESULTS_FIELD_LABEL_KEY, VALIDATION_RESULTS_FIELD_PATH_KEY, VALIDATION_RESULTS_FIELD_RESULT_KEY, VALUES_KEY, VIEW, VIEW_ITEMS, VIEW_NAME
Fields inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
_contentHelper, CONTENT_KEY, HAS_CHANGED_KEY
Fields inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_VALIDATION_KEY
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected boolean
canWriteModelItem
(ModelItem modelItem, Content content, Map transientVars) Returnstrue
if the current model item is writable for this content in the current context.void
parseValues
(View view, ModifiableContent content, Map<String, Object> rawValues, boolean localOnly, Map transientVars) Parse the values from form according to the definitions in the givenViewItemAccessor
void
service
(ServiceManager smanager) Methods inherited from class org.ametys.cms.workflow.EditContentFunction
additionalOperations, convertValues, extractOutgoingReferences, getFunctionExecType, getInvertEditActionId, getLabel, getSynchronizationContext, getValues, getView, globalValidate, initialize, invertRelationEnabled, notifyContentModifying, prepareOrNotifyContentModified, prepareSynchronize, processDisableConditions, processDisableConditionsOnComposite, processDisableConditionsOnElement, processDisableConditionsOnRepeater, synchronize, triggerInvertWorkflowAction, updateCommonMetadata, validateRepeaterValue, validateValue, validateValues
Methods inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
getContent
Methods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.ametys.plugins.workflow.EnhancedFunction
getArguments, getFullLabel, getVisibilities
-
Field Details
-
EDIT_WORKFLOW_ACTION_ID
The workflow action id to edit repeater with educational path only- See Also:
-
REPEATER_EDUCATIONAL_PATH_ATTRIBUTE_NAME
Name of educational path attribute in a repeater with education path- See Also:
-
REPEATER_COMMON_ATTRIBUTE_NAME
Name of common attribute in a repeater with education path (means that entry is common to all educational paths)- See Also:
-
-
Constructor Details
-
EditContextualizedDataFunction
public EditContextualizedDataFunction()
-
-
Method Details
-
service
- Specified by:
service
in interfaceServiceable
- Overrides:
service
in classAbstractContentWorkflowComponent
- Throws:
ServiceException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException - Specified by:
execute
in interfacecom.opensymphony.workflow.FunctionProvider
- Overrides:
execute
in classEditContentFunction
- Throws:
com.opensymphony.workflow.WorkflowException
-
canWriteModelItem
Description copied from class:EditContentFunction
Returnstrue
if the current model item is writable for this content in the current context.- Overrides:
canWriteModelItem
in classEditContentFunction
- Parameters:
modelItem
- The model item to checkcontent
- The contenttransientVars
- The parameters from the call- Returns:
true
if the current model item is writable
-
parseValues
protected Map<String,Object> parseValues(View view, ModifiableContent content, Map<String, Object> rawValues, boolean localOnly, Map transientVars) Description copied from class:EditContentFunction
Parse the values from form according to the definitions in the givenViewItemAccessor
- Overrides:
parseValues
in classEditContentFunction
- Parameters:
view
- the current viewcontent
- the current contentrawValues
- raw values from formlocalOnly
- if the form values are local only or may include external valuestransientVars
- the parameters from the call.- Returns:
- the parsed values
-