mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Add Application key generating logic
This commit is contained in:
parent
29a8dd5fde
commit
52fd8c4b89
@ -126,17 +126,36 @@ public class APIManagementProviderServiceImpl implements APIManagementProviderSe
|
|||||||
boolean isAllowedAllDomains,
|
boolean isAllowedAllDomains,
|
||||||
String validityTime, String password) throws APIManagerException {
|
String validityTime, String password) throws APIManagerException {
|
||||||
|
|
||||||
|
APIApplicationServices apiApplicationServices = APIApplicationManagerExtensionDataHolder.getInstance().getApiApplicationServices();
|
||||||
|
|
||||||
ConsumerRESTAPIServices consumerRESTAPIServices =
|
ConsumerRESTAPIServices consumerRESTAPIServices =
|
||||||
APIApplicationManagerExtensionDataHolder.getInstance().getConsumerRESTAPIServices();
|
APIApplicationManagerExtensionDataHolder.getInstance().getConsumerRESTAPIServices();
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
consumerRESTAPIServices.getAllApplications(null, null, null);
|
consumerRESTAPIServices.getAllApplications(null, null, applicationName);
|
||||||
|
|
||||||
|
List<String> uniqueApiList = new ArrayList<String>();
|
||||||
|
|
||||||
|
String tenantDomain = PrivilegedCarbonContext.getThreadLocalCarbonContext().getTenantDomain(true);
|
||||||
|
|
||||||
|
for (String tag: tags) {
|
||||||
|
Map<String, String> queryParams = new HashMap<>();
|
||||||
|
queryParams.put("tag", tag);
|
||||||
|
if ("carbon.super".equals(tenantDomain)) {
|
||||||
|
consumerRESTAPIServices.getAllApis(null, null, queryParams);
|
||||||
|
} else {
|
||||||
|
//call All API getting call with carbon super header param
|
||||||
|
}
|
||||||
|
|
||||||
|
uniqueApiList.add("Test");
|
||||||
|
Set<String> taggedAPISet = new HashSet<>(uniqueApiList);
|
||||||
|
uniqueApiList.clear();
|
||||||
|
uniqueApiList.addAll(taggedAPISet);
|
||||||
|
}
|
||||||
|
|
||||||
|
consumerRESTAPIServices.getAllSubscriptions(null, null, "1");
|
||||||
|
|
||||||
|
|
||||||
} catch (APIServicesException e) {
|
} catch (APIServicesException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
} catch (BadRequestException e) {
|
} catch (BadRequestException e) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user