-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Spring Cleanup] Remove Spring dependencies in permission management API
- Loading branch information
1 parent
b8145c9
commit 3d04b19
Showing
11 changed files
with
185 additions
and
188 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
45 changes: 22 additions & 23 deletions
45
...ty/api/server/permission/management/common/RolePermissionManagementServiceDataHolder.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,47 +1,46 @@ | ||
/* | ||
* Copyright (c) 2019, WSO2 Inc. (http://www.wso2.org) All Rights Reserved. | ||
* Copyright (c) 2019-2025, 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.permission.management.common; | ||
|
||
import org.wso2.carbon.context.PrivilegedCarbonContext; | ||
import org.wso2.carbon.user.mgt.RolePermissionManagementService; | ||
|
||
/** | ||
* DataHolder class for RolePermissionManagementService. | ||
*/ | ||
public class RolePermissionManagementServiceDataHolder { | ||
|
||
private static RolePermissionManagementService rolePermissionManagementService; | ||
private RolePermissionManagementServiceDataHolder() {} | ||
|
||
/** | ||
* Get Role Permission Management Service. | ||
* | ||
* @return RolePermissionManagementService. | ||
*/ | ||
public static RolePermissionManagementService getRolePermissionManagementService() { | ||
return rolePermissionManagementService; | ||
private static class RolePermissionManagementServiceHolder { | ||
|
||
static final RolePermissionManagementService SERVICE = (RolePermissionManagementService) PrivilegedCarbonContext | ||
.getThreadLocalCarbonContext().getOSGiService(RolePermissionManagementService.class, null); | ||
} | ||
|
||
/** | ||
* Set RolePermissionManagementService. | ||
* Get RolePermissionManagementService osgi service. | ||
* | ||
* @param rolePermissionManagementService RolePermissionManagementService. | ||
* @return RolePermissionManagementService | ||
*/ | ||
public static void setRolePermissionManagementService(RolePermissionManagementService | ||
rolePermissionManagementService) { | ||
RolePermissionManagementServiceDataHolder.rolePermissionManagementService = | ||
rolePermissionManagementService; | ||
} | ||
public static RolePermissionManagementService getRolePermissionManagementService() { | ||
|
||
return RolePermissionManagementServiceHolder.SERVICE; | ||
} | ||
} |
53 changes: 0 additions & 53 deletions
53
...ntity/api/server/permission/management/common/RolePermissionManagementServiceFactory.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
34 changes: 30 additions & 4 deletions
34
.../api/server/permission/management/v1/factories/PermissionManagementApiServiceFactory.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,14 +1,40 @@ | ||
/* | ||
* Copyright (c) 2019-2025, 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.permission.management.v1.factories; | ||
|
||
import org.wso2.carbon.identity.api.server.permission.management.v1.PermissionManagementApiService; | ||
import org.wso2.carbon.identity.api.server.permission.management.v1.impl.PermissionManagementApiServiceImpl; | ||
|
||
/** | ||
* Factory class for PermissionManagementApiService. | ||
*/ | ||
public class PermissionManagementApiServiceFactory { | ||
|
||
private final static PermissionManagementApiService service = new PermissionManagementApiServiceImpl(); | ||
private final static PermissionManagementApiService SERVICE = new PermissionManagementApiServiceImpl(); | ||
|
||
/** | ||
* Get PermissionManagementApiService. | ||
* | ||
* @return PermissionManagementApiService | ||
*/ | ||
public static PermissionManagementApiService getPermissionManagementApi() { | ||
|
||
public static PermissionManagementApiService getPermissionManagementApi() | ||
{ | ||
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.