mirror of
https://repository.entgra.net/community/device-mgt-core.git
synced 2025-10-06 02:01:45 +00:00
Fixed build issues
This commit is contained in:
parent
3ec54ba941
commit
36ca79d31a
@ -47,7 +47,7 @@
|
||||
<Bundle-Name>${project.artifactId}</Bundle-Name>
|
||||
<Bundle-Version>${carbon.device.mgt.version}</Bundle-Version>
|
||||
<Bundle-Description>Dynamic Client Registration Bundle</Bundle-Description>
|
||||
<Bundle-Activator>org.wso2.carbon.dynamic.client.registration.internal.DynamicClientRegistrationServiceComponent</Bundle-Activator>
|
||||
<Bundle-Activator>org.wso2.carbon.dynamic.client.registration.internal.DynamicClientRegistrationBundleActivator</Bundle-Activator>
|
||||
<Private-Package>org.wso2.carbon.dynamic.client.registration.internal</Private-Package>
|
||||
<Export-Package>
|
||||
!org.wso2.carbon.dynamic.client.registration.internal,
|
||||
|
||||
@ -160,13 +160,15 @@ public class DynamicClientRegistrationImpl implements DynamicClientRegistrationS
|
||||
"Service");
|
||||
}
|
||||
|
||||
ServiceProvider existingServiceProvider = appMgtService.getApplication(applicationName);
|
||||
ServiceProvider existingServiceProvider = appMgtService.getServiceProvider(
|
||||
applicationName, tenantDomain);
|
||||
|
||||
if (existingServiceProvider == null) {
|
||||
appMgtService.createApplication(serviceProvider);
|
||||
appMgtService.createApplication(serviceProvider, userName, tenantDomain);
|
||||
}
|
||||
|
||||
ServiceProvider createdServiceProvider = appMgtService.getApplication(applicationName);
|
||||
ServiceProvider createdServiceProvider = appMgtService.getServiceProvider(
|
||||
applicationName, tenantDomain);
|
||||
if (createdServiceProvider == null) {
|
||||
throw new DynamicClientRegistrationException(
|
||||
"Couldn't create Service Provider Application " + applicationName);
|
||||
@ -254,7 +256,7 @@ public class DynamicClientRegistrationImpl implements DynamicClientRegistrationS
|
||||
createdServiceProvider.setLocalAndOutBoundAuthenticationConfig(localOutboundAuthConfig);
|
||||
|
||||
// Update the Service Provider app to add OAuthApp as an Inbound Authentication Config
|
||||
appMgtService.updateApplication(createdServiceProvider);
|
||||
appMgtService.updateApplication(createdServiceProvider, tenantDomain, userName);
|
||||
|
||||
OAuthApplicationInfo oAuthApplicationInfo = new OAuthApplicationInfo();
|
||||
oAuthApplicationInfo.setClientId(createdApp.getOauthConsumerKey());
|
||||
@ -329,12 +331,13 @@ public class DynamicClientRegistrationImpl implements DynamicClientRegistrationS
|
||||
"Error occurred while retrieving Application Management" +
|
||||
"Service");
|
||||
}
|
||||
ServiceProvider createdServiceProvider = appMgtService.getApplication(applicationName);
|
||||
ServiceProvider createdServiceProvider = appMgtService.getServiceProvider(
|
||||
applicationName, tenantDomain);
|
||||
if (createdServiceProvider == null) {
|
||||
throw new DynamicClientRegistrationException(
|
||||
"Couldn't retrieve Service Provider Application " + applicationName);
|
||||
}
|
||||
appMgtService.deleteApplication(applicationName);
|
||||
appMgtService.deleteApplication(applicationName, tenantDomain, userName);
|
||||
status = true;
|
||||
} catch (IdentityApplicationManagementException e) {
|
||||
throw new DynamicClientRegistrationException(
|
||||
@ -361,7 +364,8 @@ public class DynamicClientRegistrationImpl implements DynamicClientRegistrationS
|
||||
"Service");
|
||||
}
|
||||
try {
|
||||
if (ApplicationManagementService.getInstance().getApplication(applicationName) != null) {
|
||||
if (ApplicationManagementService.getInstance().getServiceProvider(applicationName,
|
||||
CarbonContext.getThreadLocalCarbonContext().getTenantDomain()) != null) {
|
||||
return true;
|
||||
}
|
||||
} catch (IdentityApplicationManagementException e) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user