com.ibm.commerce.rest.api.handler

Class ApiHandler

    • Field Detail

      • COPYRIGHT

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

        public static final java.lang.String RESOURCE_NAME
        The Constant RESOURCE_NAME.
        See Also:
        Constant Field Values
    • Constructor Detail

      • ApiHandler

        public ApiHandler()
    • Method Detail

      • getResourceHandlerMap

        public static java.util.Map<java.lang.String,java.lang.Class> getResourceHandlerMap()
        Returns:
        The map of resource handlers by name.
      • getResourceName

        public java.lang.String getResourceName()
        Description copied from interface: IResourceHandler
        This method returns the name of the resource used primarily to determine the representation of the resource. This class can be overridden to change the name of the resource and therefore the representation, while keeping all the methods in this class.
        Returns:
        the resource name.
      • getResourceList

        @GET
         @Produces(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response getResourceList(@QueryParam(value="responseFormat")
                                                                                                                       java.lang.String responseFormat)
        Fetch list of available resources.
        Parameters:
        responseFormat - the response format
        Returns:
        the response
      • getAggregatedResourceList

        @GET
         @Path(value="aggregated")
         @Produces(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response getAggregatedResourceList(@QueryParam(value="responseFormat")
                                                                                                                                                            java.lang.String responseFormat)
        Fetch list of aggregated available resources.
        Parameters:
        responseFormat - the response format
        Returns:
        the response
      • getResourceDescription

        @GET
         @Path(value="resource/{resourceName}")
         @Produces(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response getResourceDescription(@PathParam(value="resourceName")
                                                                                                                                                                      java.lang.String resourceName,
                                                                                                                                                                      @QueryParam(value="responseFormat")
                                                                                                                                                                      java.lang.String responseFormat)
        Describe the APIs available on a resource by name.
        Parameters:
        resourceName - Name of the resource.
        responseFormat - the response format
        Returns:
        the response
      • getResourceDescriptionBundle

        @GET
         @Path(value="bundle/{resourceName}")
         @Produces(value={"application/json","application/xml"})
        public javax.ws.rs.core.Response getResourceDescriptionBundle(@PathParam(value="resourceName")
                                                                                                                                                                          java.lang.String resourceName)
        Generate the default resource bundle for a resource.
        Parameters:
        resourceName - Name of the resource.
        Returns:
        the response
      • isDiscoveryEnabled

        public boolean isDiscoveryEnabled()
        Is API Discovery enabled.
        Returns:
        true if discovery is enabled.
      • populateResourceHandlerMap

        public static void populateResourceHandlerMap(java.lang.String baseConfigLoc)
        Populate the resource handler map for a specific servlet context.
        Parameters:
        String - The base configuration location.