Skip to content

Commit

Permalink
Merge branch 'master' into app-tags
Browse files Browse the repository at this point in the history
  • Loading branch information
ashanthamara committed Oct 1, 2023
2 parents 017d427 + 395077f commit 9244ed8
Show file tree
Hide file tree
Showing 136 changed files with 5,914 additions and 99 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.expired.password.identification</artifactId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.expired.password.identification</artifactId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>identity-api-server</artifactId>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.idle.account.identification</artifactId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.idle.account.identification</artifactId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>identity-api-server</artifactId>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>org.wso2.carbon.identity.api.server.admin.advisory.management</artifactId>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>org.wso2.carbon.identity.api.server.admin.advisory.management</artifactId>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>identity-api-server</artifactId>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<version>1.2.81-SNAPSHOT</version>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~ Copyright (c) 2023, 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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.api.resource</artifactId>
<version>1.2.85-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<artifactId>org.wso2.carbon.identity.api.server.api.resource.common</artifactId>
<packaging>jar</packaging>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
</configuration>
</plugin>
</plugins>
</build>

<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>javax.ws.rs-api</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.application.mgt</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.framework</groupId>
<artifactId>org.wso2.carbon.identity.api.resource.mgt</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.wso2.carbon.identity.inbound.auth.oauth2</groupId>
<artifactId>org.wso2.carbon.identity.oauth</artifactId>
<scope>provided</scope>
</dependency>
</dependencies>
</project>
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
/*
* Copyright (c) 2023, 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.api.resource.common;

import org.wso2.carbon.identity.api.resource.mgt.APIResourceManager;
import org.wso2.carbon.identity.oauth.OAuthAdminServiceImpl;

/**
* Service holder class for api resource management.
*/
public class APIResourceManagementServiceHolder {

private static APIResourceManager apiResourceManager;
private static OAuthAdminServiceImpl oAuthAdminServiceImpl;

/**
* Get APIResourceManager osgi service.
*
* @return APIResourceManager.
*/
public static APIResourceManager getApiResourceManager() {

return apiResourceManager;
}

/**
* Set APIResourceManager osgi service.
*
* @param apiResourceManager APIResourceManager.
*/
public static void setApiResourceManager(APIResourceManager apiResourceManager) {

APIResourceManagementServiceHolder.apiResourceManager = apiResourceManager;
}

/**
* Get OAuthAdminServiceImpl instance.
*
* @return OAuthAdminServiceImpl instance.
*/
public static OAuthAdminServiceImpl getOAuthAdminServiceImpl() {

return oAuthAdminServiceImpl;
}

/**
* Set OAuthAdminServiceImpl instance.
*
* @param oAuthAdminServiceImpl OAuthAdminServiceImpl instance.
*/
public static void setOAuthAdminServiceImpl(OAuthAdminServiceImpl oAuthAdminServiceImpl) {

APIResourceManagementServiceHolder.oAuthAdminServiceImpl = oAuthAdminServiceImpl;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
/*
* Copyright (c) 2023, 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.api.resource.common.factory;

import org.springframework.beans.factory.config.AbstractFactoryBean;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.identity.api.resource.mgt.APIResourceManager;

/**
* Factory class for APIResourceManagementOSGiService.
*/
public class APIResourceMgtOSGiServiceFactory extends AbstractFactoryBean<APIResourceManager> {

private APIResourceManager apiResourceManager;

@Override
public Class<?> getObjectType() {

return Object.class;
}

@Override
protected APIResourceManager createInstance() throws Exception {

if (this.apiResourceManager == null) {
apiResourceManager = (APIResourceManager) PrivilegedCarbonContext.
getThreadLocalCarbonContext().getOSGiService(APIResourceManager.class, null);
if (apiResourceManager == null) {
throw new Exception("Unable to retrieve APIResourceManager service.");
}
}
return this.apiResourceManager;
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
/*
* Copyright (c) 2023, 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.api.resource.common.factory;

import org.springframework.beans.factory.config.AbstractFactoryBean;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.identity.oauth.OAuthAdminServiceImpl;

/**
* Factory Beans serves as a factory for creating other beans within the IOC container. This factory bean is used to
* instantiate the OAuthAdminServiceImpl type of object inside the container.
*/
public class OAuthAdminOSGiServiceFactory extends AbstractFactoryBean<OAuthAdminServiceImpl> {

private OAuthAdminServiceImpl oauthAdminService;

@Override
public Class<?> getObjectType() {

return Object.class;
}

@Override
protected OAuthAdminServiceImpl createInstance() throws Exception {

if (this.oauthAdminService == null) {
oauthAdminService = (OAuthAdminServiceImpl) PrivilegedCarbonContext
.getThreadLocalCarbonContext().getOSGiService(OAuthAdminServiceImpl.class, null);

if (oauthAdminService == null) {
throw new Exception("Unable to retrieve OAuthAdminServiceImpl service.");
}
}
return this.oauthAdminService;
}
}

Loading

0 comments on commit 9244ed8

Please sign in to comment.