Package org.alfresco.repo.forms.script
Class ScriptFormService
java.lang.Object
org.alfresco.repo.processor.BaseProcessorExtension
org.alfresco.repo.jscript.BaseScopableProcessorExtension
org.alfresco.repo.forms.script.ScriptFormService
- All Implemented Interfaces:
org.alfresco.processor.ProcessorExtension,Scopeable
Script object representing the form service.
- Author:
- Neil McErlean
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a form representation of the given item, all known fields for the item are included.Returns a form representation of the given item consisting only of the given fields.Returns a form representation of the given item consisting only of the given fields.Persists the given data object for the item providedvoidsetFormService(FormService formService) Set the form serviceMethods inherited from class org.alfresco.repo.jscript.BaseScopableProcessorExtension
getScope, setScopeMethods inherited from class org.alfresco.repo.processor.BaseProcessorExtension
getExtensionName, register, setExtensionName, setProcessor
-
Constructor Details
-
ScriptFormService
public ScriptFormService()
-
-
Method Details
-
setFormService
Set the form service- Parameters:
formService- the form service
-
getForm
Returns a form representation of the given item, all known fields for the item are included.- Parameters:
itemKind- The kind of item to retrieve a form foritemId- The identifier of the item to retrieve a form for- Returns:
- The form
-
getForm
Returns a form representation of the given item consisting only of the given fields.- Parameters:
itemKind- The kind of item to retrieve a form foritemId- The identifier of the item to retrieve a form forfields- String array of fields to include, null indicates all possible fields for the item should be included- Returns:
- The form
-
getForm
Returns a form representation of the given item consisting only of the given fields.- Parameters:
itemKind- The kind of item to retrieve a form foritemId- The identifier of the item to retrieve a form forfields- String array of fields to include, null indicates all possible fields for the item should be includedforcedFields- List of field names from 'fields' list that should be forcibly included, it is up to the form processor implementation to determine how to enforce this- Returns:
- The form
-
saveForm
Persists the given data object for the item provided- Parameters:
itemKind- The kind of item to retrieve a form foritemId- The identifier of the item to retrieve a form forpostData- The post data, this can be a Map of name value pairs, a webscript FormData object or a JSONObject- Returns:
- The persisted object
-