Commit 98b2d101 authored by Francesco Chicchiricco's avatar Francesco Chicchiricco
Browse files

[CRV-17] Initial commit: interface defined, empty implementation

parent 1f636aa7
......@@ -24,7 +24,7 @@ limitations under the License.
<version>0.1-SNAPSHOT</version>
</parent>
<name>CHOReVOLUTION IdM - Common</name>
<name>CHOReVOLUTION IdM: Common</name>
<artifactId>common</artifactId>
<packaging>jar</packaging>
......
......@@ -24,7 +24,7 @@ limitations under the License.
<version>0.1-SNAPSHOT</version>
</parent>
<name>CHOReVOLUTION IdM - Console</name>
<name>CHOReVOLUTION IdM: Console</name>
<artifactId>console</artifactId>
<packaging>war</packaging>
......
......@@ -24,7 +24,7 @@ limitations under the License.
<version>0.1-SNAPSHOT</version>
</parent>
<name>CHOReVOLUTION IdM - Core</name>
<name>CHOReVOLUTION IdM: Core</name>
<artifactId>core</artifactId>
<packaging>war</packaging>
......@@ -69,7 +69,18 @@ limitations under the License.
<groupId>org.apache.syncope.core</groupId>
<artifactId>syncope-core-workflow-activiti</artifactId>
</dependency>
<dependency>
<groupId>org.apache.syncope.ext</groupId>
<artifactId>syncope-ext-swagger-ui</artifactId>
<version>${syncope.version}</version>
</dependency>
<dependency>
<groupId>eu.chorevolution.idm.ext.ee</groupId>
<artifactId>syncope-ext-ee-rest-cxf</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
......
......@@ -24,7 +24,7 @@ limitations under the License.
<version>0.1-SNAPSHOT</version>
</parent>
<name>CHOReVOLUTION IdM - Enduser</name>
<name>CHOReVOLUTION IdM: Enduser</name>
<artifactId>enduser</artifactId>
<packaging>war</packaging>
......
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 The CHOReVOLUTION project
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.
-->
<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>eu.chorevolution.idm</groupId>
<artifactId>syncope-ext</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<name>CHOReVOLUTION IdM Extensions: EE</name>
<description>CHOReVOLUTION IdM Extensions: Enactment Engine</description>
<groupId>eu.chorevolution.idm.ext</groupId>
<artifactId>syncope-ext-ee</artifactId>
<packaging>pom</packaging>
<properties>
<rootpom.basedir>${basedir}/../..</rootpom.basedir>
</properties>
<modules>
<module>rest-api</module>
<module>rest-cxf</module>
</modules>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 The CHOReVOLUTION project
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.
-->
<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>eu.chorevolution.idm.ext</groupId>
<artifactId>syncope-ext-ee</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<name>CHOReVOLUTION IdM Extensions: EE REST API</name>
<description>CHOReVOLUTION IdM Extensions: EE REST API</description>
<groupId>eu.chorevolution.idm.ext.ee</groupId>
<artifactId>syncope-ext-ee-rest-api</artifactId>
<packaging>jar</packaging>
<properties>
<rootpom.basedir>${basedir}/../../..</rootpom.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.syncope.common</groupId>
<artifactId>syncope-common-rest-api</artifactId>
<version>${syncope.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- Generating javadoc JAR artifact for usage with CXF's WADL generator (for core) -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<inherited>true</inherited>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
/*
* Copyright 2015 The CHOReVOLUTION project
*
* 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.
*/
package org.apache.syncope.common.rest.api.service;
import java.io.InputStream;
import javax.validation.constraints.NotNull;
import javax.ws.rs.Consumes;
import javax.ws.rs.POST;
import javax.ws.rs.PUT;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
import javax.ws.rs.core.MediaType;
import org.apache.syncope.common.rest.api.type.ServiceAction;
import org.apache.syncope.common.rest.api.type.ChoreographyAction;
/**
* REST services to be invoked by - and to - the Enactment Engine.
*/
@Path("chors/{id}")
public interface ChoreographyService extends JAXRSService {
/**
* This operation will be invoked after a newly created choreography is enacted.
*
* @param id choreography id
* @param in ChorSpec XML representation
*/
@POST
@Consumes({ MediaType.APPLICATION_XML })
void create(@NotNull @PathParam("id") String id, InputStream in);
/**
* This operation will used to notify that a modification of a choreography’s concrete ChorSpec occurred.
* Such modifications may occur after performing an action on a whole running choreography or on a single service of
* it.
*
* @param id choreography id
* @param in ChorSpec XML representation
*/
@PUT
@Consumes({ MediaType.APPLICATION_XML })
void update(@NotNull @PathParam("id") String id, InputStream in);
/**
* Performs the given action on the given choreography.
*
* @param id choreography id
* @param action action to be performed
*/
@POST
@Path("{action}")
void onChoreography(
@NotNull @PathParam("id") String id,
@NotNull @PathParam("action") ChoreographyAction action);
/**
* Performs the given action on the given choreography's service.
*
* @param id choreography id
* @param serviceId choreography service id
* @param action action to be performed
*/
@POST
@Path("{serviceId}/{action}")
void onChoreographyService(
@NotNull @PathParam("id") String id,
@NotNull @PathParam("serviceId") String serviceId,
@NotNull @PathParam("action") ServiceAction action);
}
/*
* Copyright 2015 The CHOReVOLUTION project
*
* 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.
*/
package org.apache.syncope.common.rest.api.type;
public enum ChoreographyAction {
PAUSE,
RESUME,
SHUTDOWN,
RELEASE;
}
/*
* Copyright 2015 The CHOReVOLUTION project
*
* 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.
*/
package org.apache.syncope.common.rest.api.type;
public enum ServiceAction {
SCALE_UP,
SCALE_DOWN,
SCALE_UP_ACROSS,
SCALE_DOWN_ACROSS,
REPLACE_SERVICE;
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 The CHOReVOLUTION project
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.
-->
<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>eu.chorevolution.idm.ext</groupId>
<artifactId>syncope-ext-ee</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<name>CHOReVOLUTION IdM Extensions: EE REST CXF</name>
<description>CHOReVOLUTION IdM Extensions: EE REST CXF</description>
<groupId>eu.chorevolution.idm.ext.ee</groupId>
<artifactId>syncope-ext-ee-rest-cxf</artifactId>
<packaging>jar</packaging>
<properties>
<rootpom.basedir>${basedir}/../../..</rootpom.basedir>
</properties>
<dependencies>
<dependency>
<groupId>org.apache.syncope.core</groupId>
<artifactId>syncope-core-rest-cxf</artifactId>
</dependency>
<dependency>
<groupId>eu.chorevolution.idm.ext.ee</groupId>
<artifactId>syncope-ext-ee-rest-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>eu.chorevolution.idm.ext.ee</groupId>
<artifactId>syncope-ext-ee-rest-api</artifactId>
<version>${project.version}</version>
<classifier>javadoc</classifier>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-checkstyle-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
/*
* Copyright 2015 The CHOReVOLUTION project
*
* 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.
*/
package org.apache.syncope.core.rest.cxf.service;
import java.io.InputStream;
import org.apache.syncope.common.rest.api.type.ChoreographyAction;
import org.apache.syncope.common.rest.api.service.ChoreographyService;
import org.apache.syncope.common.rest.api.type.ServiceAction;
import org.springframework.stereotype.Service;
@Service
public class ChoreographyServiceImpl extends AbstractServiceImpl implements ChoreographyService {
@Override
public void create(final String id, final InputStream in) {
}
@Override
public void update(final String id, final InputStream in) {
}
@Override
public void onChoreography(final String id, final ChoreographyAction action) {
}
@Override
public void onChoreographyService(final String id, final String serviceId, final ServiceAction action) {
}
}
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 The CHOReVOLUTION project
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.
-->
<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>eu.chorevolution.idm</groupId>
<artifactId>syncope</artifactId>
<version>0.1-SNAPSHOT</version>
</parent>
<name>CHOReVOLUTION IdM Extensions</name>
<description>CHOReVOLUTION IdM Extensions</description>
<groupId>eu.chorevolution.idm</groupId>
<artifactId>syncope-ext</artifactId>
<packaging>pom</packaging>
<properties>
<rootpom.basedir>${basedir}/..</rootpom.basedir>
</properties>
<modules>
<module>ee</module>
</modules>
</project>
......@@ -195,6 +195,7 @@ limitations under the License.
<module>core</module>
<module>console</module>
<module>enduser</module>
<module>ext</module>
</modules>
</project>
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment