branch for release 4.1

git-svn-id: https://svn.d4science-ii.research-infrastructures.eu/gcube/branches/vre-management/whn-manager-api/2.0@132447 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Lucio Lelii 2016-10-03 13:49:21 +00:00
commit fa15bf5160
22 changed files with 446 additions and 0 deletions

10
.classpath Normal file
View File

@ -0,0 +1,10 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java"/>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources"/>
<classpathentry kind="src" output="target/test-classes" path="src/test/java"/>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
</classpath>

23
.project Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>whnmanager-api</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,5 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8

View File

@ -0,0 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6

View File

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

1
distro/INSTALL Normal file
View File

@ -0,0 +1 @@
Used as library in the gCube Framework

2
distro/LICENSE Normal file
View File

@ -0,0 +1,2 @@
${gcube.license}

2
distro/MANTAINERS Normal file
View File

@ -0,0 +1,2 @@
Roberto Cirillo (roberto.cirillo@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo".

BIN
distro/README Normal file

Binary file not shown.

9
distro/changelog.xml Normal file
View File

@ -0,0 +1,9 @@
<ReleaseNotes>
<Changeset component="org.gcube.vremanagement.whnmanager-api.1-0-0" date="2013-12-12">
<Change>first release</Change>
</Changeset>
<Changeset component="org.gcube.vremanagement.whnmanager-api.2-0-0" date="2016-10-3">
<Change>moved to Smartgears 2.0</Change>
</Changeset>
</ReleaseNotes>

37
distro/descriptor.xml Normal file
View File

@ -0,0 +1,37 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>servicearchive</id>
<formats>
<format>tar.gz</format>
</formats>
<baseDirectory>/</baseDirectory>
<fileSets>
<fileSet>
<directory>${distroDirectory}</directory>
<outputDirectory>/</outputDirectory>
<useDefaultExcludes>true</useDefaultExcludes>
<includes>
<include>README</include>
<include>LICENSE</include>
<include>changelog.xml</include>
<include>profile.xml</include>
</includes>
<fileMode>755</fileMode>
<filtered>true</filtered>
</fileSet>
</fileSets>
<files>
<file>
<source>${distroDirectory}/profile.xml</source>
<outputDirectory>/</outputDirectory>
<filtered>true</filtered>
</file>
<file>
<source>target/${build.finalName}.jar</source>
<outputDirectory>/${artifactId}</outputDirectory>
</file>
</files>
</assembly>

28
distro/profile.xml Normal file
View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource>
<ID></ID>
<Type>Service</Type>
<Profile>
<Description>${description}</Description>
<Class>VREManagement</Class>
<Name>${artifactId}</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Description>${description}</Description>
<Name>${artifactId}</Name>
<Version>${version}</Version>
<MavenCoordinates>
<groupId>${groupId}</groupId>
<artifactId>${artifactId}</artifactId>
<version>${version}</version>
</MavenCoordinates>
<Type>library</Type>
<Files>
<File>${build.finalName}.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

0
distro/svnpath.txt Normal file
View File

69
pom.xml Normal file
View File

@ -0,0 +1,69 @@
<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.gcube.tools</groupId>
<artifactId>maven-parent</artifactId>
<version>1.0.0</version>
</parent>
<groupId>org.gcube.resourcemanagement</groupId>
<artifactId>whnmanager-api</artifactId>
<version>2.0.0-SNAPSHOT</version>
<name>whn manager api interface</name>
<description>common libraries for whnmanager</description>
<properties>
<distroDirectory>distro</distroDirectory>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.5</version>
<executions>
<execution>
<id>copy-profile</id>
<phase>install</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>target</outputDirectory>
<resources>
<resource>
<directory>${distroDirectory}</directory>
<filtering>true</filtering>
<includes>
<include>profile.xml</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
<configuration>
<descriptors>
<descriptor>${distroDirectory}/descriptor.xml</descriptor>
</descriptors>
</configuration>
<executions>
<execution>
<id>servicearchive</id>
<phase>install</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,5 @@
package org.gcube.resourcemanagement.whnmanager.api;
public class Costants {
public static final String TNS = "http://gcube-system.org/";
}

View File

@ -0,0 +1,25 @@
package org.gcube.resourcemanagement.whnmanager.api;
import javax.jws.WebService;
import javax.jws.soap.SOAPBinding;
import javax.jws.soap.SOAPBinding.ParameterStyle;
import javax.jws.soap.SOAPBinding.Style;
import javax.jws.soap.SOAPBinding.Use;
import org.gcube.resourcemanagement.whnmanager.api.exception.GCUBEUnrecoverableException;
//Service Endpoint Interface
@WebService(targetNamespace=WhnManager.TNS)
@SOAPBinding(style = Style.DOCUMENT, use=Use.LITERAL)
public interface WhnManager {
public static final String SERVICE_NAME = "gcube/vremanagement/ws/whnmanager";
public static final String TNS = "http://gcube-system.org/";
@SOAPBinding(parameterStyle=ParameterStyle.BARE)
public boolean addToContext(String context) throws GCUBEUnrecoverableException;
@SOAPBinding(parameterStyle=ParameterStyle.BARE)
public boolean removeFromContext(String context) throws GCUBEUnrecoverableException;
}

View File

@ -0,0 +1,30 @@
package org.gcube.resourcemanagement.whnmanager.api.exception;
import javax.xml.ws.WebFault;
import org.gcube.resourcemanagement.whnmanager.api.WhnManager;
import org.gcube.resourcemanagement.whnmanager.api.exception.GCUBEUnrecoverableExceptionInfo;
@WebFault(name="GCUBEUnrecoverableException")
public class GCUBEUnrecoverableException extends Exception {
/**
*
*/
private static final long serialVersionUID = 1L;
private GCUBEUnrecoverableExceptionInfo info ;
public GCUBEUnrecoverableException(GCUBEUnrecoverableExceptionInfo faultInfo){
info = faultInfo;
}
public GCUBEUnrecoverableException(GCUBEUnrecoverableExceptionInfo faultInfo, Throwable cause){
info = faultInfo;
}
public GCUBEUnrecoverableExceptionInfo getFaultInfo(){
return info;
}
}

View File

@ -0,0 +1,24 @@
package org.gcube.resourcemanagement.whnmanager.api.exception;
import javax.xml.bind.annotation.XmlElement;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class GCUBEUnrecoverableExceptionInfo {
@XmlElement
public String details;
protected GCUBEUnrecoverableExceptionInfo(){}
public GCUBEUnrecoverableExceptionInfo(String details) {
super();
this.details = details;
}
public String getDetails() {
return details;
}
}

View File

@ -0,0 +1,29 @@
package org.gcube.resourcemanagement.whnmanager.api.types;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
public class AddContextInputParams{
// @XmlElement
public String context;
// @XmlElement
public String map;
protected AddContextInputParams(){}
public AddContextInputParams(String scope, String map){
super();
this.context=scope;
this.map=map;
}
public String getContext() {
return context;
}
public String getMap() {
return map;
}
}

View File

@ -0,0 +1,39 @@
package org.gcube.resourcemanagement.whnmanager.api.types;
import javax.xml.bind.annotation.XmlRootElement;
//@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
public class RIData{
// @XmlElement
public String name;
// @XmlElement
public String clazz;
protected RIData(){}
public RIData(String name, String clazz){
super();
this.name=name;
this.clazz=clazz;
}
public String getName() {
return name;
}
// public void setName(String name) {
// this.name = name;
// }
public String getClazz() {
return clazz;
}
// public void setClazz(String clazz) {
// this.clazz = clazz;
// }
}

View File

@ -0,0 +1,53 @@
package org.gcube.resourcemanagement.whnmanager.api.types;
import javax.xml.bind.annotation.XmlAccessType;
import javax.xml.bind.annotation.XmlAccessorType;
import javax.xml.bind.annotation.XmlRootElement;
@XmlAccessorType(XmlAccessType.FIELD)
@XmlRootElement
public class ScopeRIParams{
// @XmlElement
public String scope;
// @XmlElement
public String name;
// @XmlElement
public String clazz;
protected ScopeRIParams(){}
public ScopeRIParams(String scope, String name, String clazz){
super();
this.scope=scope;
this.name=name;
this.clazz=clazz;
}
public String getScope() {
return scope;
}
// public void setScope(String scope) {
// this.scope = scope;
// }
public String getName() {
return name;
}
// public void setName(String name) {
// this.name = name;
// }
public String getClazz() {
return clazz;
}
// public void setClazz(String clazz) {
// this.clazz = clazz;
// }
}

View File

@ -0,0 +1,39 @@
package org.gcube.resourcemanagement.whnmanager.api.types;
import javax.xml.bind.annotation.XmlRootElement;
@XmlRootElement
//@XmlAccessorType(XmlAccessType.FIELD)
public class ShutdownOptions{
// @XmlElement
public boolean restart;
// @XmlElement
public boolean clean;
protected ShutdownOptions(){}
public ShutdownOptions(boolean restart, boolean clean){
super();
this.restart=restart;
this.clean=clean;
}
public boolean isRestart() {
return restart;
}
// public void setRestart(boolean restart) {
// this.restart = restart;
// }
public boolean isClean() {
return clean;
}
// public void setClean(boolean clean) {
// this.clean = clean;
// }
}