Package com.adobe.forms.common.service
Class DataOptions
- java.lang.Object
-
- com.adobe.forms.common.service.DataOptions
-
public class DataOptions extends java.lang.Object
The DataOptions captures the set of parameters to be passed to the DataProvider for getting the data for a form. The following options are supported currently dataRef : path of the data formResource : resource of the Form for which the data is required pagePath : path of the page which renders the form aemFormContainer : If the Form is being embedded inside an AEM Form Container than the path of the AEM Form Container resource. It can be null if the form is not being embedded inside a Container. content type : content type of the data
-
-
Constructor Summary
Constructors Constructor Description DataOptions()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Resource
getAemFormContainer()
Container (if any) resource in which the form is being embedded.ContentType
getContentType()
Returns the content typejava.lang.String
getDataRef()
path of the data being passed as the sling request parameter or request attribute.java.util.Map<java.lang.String,java.lang.Object>
getExtras()
Returns the parameter mapResource
getFormResource()
Form resource present inside DAM for which the data is required.java.lang.String
getPagePath()
Path of the page where the form resides.java.lang.String
getServiceName()
returns the name of the service to be used for getting the data.void
setAemFormContainer(Resource aemFormContainer)
Container (if any) resource in which the form is being embedded.void
setContentType(ContentType contentType)
Sets the content type to the data options.void
setDataRef(java.lang.String dataRef)
set the path of the data from where the data has to be obtainedvoid
setExtras(java.util.Map<java.lang.String,java.lang.Object> extras)
Sets the extra parameter map.void
setFormResource(Resource formResource)
Form resource present inside DAM for which the data is required.void
setPagePath(java.lang.String pagePath)
Path of the page/profile (for MF) where the form resides.void
setServiceName(java.lang.String serviceName)
set the name of the service to be used for getting the data.
-
-
-
Method Detail
-
getDataRef
public java.lang.String getDataRef()
path of the data being passed as the sling request parameter or request attribute.- Returns:
- path of the data being passed as the sling request parameter or request attribute or null if nothing passed
-
setDataRef
public void setDataRef(java.lang.String dataRef)
set the path of the data from where the data has to be obtained- Parameters:
dataRef
- path of the data from where the data has to be obtained
-
getFormResource
public Resource getFormResource()
Form resource present inside DAM for which the data is required.- Returns:
- resource of the form that is being rendered
-
setFormResource
public void setFormResource(Resource formResource)
Form resource present inside DAM for which the data is required.- Parameters:
formResource
- Form resource present inside DAM for which the data is required.
-
getPagePath
public java.lang.String getPagePath()
Path of the page where the form resides. For adaptive form it will be the path of the page and for mobile form it will be the path of the profile which is rendering the Form.- Returns:
- Path of the page where the form resides
-
setPagePath
public void setPagePath(java.lang.String pagePath)
Path of the page/profile (for MF) where the form resides.- Parameters:
pagePath
- Path of the page/profile (for MF) where the form resides.
-
getAemFormContainer
public Resource getAemFormContainer()
Container (if any) resource in which the form is being embedded.- Returns:
- container if the form is being embedded otherwise null
-
setAemFormContainer
public void setAemFormContainer(Resource aemFormContainer)
Container (if any) resource in which the form is being embedded.- Parameters:
aemFormContainer
- Container (if any) resource in which the form is being embedded.
-
getServiceName
public java.lang.String getServiceName()
returns the name of the service to be used for getting the data.- Returns:
- name of the service or null if nothing is set
-
setServiceName
public void setServiceName(java.lang.String serviceName)
set the name of the service to be used for getting the data. If none provided, all the available service will be queried for the data- Parameters:
serviceName
- name of the service to be used for getting the data.
-
getExtras
public java.util.Map<java.lang.String,java.lang.Object> getExtras()
Returns the parameter map- Returns:
- map containing the parameters
-
setExtras
public void setExtras(java.util.Map<java.lang.String,java.lang.Object> extras)
Sets the extra parameter map. This parameter map is any custom payload which has to be made available to the prefill service A sample example could be to fetch a map from a request attribute and set it to this params.- Parameters:
extras
- map of extra parameters.
-
getContentType
public ContentType getContentType()
Returns the content type- Returns:
- content type
-
setContentType
public void setContentType(ContentType contentType)
Sets the content type to the data options.- Parameters:
contentType
-
-
-