Class AbstractDynamicDataWebService


  • public abstract class AbstractDynamicDataWebService
    extends CayenneService
    Provides an abstract Web Service end point form PDF forms using Dynamic Data. Concrete subclasses need to be declared in the portal project to for Spring/CXF class loading to work.
    • Field Detail

      • OPERATION_NAME_BACKGROUND_SAVE

        public static final String OPERATION_NAME_BACKGROUND_SAVE
        The name identifying the background save operation when InvokeSfmService is used
        See Also:
        Constant Field Values
      • OPERATION_NAME_DYNAMIC_DATA

        public static final String OPERATION_NAME_DYNAMIC_DATA
        The name identifying the dynamic data retrieval operation when InvokeSfmService is used
        See Also:
        Constant Field Values
      • OPERATION_NAME_PING

        public static final String OPERATION_NAME_PING
        The name identifying the ping operation when InvokeSfmService is used
        See Also:
        Constant Field Values
      • PARAMETER_NAME_XML_DATA

        public static final String PARAMETER_NAME_XML_DATA
        The 'xml_data' parameter used in the background save operation
        See Also:
        Constant Field Values
      • PARAMETER_NAME_REQUEST_KEY

        public static final String PARAMETER_NAME_REQUEST_KEY
        The 'sfmRequestKey' parameter used in the dynamic data and ping operations
        See Also:
        Constant Field Values
      • PARAMETER_NAME_SERVICE_NAME

        public static final String PARAMETER_NAME_SERVICE_NAME
        The 'sfmServiceName' parameter used in the dynamic data operation
        See Also:
        Constant Field Values
      • PARAMETER_NAME_SERVICE_VERSION

        public static final String PARAMETER_NAME_SERVICE_VERSION
        The 'sfmServiceVersion' parameter used in the dynamic data operation
        See Also:
        Constant Field Values
    • Constructor Detail

      • AbstractDynamicDataWebService

        public AbstractDynamicDataWebService()
    • Method Detail

      • InvokeService

        public String InvokeService​(String sfmOperationName,
                                    String sfmJsonParams)
        Invokes an arbitrary SFM "service" (not limited to service definitions) and returns the result, if any.
        Parameters:
        sfmOperationName - the name of the operation to invoke
        sfmJsonParams - the parameters for the operation as a JSON string
        Returns:
        a String, contents depending on the service that is invoked (may be null, or a JSON string encapsulating complex data)
      • handleBackgroundSave

        protected String handleBackgroundSave​(String jsonParams)
      • handleDynamicDataRequest

        protected String handleDynamicDataRequest​(String sfmRequestKey,
                                                  String sfmServiceName,
                                                  Integer sfmServiceVersion,
                                                  String sfmJsonParams)
                                           throws IllegalArgumentException,
                                                  SecurityException
        Return the JSON encoded dynamic service data for the given service request.
        Parameters:
        sfmRequestKey - the request key rendered in the form
        sfmServiceName - the Dynamic Data service definition name
        sfmServiceVersion - the Dynamic Data service version number (optional)
        sfmJsonParams - the URL encoded service parameters
        Returns:
        the JSON encoded dynamic service data for the given service request
        Throws:
        IllegalArgumentException - if web service parameters were invalid
        SecurityException - if web service invocation is not secured