Class CollectionAttributeController

java.lang.Object
com.skava.subscription.web.CollectionAttributeController

@RestController @RequestMapping("/collections") public class CollectionAttributeController extends Object

The Class CollectionAttributeController.

This class is the Rest Controller class. All the Collection Attribute API calls are mapped to this class. It is the starting point of all the Collection Attribute API calls.

  • Constructor Details

    • CollectionAttributeController

      public CollectionAttributeController()
  • Method Details

    • findAllCollectionProperties

      @PreAuthorize("hasRoleForBusinessById(\'ROLE_SUBSCRIPTION_ADMIN\', #businessId) or hasPrivilegeForBusinessById( \'subscription/manage/collection\', #businessId) or hasPrivilegeForBusinessById( \'subscription/view/collection\', #businessId)") @ResponseStatus(OK) @Audit(action="findAllCollectionProperties") @GetMapping("/properties") public org.springframework.http.ResponseEntity<List<CollectionAttribute>> findAllCollectionProperties(@RequestHeader(value="x-version-id",required=false) String versionId, @RequestHeader(value="x-auth-token",required=true) String authToken, @RequestHeader(value="userInfo",required=false) String userInfo, @RequestParam(value="businessId",required=true) long businessId, @RequestHeader(value="x-store-id",required=false,defaultValue="0") @AuditField(field="STORE_ID") long storeId, @RequestParam(value="locale",required=true,defaultValue="en_US") @IgnoreAudit String locale)

      method - Fetch all the collection properties based on the given collection Id

      Parameters:
      authToken - This field holds a valid authorization token generated using the Authorization microservice for an user. Auth token (JWT format) represents claims containing roles and privileges of the user accessing this API. JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transmitting information between parties as a JSON object. Since the token is a required field for this API it has to be generated before hand by invoking the /auth/sessions API provided by Authorization microservice. The output is three Base64 strings separated by dots that can be easily passed in HTML and HTTP environments, while being more compact when compared to XML-based standards such as SAML. Thus generated token has to be passed to this service and the request will be processed only if the following conditions are met: Token validation against the secret key Expiry time should be in the future Necessary privileges are available for the user to perform the action on the subjected resource.
      userInfo - userInfo
      businessId - This field holds a valid business identifier. A Business is typically a customer who has signed up with Infosys Equinox to launch a commerce store or a digital experience. An Infosys Equinox Commerce Instance can have multiple Businesses under which there can be multiple stores - Logical entity which binds all the services together to bring in an storefront experience.
      locale - API Response and error messages will be responded in the mentioned locale. Indicates the locale in which the API response and the error messages will be responded. The locale should be mentioned in the Java standard locale format.
      storeId - It contains the storeId associated with list. Indicates the store id associated with the item.
      versionId - It hold the value of version number of API. Using this parameter we can access the different version of the API. Holds the value of an API version number. Using this parameter, you can access different versions of the API. The version format is major.minor.patch. For example, 8.0.0.
      Returns:
      List A list of CollectionAttribute.