public class EditContentFunction extends AbstractContentWorkflowComponent implements com.opensymphony.workflow.FunctionProvider, Initializable
Modifier and Type | Field and Description |
---|---|
private static int |
__INVERT_EDIT_ACTION_ID
Default action id of editing revert relations.
|
protected ContentTypeExtensionPoint |
_contentTypeExtensionPoint
Content type extension point.
|
protected ContentTypesHelper |
_contentTypesHelper
Helper for content types
|
protected ExternalizableMetadataProviderExtensionPoint |
_externalizableMetadataProviderEP
Provider for externalizable metadata
|
protected JSONUtils |
_jsonUtils
The JSON conversion utilities.
|
protected Set<String> |
_lockAlreadyChecked
Set of already checked node
|
protected ObservationManager |
_observationManager
Observation manager available to subclasses.
|
protected OutgoingReferencesExtractor |
_outgoingReferencesExtractor
The outgoing references extractor
|
protected AmetysObjectResolver |
_resolver
The AmetysObject resolver.
|
protected UploadManager |
_uploadManager
Upload manager.
|
protected UserHelper |
_userHelper
The user helper
|
protected UserManager |
_userManager
The user manager
|
protected ContentWorkflowHelper |
_workflowHelper
The content workflow helper.
|
protected WorkflowProvider |
_workflowProvider
The workflow provider
|
static String |
EDIT_MUTUAL_RELATIONSHIP
Constant for storing the action id for editing revert relations.
|
static String |
EXPLORER_FILE
Constant for shared file metadata.
|
static String |
FORM_ELEMENTS_PREFIX
Prefix for HTML form elements.
|
static String |
FORM_RAW_COMMENTS
Request parameter key for the field comments.
|
static String |
FORM_RAW_VALUES
Request parameter key for the field values.
|
static String |
GLOBAL_ERROR_KEY
The key for global errors
|
static String |
INTERNAL_FORM_ELEMENTS_PREFIX
Prefix for internal HTML form elements.
|
static String |
INVERT_RELATION_EDIT_WORKFLOW_ACTION_ID
Constant for storing the action id for editing revert relations.
|
static String |
METADATA_FILE
Constant for local file metadata.
|
static String |
METADATA_SET_PARAM
Prefix for the metadata set name request parameter.
|
static String |
QUIT
Prefix for the quit edition mode request parameter.
|
static String |
UNTOUCHED_BINARY
Constant for untouched binary metadata.
|
static String |
UNTOUCHED_FILE
Constant for untouched file metadata.
|
_contentHelper, CONTENT_KEY
_logger, _manager, CONTEXT_PARAMETERS_KEY, FAIL_CONDITIONS_KEY, RESULT_MAP_KEY, WORKFLOW_ERRORS_KEY, WORKFLOW_WARNS_KEY
Constructor and Description |
---|
EditContentFunction() |
Modifier and Type | Method and Description |
---|---|
private void |
_addMetadataDefRef(AbstractMetadataSetElement metadataSetElement,
String metadataName) |
protected void |
_bindAndValidateBinaryMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a binary metadata.
|
protected void |
_bindAndValidateBooleanMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a boolean metadata.
|
protected void |
_bindAndValidateCompositeMetadata(AllErrors allErrors,
Form form,
Content content,
String metadataName,
AbstractMetadataSetElement metadataSetElement,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
Map<String,List<Map<String,String>>> rawComments,
Set<String> externalAndLocalMetadata)
Bind and validate a composite metadata.
|
protected void |
_bindAndValidateContent(ModifiableContent content,
AllErrors allErrors,
MetadataSet metadataSet,
Map<String,Object> rawValues,
Map<String,List<Map<String,String>>> rawComments,
UserIdentity user,
int invertEditActionId,
Set<String> externalAndLocalMetadata)
Bind and validate a form.
|
protected void |
_bindAndValidateContentReferenceMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a content reference metadata.
|
protected void |
_bindAndValidateDateMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a date metadata.
|
protected void |
_bindAndValidateDateTimeMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a date time metadata.
|
protected void |
_bindAndValidateDoubleMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a double metadata.
|
protected void |
_bindAndValidateFileMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a file metadata.
|
protected void |
_bindAndValidateGeocodeMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a geocode metadata.
|
protected void |
_bindAndValidateLongMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a long metadata.
|
protected void |
_bindAndValidateMetadata(Content content,
Form form,
AllErrors allErrors,
AbstractMetadataSetElement metadataSetElement,
Map<String,Object> rawValues,
Map<String,List<Map<String,String>>> rawComments,
MetadataDefinition metadataDefinition,
String metadataPath,
Set<String> externalAndLocalMetadata)
Bind and validate a form.
|
protected void |
_bindAndValidateMetadataSetElement(Content content,
Form form,
AllErrors allErrors,
AbstractMetadataSetElement metadataSetElement,
Map<String,Object> rawValues,
Map<String,List<Map<String,String>>> rawComments,
MetadataDefinition parentMetadataDefinition,
String parentMetadataPath,
Set<String> externalAndLocalMetadata)
Bind and validate a metadata set element.
|
protected void |
_bindAndValidateMultilingualStringMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a multilingual string metadata.
|
protected void |
_bindAndValidateReferenceMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a reference metadata.
|
protected void |
_bindAndValidateRepeater(Content content,
Form form,
AllErrors allErrors,
AbstractMetadataSetElement metadataSetElement,
Map<String,Object> rawValues,
Map<String,List<Map<String,String>>> rawComments,
RepeaterDefinition repeaterDefinition,
String metadataPath,
Set<String> externalAndLocalMetadata)
Bind and validate a repeater.
|
protected void |
_bindAndValidateRichText(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a rich text metadata.
|
protected void |
_bindAndValidateStringMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a string metadata.
|
protected void |
_bindAndValidateSubContentMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a content metadata.
|
protected void |
_bindAndValidateUserMetadata(AllErrors allErrors,
Form form,
Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
Object rawValue,
Map<String,Object> rawValues,
boolean externalizable)
Bind and validate a user metadata.
|
protected BinaryField |
_bindBinaryField(String[] values,
String metadataParamsPrefix,
Map<String,Object> rawValues)
Bind a binary field from form values
|
protected SimpleField<Boolean> |
_bindBooleanField(String[] values,
String metadataPath,
AllErrors allErrors)
Bind a boolean field from form values
|
protected void |
_bindComments(Map<String,List<Map<String,String>>> rawComments,
Form form,
MetadataDefinition metadataDefinition,
String metadataPath)
Bind the comments of a field to the form
|
protected SimpleField<Content> |
_bindContentField(String[] values,
String cTypeId,
Collection<String> validContentTypes,
String metadataPath,
AllErrors allErrors)
Bind a content field from form values
|
protected SimpleField<Date> |
_bindDateField(String[] values,
String metadataPath,
AllErrors allErrors)
Bind a date field from form values
|
protected SimpleField<Date> |
_bindDateTimeField(String[] values,
String metadataPath,
AllErrors allErrors)
Bind a date time field from form values
|
protected SimpleField<Double> |
_bindDoubleField(String[] values,
String metadataPath,
AllErrors allErrors)
Bind a double field from form values
|
protected SimpleField<Double> |
_bindGeoCodeField(String[] values)
Bind a geocode field from form values
|
protected SimpleField<Long> |
_bindLongField(String[] values,
String metadataPath,
AllErrors allErrors)
Bind a long field from form values
|
protected SimpleField<MultilingualString> |
_bindMultilingualField(String[] values)
Bind a multilingual field from form values
|
protected ReferenceField |
_bindReferenceField(String[] values)
Bind a reference field from form values
|
protected RichTextField |
_bindRichTextField(String[] values,
String metadataParamsPrefix,
Map<String,Object> rawValues)
Bind a richtext field from form values
|
protected SubContentField |
_bindSubContentField(String[] values,
MetadataDefinition metadataDef,
String metadataPath,
Map<String,Object> rawValues)
Bind a sub-content field from form values
|
protected SimpleField<UserIdentity> |
_bindUserField(String[] values)
Bind a user field from form values
|
protected void |
_checkLock(Node node)
Check the lock status of the node
|
protected void |
_checkRepeaterSize(ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
RepeaterDefinition repeaterDefinition,
String metadataPath)
Check the repeater size will be correct
|
private int |
_computeRepeaterEntryPosition(ModifiableCompositeMetadata repeaterMetadata,
RepeaterField.RepeaterEntry repeaterEntry) |
protected void |
_copyRichText(RichTextField field,
ModifiableRichText richText,
MetadataDefinition metadataDefinition,
String metadataPath,
AllErrors allErrors)
Set a rich text metadata from an existing rich text metadata.
|
private MetadataSet |
_createMetadataSet(Map<String,Object> rawValues) |
protected void |
_extractOutgoingReferences(ModifiableContent content)
Analyze the content to extract outgoing references and store them
|
protected List<Content> |
_getContentValues(CompositeMetadata compositeMetadata,
String metadataPath)
Get the content values
|
protected RepeaterField.RepeaterEntry |
_getCurrentEntry(List<RepeaterField.RepeaterEntry> entries,
String entryName)
Retrieves a repeater entry corresponding to an entry name.
|
protected RepeaterField.RepeaterEntry |
_getEntry(List<RepeaterField.RepeaterEntry> entries,
String entryName)
Retrieves a repeater entry corresponding to an entry name.
|
private ModifiableCompositeMetadata |
_getEntryHolder(ModifiableContent refContent,
ModifiableCompositeMetadata repeaterMeta,
RepeaterDefinition repeaterDef,
String[] pathElements,
String searchContentId,
boolean create)
On a repeater metadata, search the entry referencing the content being modified.
|
private ExternalizableMetadataProvider.ExternalizableMetadataStatus |
_getExternalizableStatus(String rawValue) |
private String[] |
_getExternalValues(String rawValue,
MetadataDefinition metadataDefinition) |
protected Map<String,Object> |
_getInputsForSubContentCreation(Content content,
ModifiableCompositeMetadata metadata,
Form form,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
String name,
String[] cTypes,
String language)
Provide the inputs to use for the creation of a subcontent.
|
private String[] |
_getLocalValues(String rawValue,
MetadataDefinition metadataDefinition) |
protected MetadataDefinition |
_getMetadataDefinition(Content content,
MetadataDefinition parentMetadataDefinition,
String metadataName)
Retrieves a sub metadata definition from a content type or
a parent metadata definition.
|
protected ModifiableCompositeMetadata |
_getMetadataHolder(ModifiableCompositeMetadata parentMetadata,
String metadataPath)
Get the composite metadata holding the metadata given by its path
|
protected String[] |
_getMetadataValues(Map<String,Object> rawValues,
Form form,
MetadataDefinition metadataDefinition,
String metadataPath)
Get a metadata values from the request.
|
protected String[] |
_getMetadataValues(Object rawValue,
MetadataDefinition metadataDefinition)
Get a metadata values from raw value
|
protected ModifiableCompositeMetadata |
_getRelationMetaHolder(ModifiableContent refContent,
ContentType refContentType,
String metadataPath,
String searchContentId,
boolean create)
Get the metadata holder of the mutual relation.
|
private void |
_handleErrors(Map transientVars,
ModifiableContent modifiableContent,
AllErrors errors) |
protected boolean |
_invertRelationEnabled()
Template method to indicates if invert relation should be taken into account during the whole edition.
|
protected boolean |
_isEditRefContentAvailable(int editActionId,
Content refContent,
boolean forceInvert,
String currentMetadataPath,
UserIdentity user,
AllErrors allErrors)
Checks if the "edit content" workflow action is available on a referenced content
|
private void |
_lockNewReferencedContent(Content content,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
String[] newValues) |
private void |
_lockOldReferencedContent(ModifiableCompositeMetadata metadata,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
String metadataName) |
private void |
_lockOldReferencedThatWillBeRemovedContent(AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
String[] toRemove) |
protected void |
_moveRepeaterEntry(CompositeMetadata metadata,
String fromName,
String toName)
Move a repeater entry.
|
protected boolean |
_needTriggerEditWorkflowAction(ModifiableContent refContent,
String refContentTypeId,
String invertRelationPath,
String currentContentId)
Determines if the edit workflow action will be trigger on this referenced content
|
protected void |
_notifyContentModified(Content content,
Map transientVars)
Notify observers that the content has been modified
|
protected void |
_prepareSynchronizeCompositeMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
MetadataDefinition metadataDefinition,
String metadataPath,
int editActionId)
Synchronize a composite-typed metadata with a a composite metadata.
|
protected void |
_prepareSynchronizeContentReferenceMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId)
Prepare to synchronize a content reference metadata from a field.
|
protected void |
_prepareSynchronizeMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId)
Prepare to synchronize a metadata with a composite metadata.
|
protected void |
_prepareSynchronizeMetadataSetElement(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
MetadataDefinition parentMetadataDefinition,
String metadataPath,
int invertEditActionId)
Synchronize to synchronize a metadata set element with a composite metadata.
|
protected void |
_prepareSynchronizeRepeater(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
RepeaterDefinition repeaterDefinition,
String metadataPath,
int invertActionId)
Synchronize a repeater with a composite metadata.
|
protected void |
_removeInvertRelation(String currentContentId,
MetadataDefinition metaDef,
String metaPath,
String refContentId,
int editActionId,
AllErrors allErrors)
Remove a mutual relation.
|
protected void |
_removeInvertRelations(String currentContentId,
MetadataDefinition metaDef,
String metaPath,
String[] refContentIds,
int editActionId,
AllErrors allErrors)
Remove a mutual relation.
|
protected void |
_removeMetadataIfExists(ModifiableCompositeMetadata metadata,
String metadataName,
boolean externalizable)
Remove a metadata if exists.
|
protected void |
_setInvertRelation(Content content,
String currentMetadataPath,
Content refContent,
String refContentTypeId,
String invertRelationPath,
int editActionId,
AllErrors allErrors)
Set a mutual relation.
|
private void |
_setMetadata(ModifiableCompositeMetadata metadata,
String metadataName,
Form form,
Object value,
boolean externalizable) |
protected void |
_synchronizeBinaryMetadata(ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
boolean externalizable)
Synchronize a binary metadata from a field.
|
protected void |
_synchronizeBooleanMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a boolean metadata from a field.
|
protected void |
_synchronizeCompositeMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
MetadataDefinition metadataDefinition,
String metadataPath,
int editActionId,
Set<String> externalAndLocalMetadata)
Synchronize a composite-typed metadata with a a composite metadata.
|
protected void |
_synchronizeContentReferenceMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
boolean externalizable)
Synchronize a content reference metadata from a field.
|
protected void |
_synchronizeDateMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a date metadata from a field.
|
protected void |
_synchronizeDoubleMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a double metadata from a field.
|
protected void |
_synchronizeFileMetadata(ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
boolean externalizable)
Synchronize a file metadata from a field.
|
protected void |
_synchronizeGeocodeMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a geocode metadata from a field.
|
protected void |
_synchronizeLongMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a long metadata from a field.
|
protected void |
_synchronizeMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
Set<String> externalAndLocalMetadata)
Synchronize a metadata with a composite metadata.
|
protected void |
_synchronizeMetadataComments(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition)
Synchronize the comments of a field.
|
protected void |
_synchronizeMetadataRemoval(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition parentMetadataDefinition,
String metadataPath,
int editActionId)
Do additional processing to remove entry sub-metadatas.
|
protected void |
_synchronizeMetadataSetElement(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
MetadataDefinition parentMetadataDefinition,
String metadataPath,
int invertEditActionId,
Set<String> externalAndLocalMetadata)
Synchronize a metadata set element with a composite metadata.
|
protected void |
_synchronizeMultilingualStringMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a string metadata from a field.
|
private void |
_synchronizeMultipleBooleanMetadata(ModifiableCompositeMetadata metadata,
Form form,
boolean externalizable,
String metadataName,
SimpleField<Boolean> field) |
private void |
_synchronizeMultipleContentReferenceMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
SimpleField<Content> field,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
String contentTypeId,
String invert,
boolean externalizable) |
private void |
_synchronizeMultipleDateMetadata(ModifiableCompositeMetadata metadata,
Form form,
boolean externalizable,
String metadataName,
SimpleField<Date> field) |
private void |
_synchronizeMultipleDoubleMetadata(ModifiableCompositeMetadata metadata,
Form form,
boolean externalizable,
String metadataName,
SimpleField<Double> field) |
private void |
_synchronizeMultipleLongMetadata(ModifiableCompositeMetadata metadata,
Form form,
boolean externalizable,
String metadataName,
SimpleField<Long> field) |
private void |
_synchronizeMultipleStringMetadata(ModifiableCompositeMetadata metadata,
Form form,
boolean externalizable,
String metadataName,
SimpleField<String> field) |
private void |
_synchronizeMultipleUserMetadata(ModifiableCompositeMetadata metadata,
Form form,
boolean externalizable,
String metadataName,
SimpleField<UserIdentity> field) |
protected void |
_synchronizeReferenceMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a sub-content metadata from a field.
|
private void |
_synchronizeRelationOfMultipleContentReferenceMetadata(Content content,
Form form,
AllErrors allErrors,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
String contentTypeId,
String invert,
boolean externalizable,
String metadataName,
Content[] values,
String[] oldValues,
String[] newValues) |
private void |
_synchronizeRelationOfSingleContentReferenceMetadata(Content content,
AllErrors allErrors,
SimpleField<Content> field,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
String contentTypeId,
String invert,
String oldValue,
Content refContent,
boolean invertRequired) |
protected void |
_synchronizeRepeater(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
RepeaterDefinition repeaterDefinition,
String metadataPath,
int editActionId,
Set<String> externalAndLocalMetadata)
Synchronize a repeater with a composite metadata.
|
protected void |
_synchronizeRepeaterInInsertMode(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
RepeaterDefinition repeaterDefinition,
String metadataPath,
int editActionId,
Set<String> externalAndLocalMetadata)
Synchronize a repeater with a composite metadata, when the values has to be added to existing ones.
|
protected void |
_synchronizeRepeaterInRemoveMode(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
RepeaterDefinition repeaterDefinition,
String metadataPath)
Synchronize a repeater with a composite metadata, when the values has to removed from existing ones.
|
protected void |
_synchronizeRepeaterInReplaceMode(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
AbstractMetadataSetElement metadataSetElement,
RepeaterDefinition repeaterDefinition,
String metadataPath,
int editActionId,
Set<String> externalAndLocalMetadata)
Synchronize a repeater with a composite metadata, when the values has to replace existing ones.
|
protected void |
_synchronizeRichTextMetadata(ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
boolean externalizable)
Synchronize a rich text metadata from a field.
|
private void |
_synchronizeSingleContentReferenceMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
SimpleField<Content> field,
MetadataDefinition metadataDefinition,
String metadataPath,
int invertEditActionId,
String contentTypeId,
String invert,
boolean externalizable) |
protected void |
_synchronizeStringMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a string metadata from a field.
|
protected void |
_synchronizeSubContentMetadata(Content content,
ModifiableCompositeMetadata metadata,
Form form,
AllErrors allErrors,
UserIdentity user,
MetadataDefinition metadataDefinition,
String metadataPath,
boolean externalizable)
Synchronize a sub-content metadata from a field.
|
protected void |
_synchronizeUserMetadata(ModifiableCompositeMetadata metadata,
Form form,
MetadataDefinition metadataDefinition,
boolean externalizable)
Synchronize a user metadata from a field.
|
protected void |
_transformRichText(RichTextField field,
ModifiableRichText richText,
MetadataDefinition metadataDefinition,
String metadataPath,
AllErrors allErrors)
Set the rich text metadata from a source that is not docbook.
|
protected void |
_triggerEditWorkflowAction(Content content,
int actionId)
Trigger a 'edit content' workflow action (if the content is workflow-aware).
|
protected void |
_updateCommonMetadata(ModifiableContent content,
UserIdentity user)
Updates common metadata (last contributor, last modification date, ...).
|
protected void |
_validateForm(Content content,
Form form,
MetadataSet metadataSet,
AllErrors allErrors)
Validates the form.
|
protected boolean |
_validateMetadata(Content content,
MetadataDefinition metadataDefinition,
String metadataPath,
AllErrors allErrors,
Object value)
Validate a metadata value.
|
void |
execute(Map transientVars,
Map args,
com.opensymphony.module.propertyset.PropertySet ps) |
protected MetadataSet |
getMetadataSet(Map<String,Object> jsParameters,
Map<String,Object> rawValues,
Content content)
Get the metadata set for the content
|
void |
initialize() |
getContent, service
addWorkflowError, addWorkflowWarning, enableLogging, getConditionFailures, getContextParameters, getResultsMap, getUser
public static final String INVERT_RELATION_EDIT_WORKFLOW_ACTION_ID
public static final String EDIT_MUTUAL_RELATIONSHIP
public static final String FORM_ELEMENTS_PREFIX
public static final String GLOBAL_ERROR_KEY
public static final String INTERNAL_FORM_ELEMENTS_PREFIX
public static final String FORM_RAW_VALUES
public static final String FORM_RAW_COMMENTS
public static final String METADATA_SET_PARAM
public static final String QUIT
public static final String UNTOUCHED_BINARY
public static final String UNTOUCHED_FILE
public static final String METADATA_FILE
public static final String EXPLORER_FILE
private static final int __INVERT_EDIT_ACTION_ID
protected AmetysObjectResolver _resolver
protected ContentTypeExtensionPoint _contentTypeExtensionPoint
protected ContentTypesHelper _contentTypesHelper
protected UploadManager _uploadManager
protected ObservationManager _observationManager
protected JSONUtils _jsonUtils
protected WorkflowProvider _workflowProvider
protected ContentWorkflowHelper _workflowHelper
protected OutgoingReferencesExtractor _outgoingReferencesExtractor
protected UserManager _userManager
protected UserHelper _userHelper
protected ExternalizableMetadataProviderExtensionPoint _externalizableMetadataProviderEP
protected Set<String> _lockAlreadyChecked
public EditContentFunction()
public void initialize() throws Exception
initialize
in interface Initializable
Exception
public void execute(Map transientVars, Map args, com.opensymphony.module.propertyset.PropertySet ps) throws com.opensymphony.workflow.WorkflowException
execute
in interface com.opensymphony.workflow.FunctionProvider
com.opensymphony.workflow.WorkflowException
private void _handleErrors(Map transientVars, ModifiableContent modifiableContent, AllErrors errors) throws com.opensymphony.workflow.WorkflowException, InvalidInputWorkflowException
com.opensymphony.workflow.WorkflowException
InvalidInputWorkflowException
protected void _notifyContentModified(Content content, Map transientVars) throws com.opensymphony.workflow.WorkflowException
content
- The content modifiedtransientVars
- The workflow varscom.opensymphony.workflow.WorkflowException
- If an error occurredprotected MetadataSet getMetadataSet(Map<String,Object> jsParameters, Map<String,Object> rawValues, Content content) throws com.opensymphony.workflow.WorkflowException
jsParameters
- The request parametersrawValues
- The raw values of the formcontent
- The contentcom.opensymphony.workflow.WorkflowException
- If an error occurred while getting the metadata setprivate MetadataSet _createMetadataSet(Map<String,Object> rawValues)
private void _addMetadataDefRef(AbstractMetadataSetElement metadataSetElement, String metadataName)
protected void _extractOutgoingReferences(ModifiableContent content)
content
- The content to analyzeprotected boolean _invertRelationEnabled()
protected void _bindAndValidateContent(ModifiableContent content, AllErrors allErrors, MetadataSet metadataSet, Map<String,Object> rawValues, Map<String,List<Map<String,String>>> rawComments, UserIdentity user, int invertEditActionId, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.allErrors
- the errors.metadataSet
- the metadatasetrawValues
- the raw values of the formrawComments
- the raw comments of the formuser
- the user.invertEditActionId
- The current 'edit content' action ID.externalAndLocalMetadata
- The paths of externalizable metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _bindAndValidateMetadataSetElement(Content content, Form form, AllErrors allErrors, AbstractMetadataSetElement metadataSetElement, Map<String,Object> rawValues, Map<String,List<Map<String,String>>> rawComments, MetadataDefinition parentMetadataDefinition, String parentMetadataPath, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.form
- the form.allErrors
- the errors.metadataSetElement
- the metadata set element for this metadata.rawValues
- the raw values of the formrawComments
- the raw comments of the formparentMetadataDefinition
- the metadata definition.parentMetadataPath
- the metadata path.externalAndLocalMetadata
- The paths of externalizable metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _validateForm(Content content, Form form, MetadataSet metadataSet, AllErrors allErrors)
content
- the content.form
- the form.metadataSet
- the metadata set.allErrors
- the errors.protected void _synchronizeMetadataSetElement(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, MetadataDefinition parentMetadataDefinition, String metadataPath, int invertEditActionId, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.parentMetadataDefinition
- the metadata definition.metadataPath
- the metadata path.invertEditActionId
- The action id for editing invert relationexternalAndLocalMetadata
- The paths of externalizable metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _prepareSynchronizeMetadataSetElement(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, MetadataDefinition parentMetadataDefinition, String metadataPath, int invertEditActionId) throws com.opensymphony.workflow.WorkflowException, AmetysRepositoryException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.parentMetadataDefinition
- the metadata definition.metadataPath
- the metadata path.invertEditActionId
- The action id for editing invert relationcom.opensymphony.workflow.WorkflowException
- if an error occurs.AmetysRepositoryException
- if an error occurredprotected void _updateCommonMetadata(ModifiableContent content, UserIdentity user) throws com.opensymphony.workflow.WorkflowException
content
- the content.user
- the user.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected MetadataDefinition _getMetadataDefinition(Content content, MetadataDefinition parentMetadataDefinition, String metadataName)
content
- the content.parentMetadataDefinition
- the parent metadata definition.metadataName
- the metadata name.null
otherwise.protected void _bindAndValidateMetadata(Content content, Form form, AllErrors allErrors, AbstractMetadataSetElement metadataSetElement, Map<String,Object> rawValues, Map<String,List<Map<String,String>>> rawComments, MetadataDefinition metadataDefinition, String metadataPath, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.form
- the form.allErrors
- the errors.metadataSetElement
- the metadata set element for this metadata.rawValues
- the raw values.rawComments
- the raw comments.metadataDefinition
- the metadata definition.metadataPath
- the metadata path.externalAndLocalMetadata
- The paths of externalizable metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.private String[] _getLocalValues(String rawValue, MetadataDefinition metadataDefinition)
private String[] _getExternalValues(String rawValue, MetadataDefinition metadataDefinition)
protected String[] _getMetadataValues(Map<String,Object> rawValues, Form form, MetadataDefinition metadataDefinition, String metadataPath)
rawValues
- the raw values.form
- the form.metadataDefinition
- the metadata definition.metadataPath
- the metadata path.protected String[] _getMetadataValues(Object rawValue, MetadataDefinition metadataDefinition)
rawValue
- The raw valuemetadataDefinition
- the metadata definition.protected void _bindComments(Map<String,List<Map<String,String>>> rawComments, Form form, MetadataDefinition metadataDefinition, String metadataPath)
rawComments
- The raw comments of the formform
- The formsmetadataDefinition
- the metadata definition.metadataPath
- the metadata path.protected void _bindAndValidateCompositeMetadata(AllErrors allErrors, Form form, Content content, String metadataName, AbstractMetadataSetElement metadataSetElement, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, Map<String,List<Map<String,String>>> rawComments, Set<String> externalAndLocalMetadata) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.metadataDefinition
- the metadata definition.content
- the current contentmetadataName
- the metadata namemetadataSetElement
- the metadata set elementmetadataPath
- the metadata path from the content.rawValue
- the submitted values.rawValues
- The raw values of the formrawComments
- The raw comments of the formexternalAndLocalMetadata
- The paths of externalizable metadataAmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _bindAndValidateRepeater(Content content, Form form, AllErrors allErrors, AbstractMetadataSetElement metadataSetElement, Map<String,Object> rawValues, Map<String,List<Map<String,String>>> rawComments, RepeaterDefinition repeaterDefinition, String metadataPath, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.form
- the form.allErrors
- the errors.metadataSetElement
- the metadata set element for this metadata.rawValues
- the raw values of the formrawComments
- the raw comments of the formrepeaterDefinition
- the repeater definition.metadataPath
- the metadata path.externalAndLocalMetadata
- The paths of externalizable metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _bindAndValidateStringMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.metadataDefinition
- the metadata definition.content
- the contentmetadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _bindAndValidateMultilingualStringMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.metadataDefinition
- the metadata definition.content
- the contentmetadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<MultilingualString> _bindMultilingualField(String[] values)
values
- the form valuesprotected void _bindAndValidateUserMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<UserIdentity> _bindUserField(String[] values)
values
- the form valuesprotected void _bindAndValidateDateMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<Date> _bindDateField(String[] values, String metadataPath, AllErrors allErrors)
values
- the form valuesmetadataPath
- The path of metadataallErrors
- for storing validation errors.protected void _bindAndValidateDateTimeMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<Date> _bindDateTimeField(String[] values, String metadataPath, AllErrors allErrors)
values
- the form valuesmetadataPath
- The path of metadataallErrors
- for storing validation errors.protected void _bindAndValidateLongMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<Long> _bindLongField(String[] values, String metadataPath, AllErrors allErrors)
values
- the form valuesmetadataPath
- The path of metadataallErrors
- for storing validation errors.protected void _bindAndValidateGeocodeMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<Double> _bindGeoCodeField(String[] values)
values
- the form valuesprotected void _bindAndValidateDoubleMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<Double> _bindDoubleField(String[] values, String metadataPath, AllErrors allErrors)
values
- the form valuesmetadataPath
- The path of metadataallErrors
- for storing validation errors.protected void _bindAndValidateBooleanMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<Boolean> _bindBooleanField(String[] values, String metadataPath, AllErrors allErrors)
values
- the form valuesmetadataPath
- The path of metadataallErrors
- for storing validation errors.protected void _bindAndValidateBinaryMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected BinaryField _bindBinaryField(String[] values, String metadataParamsPrefix, Map<String,Object> rawValues)
values
- the form valuesmetadataParamsPrefix
- the prefix for metadatarawValues
- The raw valuesprotected void _bindAndValidateFileMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _bindAndValidateRichText(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected RichTextField _bindRichTextField(String[] values, String metadataParamsPrefix, Map<String,Object> rawValues)
values
- the form valuesmetadataParamsPrefix
- the prefix for metadatarawValues
- The raw valuesprotected void _bindAndValidateReferenceMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected ReferenceField _bindReferenceField(String[] values)
values
- the form valuesprotected void _bindAndValidateContentReferenceMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values of the formexternalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SimpleField<Content> _bindContentField(String[] values, String cTypeId, Collection<String> validContentTypes, String metadataPath, AllErrors allErrors)
values
- the form valuescTypeId
- The id of content typevalidContentTypes
- The valid content typesmetadataPath
- The path of metadataallErrors
- for storing validation errors.protected List<Content> _getContentValues(CompositeMetadata compositeMetadata, String metadataPath)
compositeMetadata
- The composite metadatametadataPath
- The path of metadataprotected void _bindAndValidateSubContentMetadata(AllErrors allErrors, Form form, Content content, MetadataDefinition metadataDefinition, String metadataPath, Object rawValue, Map<String,Object> rawValues, boolean externalizable) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
allErrors
- for storing validation errors.form
- the form.content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path from the content.rawValue
- the submitted value.rawValues
- the raw values.externalizable
- true
true if the metadata is an externalizable metadata (local and external value)AmetysRepositoryException
- if an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected SubContentField _bindSubContentField(String[] values, MetadataDefinition metadataDef, String metadataPath, Map<String,Object> rawValues)
values
- the form valuesmetadataDef
- The metadata definitionmetadataPath
- The path of metadatarawValues
- The raw valuesprotected boolean _validateMetadata(Content content, MetadataDefinition metadataDefinition, String metadataPath, AllErrors allErrors, Object value) throws com.opensymphony.workflow.WorkflowException
content
- the contentmetadataDefinition
- the metadata definition.metadataPath
- the metadata path.allErrors
- the errors.value
- the value.true
if the validation is successful,
false
otherwise.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _prepareSynchronizeMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId) throws com.opensymphony.workflow.WorkflowException, AmetysRepositoryException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.metadataDefinition
- the metadata definition.metadataPath
- the metadata path.invertEditActionId
- The action id for editing invert relationcom.opensymphony.workflow.WorkflowException
- if an error occurs.AmetysRepositoryException
- If an error occurredprotected void _synchronizeMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.metadataDefinition
- the metadata definition.metadataPath
- the metadata path.invertEditActionId
- The action id for editing invert relationexternalAndLocalMetadata
- The paths of local and externam metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _synchronizeMetadataComments(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition)
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.protected void _prepareSynchronizeCompositeMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, MetadataDefinition metadataDefinition, String metadataPath, int editActionId) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.metadataDefinition
- the metadata definition.metadataPath
- the metadata path.editActionId
- The action id for editing invert relationcom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _synchronizeCompositeMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, MetadataDefinition metadataDefinition, String metadataPath, int editActionId, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.metadataDefinition
- the metadata definition.metadataPath
- the metadata path.editActionId
- The action id for editing invert relationexternalAndLocalMetadata
- The paths of local and externam metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _prepareSynchronizeRepeater(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, RepeaterDefinition repeaterDefinition, String metadataPath, int invertActionId) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.repeaterDefinition
- the repeater definition.metadataPath
- the metadata path.invertActionId
- The current 'edit content' action ID.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _synchronizeRepeater(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, RepeaterDefinition repeaterDefinition, String metadataPath, int editActionId, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.repeaterDefinition
- the repeater definition.metadataPath
- the metadata path.editActionId
- The current 'edit content' action ID.externalAndLocalMetadata
- The paths of local and externam metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _checkRepeaterSize(ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, RepeaterDefinition repeaterDefinition, String metadataPath)
metadata
- The metadata valuesform
- the formallErrors
- the list of errorsrepeaterDefinition
- the definition of the repeatermetadataPath
- The path of the metadataprotected void _synchronizeRepeaterInInsertMode(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, RepeaterDefinition repeaterDefinition, String metadataPath, int editActionId, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.repeaterDefinition
- the repeater definition.metadataPath
- the metadata path.editActionId
- The current 'edit content' action ID.externalAndLocalMetadata
- The paths of local and externam metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _synchronizeRepeaterInRemoveMode(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, RepeaterDefinition repeaterDefinition, String metadataPath) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.repeaterDefinition
- the repeater definition.metadataPath
- the metadata path.com.opensymphony.workflow.WorkflowException
- if an error occurs.private int _computeRepeaterEntryPosition(ModifiableCompositeMetadata repeaterMetadata, RepeaterField.RepeaterEntry repeaterEntry)
protected void _synchronizeRepeaterInReplaceMode(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, AbstractMetadataSetElement metadataSetElement, RepeaterDefinition repeaterDefinition, String metadataPath, int editActionId, Set<String> externalAndLocalMetadata) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the composite metadata to synchronize.form
- the form.allErrors
- the errors.user
- the user.metadataSetElement
- the metadata set element for this metadata.repeaterDefinition
- the repeater definition.metadataPath
- the metadata path.editActionId
- The current 'edit content' action ID.externalAndLocalMetadata
- The paths of local and externam metadatacom.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _synchronizeMetadataRemoval(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, MetadataDefinition parentMetadataDefinition, String metadataPath, int editActionId) throws com.opensymphony.workflow.WorkflowException
content
- the processed content.metadata
- the composite metadata being removed.form
- the form.allErrors
- the errors.user
- the user.parentMetadataDefinition
- the parent metadata definition.metadataPath
- the metadata path.editActionId
- The current 'edit content' action ID.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _moveRepeaterEntry(CompositeMetadata metadata, String fromName, String toName) throws com.opensymphony.workflow.WorkflowException
metadata
- the parent composite metadata.fromName
- the current entry name.toName
- the new entry name.com.opensymphony.workflow.WorkflowException
- if an error occurs.protected RepeaterField.RepeaterEntry _getEntry(List<RepeaterField.RepeaterEntry> entries, String entryName)
entries
- the entries.entryName
- the entry name.null
otherwise.protected RepeaterField.RepeaterEntry _getCurrentEntry(List<RepeaterField.RepeaterEntry> entries, String entryName)
entries
- the entries.entryName
- the entry name.null
otherwise.protected void _synchronizeStringMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.private void _synchronizeMultipleStringMetadata(ModifiableCompositeMetadata metadata, Form form, boolean externalizable, String metadataName, SimpleField<String> field)
protected void _synchronizeMultilingualStringMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _synchronizeUserMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.private void _synchronizeMultipleUserMetadata(ModifiableCompositeMetadata metadata, Form form, boolean externalizable, String metadataName, SimpleField<UserIdentity> field)
protected void _synchronizeDateMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.private void _synchronizeMultipleDateMetadata(ModifiableCompositeMetadata metadata, Form form, boolean externalizable, String metadataName, SimpleField<Date> field)
protected void _removeMetadataIfExists(ModifiableCompositeMetadata metadata, String metadataName, boolean externalizable)
metadata
- The parent composite metadatametadataName
- The metadata nameexternalizable
- true
if externalizableprotected void _synchronizeLongMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.private void _synchronizeMultipleLongMetadata(ModifiableCompositeMetadata metadata, Form form, boolean externalizable, String metadataName, SimpleField<Long> field)
protected void _synchronizeGeocodeMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _synchronizeDoubleMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.private void _synchronizeMultipleDoubleMetadata(ModifiableCompositeMetadata metadata, Form form, boolean externalizable, String metadataName, SimpleField<Double> field)
protected void _synchronizeBooleanMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.private void _synchronizeMultipleBooleanMetadata(ModifiableCompositeMetadata metadata, Form form, boolean externalizable, String metadataName, SimpleField<Boolean> field)
protected void _synchronizeBinaryMetadata(ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.allErrors
- the errors.user
- the user.metadataDefinition
- the metadata definition.metadataPath
- the current metadata path.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _synchronizeFileMetadata(ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.allErrors
- the errors.user
- the user.metadataDefinition
- the metadata definition.metadataPath
- the current metadata path.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _prepareSynchronizeContentReferenceMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId) throws AmetysRepositoryException, com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the metadata.form
- the form containing the field.allErrors
- the errors.user
- the user.metadataDefinition
- the metadata definition.metadataPath
- the current metadata path.invertEditActionId
- The action id for editing invert relationAmetysRepositoryException
- If an error occurs.com.opensymphony.workflow.WorkflowException
- if an error occurs.private void _lockNewReferencedContent(Content content, AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, String[] newValues) throws RepositoryException
RepositoryException
private void _lockOldReferencedThatWillBeRemovedContent(AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, String[] toRemove)
private void _lockOldReferencedContent(ModifiableCompositeMetadata metadata, AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, String metadataName)
protected void _synchronizeContentReferenceMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
content
- the content.metadata
- the metadata.form
- the form containing the field.allErrors
- the errors.user
- the user.metadataDefinition
- the metadata definition.metadataPath
- the current metadata path.invertEditActionId
- The action id for editing invert relationexternalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.private void _synchronizeMultipleContentReferenceMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, SimpleField<Content> field, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, String contentTypeId, String invert, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowException
private void _synchronizeRelationOfMultipleContentReferenceMetadata(Content content, Form form, AllErrors allErrors, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, String contentTypeId, String invert, boolean externalizable, String metadataName, Content[] values, String[] oldValues, String[] newValues) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowException
private void _synchronizeSingleContentReferenceMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, SimpleField<Content> field, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, String contentTypeId, String invert, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowException
private void _synchronizeRelationOfSingleContentReferenceMetadata(Content content, AllErrors allErrors, SimpleField<Content> field, MetadataDefinition metadataDefinition, String metadataPath, int invertEditActionId, String contentTypeId, String invert, String oldValue, Content refContent, boolean invertRequired) throws com.opensymphony.workflow.WorkflowException
com.opensymphony.workflow.WorkflowException
protected void _synchronizeSubContentMetadata(Content content, ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
content
- The Content.metadata
- the metadata.form
- the form containing the field.allErrors
- the errors.user
- the user.metadataDefinition
- the metadata definition.metadataPath
- the current metadata path.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.protected Map<String,Object> _getInputsForSubContentCreation(Content content, ModifiableCompositeMetadata metadata, Form form, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, String name, String[] cTypes, String language)
content
- The parent contentmetadata
- the metadata.form
- the form containing the field.user
- the user.metadataDefinition
- the metadata definition.metadataPath
- the current metadata path.name
- The name of the subcontent to createcTypes
- Content types array of the subcontent to createlanguage
- The language of the subcontent to createprotected void _synchronizeReferenceMetadata(ModifiableCompositeMetadata metadata, Form form, MetadataDefinition metadataDefinition, boolean externalizable)
metadata
- the metadata.form
- the form containing the field.metadataDefinition
- the metadata definition.externalizable
- true
if the metadata is externalizable (local and external value)protected void _synchronizeRichTextMetadata(ModifiableCompositeMetadata metadata, Form form, AllErrors allErrors, UserIdentity user, MetadataDefinition metadataDefinition, String metadataPath, boolean externalizable) throws com.opensymphony.workflow.WorkflowException
metadata
- the metadata.form
- the form containing the field.allErrors
- the errors.user
- the user.metadataDefinition
- the metadata definition.metadataPath
- the current metadata path.externalizable
- true
if the metadata is externalizable (local and external value)com.opensymphony.workflow.WorkflowException
- if an error occurs.protected void _transformRichText(RichTextField field, ModifiableRichText richText, MetadataDefinition metadataDefinition, String metadataPath, AllErrors allErrors)
field
- the RichText form field.richText
- the rich text metadata to populate.metadataDefinition
- the metadata definition.metadataPath
- the metadata path.allErrors
- the error list.protected void _copyRichText(RichTextField field, ModifiableRichText richText, MetadataDefinition metadataDefinition, String metadataPath, AllErrors allErrors)
field
- the RichText form field.richText
- the rich text metadata to populate.metadataDefinition
- the metadata definition.metadataPath
- the metadata path.allErrors
- the error list.protected boolean _needTriggerEditWorkflowAction(ModifiableContent refContent, String refContentTypeId, String invertRelationPath, String currentContentId) throws RepositoryException
refContent
- The referenced contentrefContentTypeId
- The content typeinvertRelationPath
- The path of invert relationshipcurrentContentId
- The content being editingRepositoryException
- if an error occurredprotected void _setInvertRelation(Content content, String currentMetadataPath, Content refContent, String refContentTypeId, String invertRelationPath, int editActionId, AllErrors allErrors) throws com.opensymphony.workflow.WorkflowException
content
- the content being modified.currentMetadataPath
- the metadata path on the content being modified.refContent
- the content being referenced.refContentTypeId
- the content type of the content being referenced.invertRelationPath
- the path of the metadata to set on the content being referenced, separated by '/'editActionId
- The current 'edit content' action ID.allErrors
- the errors.com.opensymphony.workflow.WorkflowException
- if a fatal error occurs.protected void _checkLock(Node node) throws RepositoryException
node
- The nodeRepositoryException
- If an error occurred while manipulating the nodeprotected boolean _isEditRefContentAvailable(int editActionId, Content refContent, boolean forceInvert, String currentMetadataPath, UserIdentity user, AllErrors allErrors)
editActionId
- The id of edit workflow actionrefContent
- the referenced content to editforceInvert
- Force the invert edition regardless of the user's rightscurrentMetadataPath
- the path of the metadata responsible for the invert relationuser
- the current userallErrors
- the errorstrue
if the edit action is avalailableprotected void _removeInvertRelation(String currentContentId, MetadataDefinition metaDef, String metaPath, String refContentId, int editActionId, AllErrors allErrors) throws com.opensymphony.workflow.WorkflowException
currentContentId
- the ID of the content being modified.metaDef
- the metadata definition.metaPath
- the metadata path.refContentId
- the ID of the content being referenced.editActionId
- The current 'edit content' action ID.allErrors
- the errors.com.opensymphony.workflow.WorkflowException
- if a fatal error occurs.protected void _removeInvertRelations(String currentContentId, MetadataDefinition metaDef, String metaPath, String[] refContentIds, int editActionId, AllErrors allErrors) throws com.opensymphony.workflow.WorkflowException
currentContentId
- the ID of the content being modified.metaDef
- the metadata definition.metaPath
- the metadata path.refContentIds
- the ID of the contents being referenced.editActionId
- The current 'edit content' action ID.allErrors
- the errors.com.opensymphony.workflow.WorkflowException
- if a fatal error occurs.protected ModifiableCompositeMetadata _getRelationMetaHolder(ModifiableContent refContent, ContentType refContentType, String metadataPath, String searchContentId, boolean create) throws RepositoryException
refContent
- the content being referenced.refContentType
- the content type of the content being referenced.metadataPath
- the metadata path on the content being referenced, separated by '/'searchContentId
- the ID of the content being modified.create
- true to create non-existing composites and repeater entries.RepositoryException
- if an error occurs.private ModifiableCompositeMetadata _getEntryHolder(ModifiableContent refContent, ModifiableCompositeMetadata repeaterMeta, RepeaterDefinition repeaterDef, String[] pathElements, String searchContentId, boolean create) throws RepositoryException
refContent
- the content being referenced.repeaterMeta
- the repeater metadata.repeaterDef
- the repeater definition.pathElements
- the path of the mutual relation from the repeater, as a String array.searchContentId
- the ID of the content being modified.create
- true to create non-existing composites and repeater entries.RepositoryException
- if an error occurs.protected ModifiableCompositeMetadata _getMetadataHolder(ModifiableCompositeMetadata parentMetadata, String metadataPath)
parentMetadata
- The parent composite metadatametadataPath
- The metadata path (with /)protected void _triggerEditWorkflowAction(Content content, int actionId) throws com.opensymphony.workflow.WorkflowException
content
- The content.actionId
- The current 'edit content' action ID.com.opensymphony.workflow.WorkflowException
- if an error occurs.private ExternalizableMetadataProvider.ExternalizableMetadataStatus _getExternalizableStatus(String rawValue)
private void _setMetadata(ModifiableCompositeMetadata metadata, String metadataName, Form form, Object value, boolean externalizable)