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.ConditionFailureNested classes/interfaces inherited from interface org.ametys.plugins.workflow.EnhancedFunction
EnhancedFunction.FunctionType -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intThe workflow action id to edit repeater with educational path onlystatic final StringName of common attribute in a repeater with education path (means that entry is common to all educational paths)static final StringName 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, INVERT_RELATION_ENABLED, 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_NAMEFields inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
_contentHelper, CONTENT_KEY, HAS_CHANGED_KEYFields 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 booleancanWriteModelItem(ModelItem modelItem, Content content, Map transientVars) Returnstrueif the current model item is writable for this content in the current context.convertValues(ModifiableContent content, View view, Map<String, Object> values, Map transientVars) Converts the given values according to the definitions in the givenViewItemAccessorvoidparseValues(View view, ModifiableContent content, Map<String, Object> rawValues, boolean localOnly, Map transientVars) Parse the values from form according to the definitions in the givenViewItemAccessorvoidservice(ServiceManager smanager) Methods inherited from class org.ametys.cms.workflow.EditContentFunction
additionalOperations, extractOutgoingReferences, getFunctionExecType, getInvertEditActionId, getLabel, getSynchronizationContext, getValues, getView, globalValidate, initialize, invertRelationEnabled, notifyContentModifying, prepareOrNotifyContentModified, prepareSynchronize, processDisableConditions, processDisableConditionsOnComposite, processDisableConditionsOnElement, processDisableConditionsOnRepeater, synchronize, triggerInvertWorkflowAction, updateCommonMetadata, validateRepeaterValue, validateValue, validateValuesMethods inherited from class org.ametys.cms.workflow.AbstractContentWorkflowComponent
getContentMethods inherited from class org.ametys.plugins.workflow.AbstractWorkflowComponent
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUserMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
servicein interfaceServiceable- Overrides:
servicein classAbstractContentWorkflowComponent- Throws:
ServiceException
-
execute
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException - Specified by:
executein interfacecom.opensymphony.workflow.FunctionProvider- Overrides:
executein classEditContentFunction- Throws:
com.opensymphony.workflow.WorkflowException
-
canWriteModelItem
Description copied from class:EditContentFunctionReturnstrueif the current model item is writable for this content in the current context.- Overrides:
canWriteModelItemin classEditContentFunction- Parameters:
modelItem- The model item to checkcontent- The contenttransientVars- The parameters from the call- Returns:
trueif 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:EditContentFunctionParse the values from form according to the definitions in the givenViewItemAccessor- Overrides:
parseValuesin 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
-
convertValues
protected Map<String,Object> convertValues(ModifiableContent content, View view, Map<String, Object> values, Map transientVars) Description copied from class:EditContentFunctionConverts the given values according to the definitions in the givenViewItemAccessor- Overrides:
convertValuesin classEditContentFunction- Parameters:
content- the current contentview- the current viewvalues- the values to converttransientVars- the parameters from the call- Returns:
- the converted values
-