-
Notifications
You must be signed in to change notification settings - Fork 146
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #698 from NipuniBhagya/feature-remove-spring-gover…
…nance [Spring Cleanup] Remove Spring dependencies in the identity governance API
- Loading branch information
Showing
10 changed files
with
145 additions
and
153 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
36 changes: 22 additions & 14 deletions
36
.../org/wso2/carbon/identity/api/server/identity/governance/common/GovernanceDataHolder.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,45 @@ | ||
/* | ||
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
* Copyright (c) 2019-2024, WSO2 LLC. (http://www.wso2.com). | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.wso2.carbon.identity.api.server.identity.governance.common; | ||
|
||
import org.wso2.carbon.context.PrivilegedCarbonContext; | ||
import org.wso2.carbon.identity.governance.IdentityGovernanceService; | ||
|
||
/** | ||
* Service holder class for identity governance. | ||
*/ | ||
public class GovernanceDataHolder { | ||
|
||
private static IdentityGovernanceService identityGovernanceService; | ||
private GovernanceDataHolder() {} | ||
|
||
public static IdentityGovernanceService getIdentityGovernanceService() { | ||
|
||
return identityGovernanceService; | ||
private static class IdentityGovernanceServiceHolder { | ||
static final IdentityGovernanceService SERVICE = (IdentityGovernanceService) PrivilegedCarbonContext | ||
.getThreadLocalCarbonContext().getOSGiService(IdentityGovernanceService.class, null); | ||
} | ||
|
||
public static void setIdentityGovernanceService(IdentityGovernanceService identityGovernanceService) { | ||
/** | ||
* Get IdentityGovernanceService osgi service. | ||
* | ||
* @return IdentityGovernanceService | ||
*/ | ||
public static IdentityGovernanceService getIdentityGovernanceService() { | ||
|
||
GovernanceDataHolder.identityGovernanceService = identityGovernanceService; | ||
return IdentityGovernanceServiceHolder.SERVICE; | ||
} | ||
} |
53 changes: 0 additions & 53 deletions
53
...so2/carbon/identity/api/server/identity/governance/common/factory/OSGIServiceFactory.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 26 additions & 16 deletions
42
...tity/api/server/identity/governance/v1/factories/IdentityGovernanceApiServiceFactory.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,40 @@ | ||
/* | ||
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
* | ||
* Licensed under the Apache License, Version 2.0 (the "License"); | ||
* you may not use this file except in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, software | ||
* distributed under the License is distributed on an "AS IS" BASIS, | ||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
* See the License for the specific language governing permissions and | ||
* limitations under the License. | ||
*/ | ||
* Copyright (c) 2019-2024, WSO2 LLC. (http://www.wso2.com). | ||
* | ||
* WSO2 LLC. licenses this file to you under the Apache License, | ||
* Version 2.0 (the "License"); you may not use this file except | ||
* in compliance with the License. | ||
* You may obtain a copy of the License at | ||
* | ||
* http://www.apache.org/licenses/LICENSE-2.0 | ||
* | ||
* Unless required by applicable law or agreed to in writing, | ||
* software distributed under the License is distributed on an | ||
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
* KIND, either express or implied. See the License for the | ||
* specific language governing permissions and limitations | ||
* under the License. | ||
*/ | ||
|
||
package org.wso2.carbon.identity.api.server.identity.governance.v1.factories; | ||
|
||
import org.wso2.carbon.identity.api.server.identity.governance.v1.IdentityGovernanceApiService; | ||
import org.wso2.carbon.identity.api.server.identity.governance.v1.impl.IdentityGovernanceApiServiceImpl; | ||
|
||
/** | ||
* Factory class for Identity Governance API. | ||
*/ | ||
public class IdentityGovernanceApiServiceFactory { | ||
|
||
private final static IdentityGovernanceApiService service = new IdentityGovernanceApiServiceImpl(); | ||
private final static IdentityGovernanceApiService SERVICE = new IdentityGovernanceApiServiceImpl(); | ||
|
||
/** | ||
* Get Identity Governance API Service. | ||
* | ||
* @return IdentityGovernanceApiService | ||
*/ | ||
public static IdentityGovernanceApiService getIdentityGovernanceApi() | ||
{ | ||
return service; | ||
return SERVICE; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.