com.ibm.commerce.rest.classic.core

Class AbstractConfigBasedClassicHandler

    • Field Detail

      • COPYRIGHT

        public static final java.lang.String COPYRIGHT
        IBM Copyright notice field.
        See Also:
        Constant Field Values
    • Method Detail

      • executeConfigBasedBeanWithContext

        public javax.ws.rs.core.Response executeConfigBasedBeanWithContext(java.lang.String beanClassName,
                                                                           java.lang.String profileName,
                                                                           java.lang.String responseFormat,
                                                                           java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
        This methods sets up the BusinessContextService start request, then delegates to executeConfigBasedBean(String, String, String, Map), and finally ends BCS the request.
        Parameters:
        beanClassName - the command interface class
        profileName - profile for the bean in the configuration
        responseFormat - the response format to use when generating the result
        paramOverrideMap - Can be null. Defines any parameters that you want to add or override from the request object associated to this handler. Generally this is used if there are path parameters or entity data you would like included when it maps the query parameters with the input for the command. The key must be a string, the value can be any type object.
        Returns:
        the response
        See Also:
        executeConfigBasedBean(String, String, String, Map)
      • executeConfigBasedBeanWithContext

        public javax.ws.rs.core.Response executeConfigBasedBeanWithContext(java.lang.String beanClassName,
                                                                           java.lang.String profileName,
                                                                           java.lang.String responseFormat,
                                                                           java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap,
                                                                           Protectable siteResource)
        This methods sets up the BusinessContextService start request, then delegates to executeConfigBasedBean(String, String, String, Map), and finally ends BCS the request.
        Parameters:
        beanClassName - the command interface class
        profileName - profile for the bean in the configuration
        responseFormat - the response format to use when generating the result
        paramOverrideMap - Can be null. Defines any parameters that you want to add or override from the request object associated to this handler. Generally this is used if there are path parameters or entity data you would like included when it maps the query parameters with the input for the command. The key must be a string, the value can be any type object.
        siteResource - The resource to be checked for access control for site resource.
        Returns:
        the response
        See Also:
        executeConfigBasedBean(String, String, String, Map)
      • executeConfigBasedCommandWithContext

        public javax.ws.rs.core.Response executeConfigBasedCommandWithContext(java.lang.String commandInterfaceName,
                                                                              java.lang.String profileName,
                                                                              java.lang.String responseFormat,
                                                                              java.lang.String storeId,
                                                                              java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
        This methods sets up the BusinessContextService start request, then delegates to AbstractClassicResourceHandler.executeControllerCommand(String, String, TypedProperty, String), and finally ends BCS the request.
        Parameters:
        commandInterfaceName - the command interface class
        profileName - profile for the command in the configuration
        responseFormat - the response format to use when generating the result
        storeId - the store id
        paramOverrideMap - Can be null. Defines any parameters that you want to add or override from the request object associated to this handler. Generally this is used if there are query parameters you would like included when it maps the entity data with the input for the command. The key must be a string, the value can be any type object.
        Returns:
        the response
        See Also:
        AbstractClassicResourceHandler.executeControllerCommand(String, String, TypedProperty, String)
      • executeConfigBasedBean

        public org.apache.commons.json.JSONObject executeConfigBasedBean(java.lang.String beanClassName,
                                                                         java.lang.String profileName,
                                                                         java.lang.String responseFormat,
                                                                         java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
                                                                  throws java.lang.Exception
        Process a data bean request using the configuration-based profile mappings. It assumes that the BusinessContextService is dealt with by the caller.

        The input parameters will automatically be filled in based on any path parameters specified in the URL followed by any query parameters. An override map can be provided to inject more parameters or override pre-existing parameters.

        Parameters:
        beanClassName - the command interface class
        profileName - profile for the bean in the configuration
        responseFormat - the response format to use when generating the result
        paramOverrideMap - Can be null. Defines any parameters that you want to add or override from the request object associated to this handler. Generally this is used if there are path parameters or entity data you would like included when it maps the query parameters with the input for the command. The key must be a string, the value can be any type object.
        Returns:
        The processed bean response.
        Throws:
        java.lang.Exception - If the request execution failed.
      • executeConfigBasedBean

        public org.apache.commons.json.JSONObject executeConfigBasedBean(java.lang.String beanClassName,
                                                                         java.lang.String profileName,
                                                                         java.lang.String responseFormat,
                                                                         java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap,
                                                                         Protectable siteResource)
                                                                  throws java.lang.Exception
        Process a data bean request using the configuration-based profile mappings. It assumes that the BusinessContextService is dealt with by the caller.

        The input parameters will automatically be filled in based on any path parameters specified in the URL followed by any query parameters. An override map can be provided to inject more parameters or override pre-existing parameters.

        Parameters:
        beanClassName - the command interface class
        profileName - profile for the bean in the configuration
        responseFormat - the response format to use when generating the result
        paramOverrideMap - Can be null. Defines any parameters that you want to add or override from the request object associated to this handler. Generally this is used if there are path parameters or entity data you would like included when it maps the query parameters with the input for the command. The key must be a string, the value can be any type object.
        siteResource - The resource to be checked for access control for site resource.
        Returns:
        The processed bean response.
        Throws:
        java.lang.Exception - If the request execution failed.
      • executeConfigBasedCommand

        public org.apache.commons.json.JSONObject executeConfigBasedCommand(java.lang.String pCmdInterfaceName,
                                                                            java.lang.String profileName,
                                                                            java.lang.String responseFormat,
                                                                            java.lang.String storeId,
                                                                            java.util.Map<java.lang.String,java.lang.Object> paramOverrideMap)
                                                                     throws java.lang.Exception
        Process a controller command request using the configuration-based profile mappings. It assumes that the BusinessContextService is dealt with by the caller.

        The input parameters will automatically be filled in based on any path parameters specified in the URL followed by any parameters found in the request body. An override map can be provided to inject more parameters or override pre-existing parameters.

        Although the store ID is specified in the method call, it will not be automatically included in the list of parameters provided to populate the setters of the command. You must explicitly add it to the override map, or have it included via the URL path parameters or request body.

        Parameters:
        pCmdInterfaceName - the command interface class
        profileName - profile for the command in the configuration
        responseFormat - the response format to use when generating the result
        storeId - the store id
        paramOverrideMap - Can be null. Defines any parameters that you want to add or override from the request object associated to this handler. Generally this is used if there are query parameters you would like included when it maps the entity data with the input for the command. The key must be a string, the value can be any type object.
        Returns:
        the processed command response
        Throws:
        java.lang.Exception - if execution of the command failed