-
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.
Merge pull request #626 from ashanthamara/actions
Add Action management API
- Loading branch information
Showing
22 changed files
with
3,162 additions
and
1 deletion.
There are no files selected for viewing
65 changes: 65 additions & 0 deletions
65
...er.action.management/org.wso2.carbon.identity.api.server.action.management.common/pom.xml
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 |
---|---|---|
@@ -0,0 +1,65 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 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. | ||
--> | ||
|
||
<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.action.management</artifactId> | ||
<version>1.2.205-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<artifactId>org.wso2.carbon.identity.api.server.action.management.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.action.management</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
</dependencies> | ||
</project> |
49 changes: 49 additions & 0 deletions
49
...o2/carbon/identity/api/server/action/management/common/ActionManagementServiceHolder.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 |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 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.action.management.common; | ||
|
||
import org.wso2.carbon.identity.action.management.ActionManagementService; | ||
|
||
/** | ||
* Service holder class for action management. | ||
*/ | ||
public class ActionManagementServiceHolder { | ||
|
||
private static ActionManagementService actionManagementService; | ||
|
||
/** | ||
* Get ActionManagementService osgi service. | ||
* | ||
* @return ActionManagementService. | ||
*/ | ||
public static ActionManagementService getActionManagementService() { | ||
|
||
return actionManagementService; | ||
} | ||
|
||
/** | ||
* Set ActionManagementService osgi service. | ||
* | ||
* @param actionManagementService ActionManagementService. | ||
*/ | ||
public static void setActionManagementService(ActionManagementService actionManagementService) { | ||
|
||
ActionManagementServiceHolder.actionManagementService = actionManagementService; | ||
} | ||
} |
50 changes: 50 additions & 0 deletions
50
...bon/identity/api/server/action/management/common/factory/ActionMgtOSGiServiceFactory.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 |
---|---|---|
@@ -0,0 +1,50 @@ | ||
/* | ||
* Copyright (c) 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.action.management.common.factory; | ||
|
||
import org.springframework.beans.factory.config.AbstractFactoryBean; | ||
import org.wso2.carbon.context.PrivilegedCarbonContext; | ||
import org.wso2.carbon.identity.action.management.ActionManagementService; | ||
|
||
/** | ||
* Factory class for ActionManagementOSGiService. | ||
*/ | ||
public class ActionMgtOSGiServiceFactory extends AbstractFactoryBean<ActionManagementService> { | ||
|
||
private ActionManagementService actionManagementService; | ||
|
||
@Override | ||
public Class<?> getObjectType() { | ||
|
||
return Object.class; | ||
} | ||
|
||
@Override | ||
protected ActionManagementService createInstance() throws Exception { | ||
|
||
if (this.actionManagementService == null) { | ||
actionManagementService = (ActionManagementService) PrivilegedCarbonContext. | ||
getThreadLocalCarbonContext().getOSGiService(ActionManagementService.class, null); | ||
if (actionManagementService == null) { | ||
throw new Exception("Action Management Service is not available."); | ||
} | ||
} | ||
return this.actionManagementService; | ||
} | ||
} |
169 changes: 169 additions & 0 deletions
169
...server.action.management/org.wso2.carbon.identity.api.server.action.management.v1/pom.xml
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 |
---|---|---|
@@ -0,0 +1,169 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<!-- | ||
~ Copyright (c) 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. | ||
--> | ||
<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.action.management</artifactId> | ||
<version>1.2.205-SNAPSHOT</version> | ||
<relativePath>../pom.xml</relativePath> | ||
</parent> | ||
|
||
<name>WSO2 Identity Server - Action Management Rest API</name> | ||
<description>WSO2 Identity Server - Action Management Rest API</description> | ||
<artifactId>org.wso2.carbon.identity.api.server.action.management.v1</artifactId> | ||
<packaging>jar</packaging> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.wso2.carbon.identity.framework</groupId> | ||
<artifactId>org.wso2.carbon.identity.action.management</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.fasterxml.jackson.jaxrs</groupId> | ||
<artifactId>jackson-jaxrs-json-provider</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.cxf</groupId> | ||
<artifactId>cxf-rt-frontend-jaxrs</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>javax.ws.rs</groupId> | ||
<artifactId>javax.ws.rs-api</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.swagger</groupId> | ||
<artifactId>swagger-jaxrs</artifactId> | ||
<exclusions> | ||
<exclusion> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-databind</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-annotations</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>com.fasterxml.jackson.core</groupId> | ||
<artifactId>jackson-core</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>com.fasterxml.jackson.dataformat</groupId> | ||
<artifactId>jackson-dataformat-yaml</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>javax.ws.rs</groupId> | ||
<artifactId>jsr311-api</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>com.google.guava</groupId> | ||
<artifactId>guava</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework</groupId> | ||
<artifactId>spring-web</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.wso2.carbon.identity.server.api</groupId> | ||
<artifactId>org.wso2.carbon.identity.api.server.common</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.wso2.carbon.identity.server.api</groupId> | ||
<artifactId>org.wso2.carbon.identity.api.server.action.management.common</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
<build> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>${maven.compiler.plugin.version}</version> | ||
<configuration> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<!--This plugin is used to generate the API classes from the OpenAPI definition.--> | ||
<!--Uncomment and execute if the API is updated.--> | ||
<!-- <plugin>--> | ||
<!-- <groupId>org.openapitools</groupId>--> | ||
<!-- <artifactId>openapi-generator-maven-plugin</artifactId>--> | ||
<!-- <version>4.1.2</version>--> | ||
<!-- <executions>--> | ||
<!-- <execution>--> | ||
<!-- <goals>--> | ||
<!-- <goal>generate</goal>--> | ||
<!-- </goals>--> | ||
<!-- <configuration>--> | ||
<!-- <inputSpec>${project.basedir}/src/main/resources/Actions.yaml</inputSpec>--> | ||
<!-- <generatorName>org.wso2.carbon.codegen.CxfWso2Generator</generatorName>--> | ||
<!-- <configOptions>--> | ||
<!-- <sourceFolder>src/gen/java</sourceFolder>--> | ||
<!-- <apiPackage>org.wso2.carbon.identity.api.server.action.management.v1</apiPackage>--> | ||
<!-- <modelPackage>org.wso2.carbon.identity.api.server.action.management.v1--> | ||
<!-- </modelPackage>--> | ||
<!-- <packageName>org.wso2.carbon.identity.api.server.action.management.v1</packageName>--> | ||
<!-- <dateLibrary>java17</dateLibrary>--> | ||
<!-- <hideGenerationTimestamp>true</hideGenerationTimestamp>--> | ||
<!-- <ignoreFileOverride>${project.basedir}/.openapi-generator-ignore</ignoreFileOverride>--> | ||
<!-- </configOptions>--> | ||
<!-- <output>.</output>--> | ||
<!-- <skipOverwrite>false</skipOverwrite>--> | ||
<!-- </configuration>--> | ||
<!-- </execution>--> | ||
<!-- </executions>--> | ||
<!-- <dependencies>--> | ||
<!-- <dependency>--> | ||
<!-- <groupId>org.openapitools</groupId>--> | ||
<!-- <artifactId>cxf-wso2-openapi-generator</artifactId>--> | ||
<!-- <version>1.0.0</version>--> | ||
<!-- </dependency>--> | ||
<!-- </dependencies>--> | ||
<!-- </plugin>--> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>build-helper-maven-plugin</artifactId> | ||
<version>1.8</version> | ||
<executions> | ||
<execution> | ||
<id>add-source</id> | ||
<phase>generate-sources</phase> | ||
<goals> | ||
<goal>add-source</goal> | ||
</goals> | ||
<configuration> | ||
<sources> | ||
<source>src/gen/java</source> | ||
</sources> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
</project> |
Oops, something went wrong.