use of org.openkilda.integration.source.store.dto.Contract in project open-kilda by telstra.
the class ContractService method getContracts.
/**
* get contracts.
*
* @param linkId
* the link id
* @throws AccessDeniedException the access denied exception
*/
public List<Contract> getContracts(String linkId) throws AccessDeniedException {
LOGGER.info("Inside ContractService method getContracts");
UserInfo userInfo = userService.getLoggedInUserInfo();
if (userInfo.getPermissions().contains(IConstants.Permission.FW_FLOW_INVENTORY)) {
if (userInfo.getPermissions().contains(IConstants.Permission.FW_FLOW_CONTRACT)) {
List<Contract> contracts = flowStoreService.getContracts(linkId);
return contracts;
}
}
return null;
}