Package com.skava.web
Class CollectionAttributeController
java.lang.Object
com.skava.web.CollectionAttributeController
@RestController
@RequestMapping("/collections")
public class CollectionAttributeController
extends Object
The CollectionAttributeController class -
The controller class has service end points to load all the CollectionAttributes.
The controller class has service end points to load all the CollectionAttributes.
- Author:
- Infosys Equinox
-
Constructor Summary
ConstructorsConstructorDescriptionCollectionAttributeController
(GetAllCollectionAttributeService getAllCollectionAttributes) Default Constructor -
Method Summary
Modifier and TypeMethodDescriptionorg.springframework.http.ResponseEntity<List<CollectionAttribute>>
getAllCollectionAttributes
(String authToken, String locale, String version, Long businessId, long storeId) getAllCollectionAttributes.
-
Constructor Details
-
CollectionAttributeController
@Autowired public CollectionAttributeController(GetAllCollectionAttributeService getAllCollectionAttributes) Default Constructor
-
-
Method Details
-
getAllCollectionAttributes
@GetMapping("/properties") @PreAuthorize("hasAnyRole() or hasPrivilege(\'notification/view/collection\')") @Audit(action="getAllCollectionAttributes") public org.springframework.http.ResponseEntity<List<CollectionAttribute>> getAllCollectionAttributes(@RequestHeader(value="x-auth-token",required=true) @AuditField(field="AUTH_TOKEN") String authToken, @RequestParam(value="locale",required=false,defaultValue="en_US") @AuditField(field="LOCALE") String locale, @RequestHeader(value="x-version",required=false,defaultValue="8.19.7") @AuditField(field="VERSION") String version, @RequestParam(value="businessId",required=false,defaultValue="0") Long businessId, @RequestHeader(value="x-store-id",required=false,defaultValue="0") long storeId) getAllCollectionAttributes.
This service is used to get all notification's collection attributes.- Parameters:
authToken
- aString
object. 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
locale
- aString
object. API Response and error messages will be responded in the locale mentioned in this parameter. Locale needs to be mentioned in Java standard locale format.storeId
- Refers to the unique id of the store.version
- Refers to the version.- Returns:
- a
List
object. Returns list of user's collection attributes.
-