Class InternalProductsRestController
java.lang.Object
es.kukenan.smartfi.microservice.contracts.controller.InternalProductsRestController
Internal products service Rest API controller.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringAuthority (role) required in order to be able to invoke greeting API.static final StringBase path for internal products Rest API.static final StringPath for single product Rest API.private ConnectedContractCacheOperationConnected Contract Cache Operation.private ContractServiceContract Service.protected es.kukenan.smartfi.common.service.jwt.JwtServiceJWT service for create a bearer to call products.private ProductsServiceProducts service.private es.kukenan.smartfi.common.context.RequestContextManagerRequest context manager. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate StringcreateBearerToken(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication) org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductsResponseDto>findInternalProducts(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, String byType, Boolean withPostedBalance, String byStatus, String bySignature, String byCurrency, String byService, String userIp) Internal products endpoint.org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto>findInternalProducts(String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication) Internal products endpoint for defined productId.
-
Field Details
-
API_BASE_PATH
Base path for internal products Rest API.- See Also:
-
API_PRODUCT_PATH
Path for single product Rest API.- See Also:
-
API_AUTHORITIES
Authority (role) required in order to be able to invoke greeting API.- See Also:
-
jwtService
@Autowired protected es.kukenan.smartfi.common.service.jwt.JwtService jwtServiceJWT service for create a bearer to call products. -
productsService
Products service. -
requestContextManager
@Autowired private es.kukenan.smartfi.common.context.RequestContextManager requestContextManagerRequest context manager. -
connectedContractCacheOperation
Connected Contract Cache Operation. -
contractService
Contract Service.
-
-
Constructor Details
-
InternalProductsRestController
public InternalProductsRestController()
-
-
Method Details
-
findInternalProducts
@PreAuthorize("(hasRole(\'ROLE_ACCESS_USER\') or hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')) and (hasRole(\'ROLE_LEVEL_USER_PWD\') or hasRole(\'ROLE_LEVEL_USER_SCA\'))") @GetMapping(produces="application/json", path="/api/v1/internal/products") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductsResponseDto> findInternalProducts(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication, @RequestParam(required=false) String byType, @RequestParam(required=false) Boolean withPostedBalance, @RequestParam(required=false) String byStatus, @RequestParam(required=false) String bySignature, @RequestParam(required=false) String byCurrency, @RequestParam(required=false) String byService, @RequestHeader(name="X-SKYLINE-USER-IP",defaultValue="") String userIp) Internal products endpoint.- Parameters:
walletAuthentication- user credentials.byType- types to filterwithPostedBalance- flag to filter for posted balancebyStatus- status to filterbySignature- signatures to filterbyCurrency- currency to filterbyService- service to filteruserIp- User Ip- Returns:
- products movements.
-
findInternalProducts
@PreAuthorize("(hasRole(\'ROLE_ACCESS_USER\') or hasRole(\'ROLE_ACCESS_AGENT\') or hasRole(\'ROLE_ACCESS_SUPERVISOR\')) and (hasRole(\'ROLE_LEVEL_USER_PWD\') or hasRole(\'ROLE_LEVEL_USER_SCA\'))") @GetMapping(produces="application/json", path="/api/v1/internal/products/{productId}") public org.springframework.http.ResponseEntity<es.kukenan.smartfi.microservice.contracts.api.products.ProductDto> findInternalProducts(@PathVariable(name="productId") String productId, es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication) Internal products endpoint for defined productId.- Parameters:
productId- product id.walletAuthentication- user credentials.- Returns:
- product movement.
-
createBearerToken
private String createBearerToken(es.kukenan.smartfi.common.security.WalletAuthentication walletAuthentication)
-