/* constructor */ public CommandController(@Value("${collibra.url}") String collibraUrl, @Value("${collibra.username}") String collibraUsername, @Value("${collibra.password}") String collibraPassword ) throws ApiException { logger.debug("Initializing the command controller"); this.collibraUrl = collibraUrl; this.collibraUsername = collibraUsername; this.collibraPassword = collibraPassword; logger.debug("Setting the Core API client"); // API client ApiClient defaultClient = Configuration.getDefaultApiClient(); //new ApiClient(); defaultClient.setBasePath(collibraUrl.trim()); defaultClient.setUsername(collibraUsername.trim()); defaultClient.setPassword(collibraPassword.trim()); defaultClient.setUserAgent(collibraCoreUseragent); // get asset types logger.debug("Asset types request"); AssetTypesApi assetTypesApi = new AssetTypesApi(); AssetTypePagedResponse assetTypePagedResponse = assetTypesApi.findAssetTypes(null, 10000, null, null, null, null, null, null); logger.debug("Parsing the asset types"); assetTypes = assetTypePagedResponse.getResults().stream().collect(Collectors.toMap(AssetTypeImpl::getName, AssetTypeImpl::getId)); // get attribute types logger.debug("Attribute types request"); AttributeTypesApi attributesTypesApi = new AttributeTypesApi(); AttributeTypePagedResponse attributeTypePagedResponse = attributesTypesApi.findAttributeTypes(null, 10000, null, null, null, null, null, null, null, null); logger.debug("Parsing the attribute types"); attributeTypes = attributeTypePagedResponse.getResults().stream().collect(Collectors.toMap(AttributeType::getName, AttributeType::getId)); // get relation types logger.debug("Relation types request"); relationTypes = new HashMap(); RelationTypesApi relationTypesApi = new RelationTypesApi(); RelationTypePagedResponse relationTypePagedResponse = relationTypesApi.findRelationTypes(null, 10000, null, null, null, null, null, null, null, null, null); logger.debug("Parsing the relation types"); for (RelationTypeImpl r : relationTypePagedResponse.getResults()) { relationTypes.put(r.getSourceType().getName()+" "+r.getRole()+" "+r.getTargetType().getName(), r.getId()); } // get statuses logger.debug("Statuses request"); StatusesApi statusesApi = new StatusesApi(); StatusPagedResponse statusPagedResponse = statusesApi.findStatuses(null, 10000, null, null, null); logger.debug("Parsing the status types"); statusTypes = statusPagedResponse.getResults().stream().collect(Collectors.toMap(StatusImpl::getName, StatusImpl::getId)); // set issue types issueTypes = Map.of( "Register Unity Catalog resources","_registerCatalog", "Create Delta Share", "_createShare", "Update Delta Share", "_updateShare", "Create Delta Share Recipient", "_createRecipient", "Grant Delta Share Access to Recipient", "_grantShare", "Revoke Delta Share Access from Recipient", "_revokeShare", "Delete Delta Share Recipient", "_deleteRecipient", "Delete Delta Share", "_deleteShare", "Get Activation Link", "_getActivationLink"); logger.debug("Constructor initialized"); }