Lucio Lelii 5 years ago
parent
commit
6e9e2c173d
  1. 38
      .classpath
  2. 6
      .project
  3. 1
      .settings/org.eclipse.core.resources.prefs
  4. 4
      .settings/org.eclipse.jdt.core.prefs
  5. 102
      pom.xml
  6. 237
      src/main/java/org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.java
  7. 46
      src/main/java/org/gcube/vremanagement/whnmanager/utils/ValidationUtils.java
  8. 2
      src/main/webapp/WEB-INF/gcube-app.xml
  9. 7
      src/main/webapp/WEB-INF/web.xml
  10. 50
      src/test/java/org/gcube/vremanagement/whnmanager/client/test/WhnManagerTest.java
  11. 20
      target/apidocs/allclasses-frame.html
  12. 20
      target/apidocs/allclasses-noframe.html
  13. 117
      target/apidocs/constant-values.html
  14. 117
      target/apidocs/deprecated-list.html
  15. 222
      target/apidocs/help-doc.html
  16. 174
      target/apidocs/index-all.html
  17. 75
      target/apidocs/index.html
  18. 309
      target/apidocs/org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html
  19. 117
      target/apidocs/org/gcube/vremanagement/whnmanager/jaxws/ws/class-use/WhnManagerImpl.html
  20. 20
      target/apidocs/org/gcube/vremanagement/whnmanager/jaxws/ws/package-frame.html
  21. 135
      target/apidocs/org/gcube/vremanagement/whnmanager/jaxws/ws/package-summary.html
  22. 130
      target/apidocs/org/gcube/vremanagement/whnmanager/jaxws/ws/package-tree.html
  23. 117
      target/apidocs/org/gcube/vremanagement/whnmanager/jaxws/ws/package-use.html
  24. 277
      target/apidocs/org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html
  25. 117
      target/apidocs/org/gcube/vremanagement/whnmanager/utils/class-use/ValidationUtils.html
  26. 20
      target/apidocs/org/gcube/vremanagement/whnmanager/utils/package-frame.html
  27. 135
      target/apidocs/org/gcube/vremanagement/whnmanager/utils/package-summary.html
  28. 130
      target/apidocs/org/gcube/vremanagement/whnmanager/utils/package-tree.html
  29. 117
      target/apidocs/org/gcube/vremanagement/whnmanager/utils/package-use.html
  30. 22
      target/apidocs/overview-frame.html
  31. 135
      target/apidocs/overview-summary.html
  32. 132
      target/apidocs/overview-tree.html
  33. 2
      target/apidocs/package-list
  34. BIN
      target/apidocs/resources/background.gif
  35. BIN
      target/apidocs/resources/tab.gif
  36. BIN
      target/apidocs/resources/titlebar.gif
  37. BIN
      target/apidocs/resources/titlebar_end.gif
  38. 474
      target/apidocs/stylesheet.css
  39. 10
      target/javadoc-bundle-options/javadoc-options-javadoc-resources.xml
  40. 203
      target/javadoc-bundle-options/package-list
  41. 5
      target/maven-archiver/pom.properties
  42. 6
      target/whn-manager-2.0.0-SNAPSHOT/WEB-INF/classes/META-INF/beans.xml
  43. 28
      target/whn-manager-2.0.0-SNAPSHOT/WEB-INF/classes/META-INF/persistence.xml
  44. BIN
      target/whn-manager-2.0.0-SNAPSHOT/WEB-INF/classes/org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.class
  45. BIN
      target/whn-manager-2.0.0-SNAPSHOT/WEB-INF/classes/org/gcube/vremanagement/whnmanager/utils/ValidationUtils.class
  46. 8
      target/whn-manager-2.0.0-SNAPSHOT/WEB-INF/gcube-app.xml
  47. 9
      target/whn-manager-2.0.0-SNAPSHOT/WEB-INF/sun-jaxws.xml
  48. 43
      target/whn-manager-2.0.0-SNAPSHOT/WEB-INF/web.xml
  49. BIN
      target/whn-manager.war

38
.classpath

@ -1,10 +1,36 @@
<?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"/>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/classes"/>
</classpath>

6
.project

@ -5,6 +5,11 @@
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.wst.common.project.facet.core.builder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
@ -19,5 +24,6 @@
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
</natures>
</projectDescription>

1
.settings/org.eclipse.core.resources.prefs

@ -3,3 +3,4 @@ encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

4
.settings/org.eclipse.jdt.core.prefs

@ -1,6 +1,6 @@
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.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.7
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
@ -9,4 +9,4 @@ 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.5
org.eclipse.jdt.core.compiler.source=1.7

102
pom.xml

@ -1,31 +1,31 @@
<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>
<parent>
<groupId>org.gcube.tools</groupId>
<artifactId>maven-parent</artifactId>
<version>1.0.0</version>
</parent>
<groupId>org.gcube.resourcemanagement</groupId>
<artifactId>whn-manager</artifactId>
<version>1.1.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<packaging>war</packaging>
<properties>
<webappDirectory>${project.basedir}/src/main/webapp/WEB-INF</webappDirectory>
<distroDirectory>${project.basedir}/distro</distroDirectory>
</properties>
<webappDirectory>${project.basedir}/src/main/webapp/WEB-INF</webappDirectory>
<distroDirectory>${project.basedir}/distro</distroDirectory>
</properties>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.gcube.distribution</groupId>
<artifactId>maven-smartgears-bom</artifactId>
<version>LATEST</version>
<version>2.0.0-SNAPSHOT</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<dependencies>
<dependency>
<groupId>org.slf4j</groupId>
@ -41,20 +41,21 @@
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-smartgears-app</artifactId>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-smartgears-app</artifactId>
</dependency>
<dependency>
<groupId>com.sun.xml.ws</groupId>
<artifactId>jaxws-rt</artifactId>
<version>2.1.7</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>org.jboss.weld.servlet</groupId> -->
<!-- <artifactId>weld-servlet</artifactId> -->
<!-- <version>1.1.9.Final</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>org.jboss.weld.servlet</groupId> -->
<!-- <artifactId>weld-servlet</artifactId> -->
<!-- <version>1.1.9.Final</version> -->
<!-- </dependency> -->
<dependency>
<groupId>org.jboss.weld.servlet</groupId>
<artifactId>weld-servlet-core</artifactId>
@ -88,51 +89,46 @@
<dependency>
<groupId>org.gcube.resourcemanagement</groupId>
<artifactId>whnmanager-api</artifactId>
<version>[1.0.0-SNAPSHOT, 2.0.0-SNAPSHOT)</version>
</dependency>
<dependency>
<groupId>org.gcube.core</groupId>
<artifactId>common-jaxws-calls</artifactId>
<version>1.0.0-SNAPSHOT</version>
<scope>test</scope>
<version>[2.0.0-SNAPSHOT, 3.0.0-SNAPSHOT)</version>
</dependency>
</dependencies>
<build>
<plugins>
<!-- interpolates profiles and copies from distribution location to configuration
location, where it is need for embedding into stub artifact, gar generation,
and service archive. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-profile</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<outputDirectory>${webappDirectory}</outputDirectory>
<resources>
<resource>
<directory>${distroDirectory}</directory>
<includes>
<include>gcube-app.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!-- interpolates profiles and copies from distribution location to configuration
location, where it is need for embedding into stub artifact, gar generation,
and service archive. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<executions>
<execution>
<id>copy-profile</id>
<goals>
<goal>copy-resources</goal>
</goals>
<phase>process-resources</phase>
<configuration>
<outputDirectory>${webappDirectory}</outputDirectory>
<resources>
<resource>
<directory>${distroDirectory}</directory>
<includes>
<include>gcube-app.xml</include>
</includes>
<filtering>true</filtering>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<configuration>
<!-- <packagingExcludes>WEB-INF/lib/jaxws-rt-2.1.7.jar,WEB-INF/lib/jaxws-api-2.1.jar,WEB-INF/lib/jaxb-impl-2.1.11.jar,WEB-INF/lib/jaxb-api-2.1.jar</packagingExcludes> -->
<!-- <packagingExcludes>WEB-INF/lib/jaxws-rt-2.1.7.jar,WEB-INF/lib/jaxws-api-2.1.jar,WEB-INF/lib/jaxb-impl-2.1.11.jar,WEB-INF/lib/jaxb-api-2.1.jar</packagingExcludes> -->
<warName>whn-manager</warName>
<webXml>src\main\webapp\WEB-INF\web.xml</webXml>
</configuration>

237
src/main/java/org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.java

@ -1,34 +1,24 @@
package org.gcube.vremanagement.whnmanager.jaxws.ws;
import java.io.OutputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Arrays;
import java.util.Iterator;
import static org.gcube.smartgears.provider.ProviderFactory.provider;
import javax.jws.WebService;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.configuration.application.ApplicationConfiguration;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.smartgears.context.container.ContainerContext;
import org.gcube.smartgears.extensions.resource.ScopesResource.Scope;
import org.gcube.smartgears.handlers.container.lifecycle.ProfilePublisher;
import org.gcube.vremanagement.whnmanager.utils.ValidationUtils;
//import org.gcube.common.calls.jaxws.Constants;
import org.gcube.common.resources.gcore.HostingNode;
import org.gcube.common.resources.gcore.Resources;
import org.gcube.common.resources.gcore.ScopeGroup;
import org.gcube.common.authorization.client.proxy.AuthorizationProxy;
import org.gcube.common.authorization.library.provider.AuthorizationProvider;
import org.gcube.common.authorization.library.provider.ContainerInfo;
import org.gcube.common.scope.api.ScopeProvider;
import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.common.scope.impl.ScopeBean.Type;
import org.gcube.resourcemanagement.whnmanager.api.exception.GCUBEUnrecoverableException;
import org.gcube.resourcemanagement.whnmanager.api.WhnManager;
import org.gcube.resourcemanagement.whnmanager.api.types.AddScopeInputParams;
import org.gcube.resourcemanagement.whnmanager.api.types.ScopeRIParams;
import org.gcube.resourcemanagement.whnmanager.api.exception.GCUBEUnrecoverableException;
import org.gcube.resourcemanagement.whnmanager.api.exception.GCUBEUnrecoverableExceptionInfo;
import org.gcube.smartgears.ContextProvider;
import org.gcube.smartgears.context.application.ApplicationContext;
import org.gcube.smartgears.managers.ContextEvents;
import org.gcube.vremanagement.whnmanager.utils.ValidationUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
//import org.gcube.common.calls.jaxws.Constants;
@WebService(portName = "WhnManagerIOPort",
serviceName = WhnManager.SERVICE_NAME,
@ -37,44 +27,41 @@ endpointInterface = "org.gcube.resourcemanagement.whnmanager.api.WhnManager" )
//@Singleton
public class WhnManagerImpl implements WhnManager{
private static Logger logger=LoggerFactory.getLogger(WhnManagerImpl.class);
public static final String SCOPE_HEADER_ENTRY = "gcube-scope";
//public static final String TOKEN_HEADER_ENTRY = "gcube-token";
/**
* Add a scope to the ghn profile and publish it on IS
*/
@Override
public boolean addScope(AddScopeInputParams params) throws GCUBEUnrecoverableException{
logger.trace("WHNManager: addScope method invokation");
String scope=params.getScope();
ValidationUtils.valid("scope", scope);
ApplicationContext context = ContextProvider.get();
public boolean addToContext(String context) throws GCUBEUnrecoverableException{
logger.trace("WHNManager: addToContext method invokation with parameters context :{} and caller: {} curentContext: {}",context, AuthorizationProvider.instance.get(), ScopeProvider.instance.get() );
ValidationUtils.valid("context", context);
ApplicationContext appContext = ContextProvider.get();
if(context!=null){
HostingNode ghn=context.container().profile(HostingNode.class);
if(new ScopeBean(scope).is(Type.VRE)){
logger.debug("addScope operation on VRE scope. Check if present VO scope");
scope=new ScopeBean(scope).enclosingScope().toString();
logger.debug("VO scope: "+scope);
}
if(!ValidationUtils.isPresent(ghn, scope)){
ValidationUtils.addEnclosingScopesOnResource(ghn, scope);
logger.debug("addScope method: add scope "+scope+" to resource with id: "+ghn.id());
ghn.scopes().asCollection().add(scope);
ScopeGroup<String> scopes=ghn.scopes();
logger.debug(" resource will be published in scopes: ");
for(Iterator it=scopes.iterator(); it.hasNext();){
String scopeFound=(String)it.next();
logger.debug(" - "+scopeFound);
if(!appContext.container().configuration().allowedContexts().contains(context)){
if (new ScopeBean(context).enclosingScope().toString().equals(ScopeProvider.instance.get())){
AuthorizationProxy proxy = provider().authorizationProxy();
try {
String token = proxy.requestActivation(new ContainerInfo(appContext.container().configuration().hostname(), appContext.container().configuration().port()), context);
logger.trace("generated token is {}",token);
appContext.events().fire(token, ContextEvents.ADD_TOKEN_TO_CONTAINER);
} catch (Exception e) {
logger.error("error contacting authorization service",e);
throw new GCUBEUnrecoverableException(new GCUBEUnrecoverableExceptionInfo("error contacting authorization service"));
}
} else {
logger.error("the selected context {} is not enclosed in the context passed via token : authorization denied ", context);
return false;
}
ContainerContext container=context.container()/*.configuration().apps()*/;
ProfilePublisher publisher= new ProfilePublisher(container);
publisher.update();
}else{
logger.warn("the scope "+scope+" is already present on ghn profile with id: "+ ghn.id());
logger.warn("the context {} is already present ", context);
return false;
}
}else{
logger.warn("addScope method: context is null");
logger.error("context is null");
return false;
}
return true;
}
@ -83,140 +70,36 @@ public class WhnManagerImpl implements WhnManager{
* Remove a scope from ghn profile and publish the new profile on IS
*/
@Override
public boolean removeScope(String scope) throws GCUBEUnrecoverableException {
logger.trace("WHN-Manager: removeScope method invokation");
ValidationUtils.valid("scope", scope);
if(new ScopeBean(scope).is(Type.VRE)){
logger.debug("this is a VRE scope. The request will be ignored ");
return true;
}
ApplicationContext context = ContextProvider.get();
public boolean removeFromContext(String context) throws GCUBEUnrecoverableException {
logger.trace("WHNManager: removeFromContext method invokation with parameters context :{} and caller: {} curentContext: {}",context, AuthorizationProvider.instance.get(), ScopeProvider.instance.get() );
ValidationUtils.valid("context", context);
ApplicationContext appContext = ContextProvider.get();
if(context!=null){
HostingNode ghn=context.container().profile(HostingNode.class);
if(ValidationUtils.isPresent(ghn, scope)){
logger.debug("removeScope method: remove scope "+scope+" to resource with id: "+ghn.id());
ContainerContext container=context.container();
ProfilePublisher publisher= new ProfilePublisher(container);
publisher.removeFrom(Arrays.asList(scope));
if(appContext.container().configuration().allowedContexts().contains(context)){
if (new ScopeBean(context).enclosingScope().toString().equals(ScopeProvider.instance.get())){
AuthorizationProxy proxy = provider().authorizationProxy();
try {
String token = proxy.requestActivation(new ContainerInfo(appContext.container().configuration().hostname(), appContext.container().configuration().port()), context);
logger.trace("token to remove is {}",token);
appContext.events().fire(token, ContextEvents.REMOVE_TOKEN_FROM_CONTAINER);
} catch (Exception e) {
logger.error("error contacting authorization service",e);
throw new GCUBEUnrecoverableException(new GCUBEUnrecoverableExceptionInfo("error contacting authorization service"));
}
} else {
logger.error("the selected context {} is not enclosed in the context passed via token : authorization denied ", context);
return false;
}
}else{
logger.warn("scope is not present in the resource");
logger.warn("the context {} is not present ", context);
return false;
}
}else{
logger.warn("addScope method: context is null");
logger.error("context is null");
return false;
}
return true;
}
@Override
public boolean addRIToScope(ScopeRIParams params) throws GCUBEUnrecoverableException{
logger.debug("addRIToScope method: Adding scope " + params.getScope() + " to RI <" + params.getClazz() +","+ params.getName() +">");
try {
HttpURLConnection connection =getConnectionToScopeManager(params.name);
logger.debug("adding scope: "+params.scope);
Scope newScope = new Scope(params.scope);
try (OutputStream output = connection.getOutputStream()) {
Resources.marshal(newScope, output);
}
logger.info("addScope operation ended with response code: "+connection.getResponseCode());
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return true;
}
//
// @Override
// public boolean activateRI(RIData ri) throws GCUBEUnrecoverableException{
// logger.debug("dummy activereRI method with param "+ri);
// return true;
// }
//
//
// @Override
// public boolean deactivateRI(RIData ri) throws GCUBEUnrecoverableException{
// logger.debug("dummy deactivateRI method with param "+ri);
// return true;
// }
//
@Override
public boolean removeRIFromScope(ScopeRIParams params) throws GCUBEUnrecoverableException{
logger.debug("removeRIFromScope method with param "+params);
try {
HttpURLConnection connection =getConnectionToScopeManager(params.name);
logger.debug("adding scope: "+params.scope);
Scope newScope = new Scope(params.scope);
newScope.delete=true;
try (OutputStream output = connection.getOutputStream()) {
Resources.marshal(newScope, output);
}
logger.info("addScope operation ended with response code: "+connection.getResponseCode());
} catch (Exception e) {
e.printStackTrace();
}
return true;
}
private void addScope(String appName, String currentScope, String scopeToAdd ) throws Exception{
ApplicationContext context = ContextProvider.get();
String hostname = context.container().configuration().hostname();
int port = context.container().configuration().port();
ApplicationConfiguration app=getAppConfiguration(appName, context);
if(app!=null){
if(logger.isDebugEnabled())
logger.debug("http call to: http://"+hostname+":"+port+"/"+app.context()+"/gcube/resource/scopes");
// URL url = new URL(String.format("http://%s:%d/%s/gcube/resource/scopes", "dlib29.isti.cnr.it", 8080, "authorization-service" ));
URL url = new URL(String.format("http://%s:%d/%s/gcube/resource/scopes", hostname, port, app.context()));
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestProperty("Content-Type", "application/xml");
connection.setRequestProperty(SCOPE_HEADER_ENTRY, currentScope);
Scope newScope = new Scope(scopeToAdd);
try (OutputStream output = connection.getOutputStream()) {
Resources.marshal(newScope, output);
}
logger.info("addScope operation ended with response code: "+connection.getResponseCode());
}else{
throw new RuntimeException("applicationConfiguration not found ");
}
}
private HttpURLConnection getConnectionToScopeManager(String appName) throws Exception{
ApplicationContext context = ContextProvider.get();
String hostname = context.container().configuration().hostname();
int port = context.container().configuration().port();
String currentScope=ScopeProvider.instance.get();
ApplicationConfiguration app=getAppConfiguration(appName, context);
if(app!=null){
if(logger.isDebugEnabled())
logger.debug("http call to: http://"+hostname+":"+port+"/"+app.context()+"/gcube/resource/scopes");
// URL url = new URL(String.format("http://%s:%d/%s/gcube/resource/scopes", "dlib29.isti.cnr.it", 8080, "authorization-service" ));
URL url = new URL(String.format("http://%s:%d/%s/gcube/resource/scopes", hostname, port, app.context()));
HttpURLConnection connection = (HttpURLConnection)url.openConnection();
connection.setRequestMethod("POST");
connection.setDoOutput(true);
connection.setDoInput(true);
connection.setRequestProperty("Content-Type", "application/xml");
connection.setRequestProperty(SCOPE_HEADER_ENTRY, currentScope);
return connection;
}else{
throw new RuntimeException("applicationConfiguration not found ");
}
}
private ApplicationConfiguration getAppConfiguration(String appName, ApplicationContext context){
logger.debug("get application configuration");
for (ApplicationConfiguration app : context.container().configuration().apps()){
logger.debug("check app "+ app.name());
if (app.name().equals(appName)){
logger.debug("application configuration is "+app.name());
return app;
}
}
return null;
}
}

46
src/main/java/org/gcube/vremanagement/whnmanager/utils/ValidationUtils.java

@ -3,34 +3,17 @@ package org.gcube.vremanagement.whnmanager.utils;
import java.util.Iterator;
import org.gcube.common.resources.gcore.Resource;
import org.gcube.common.resources.gcore.ResourceMediator;
import org.gcube.common.resources.gcore.ScopeGroup;
import org.gcube.common.scope.impl.ScopeBean;
import org.gcube.common.scope.impl.ScopeBean.Type;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ValidationUtils {
private static final Logger log = LoggerFactory.getLogger(ValidationUtils.class);
//private static final Logger log = LoggerFactory.getLogger(ValidationUtils.class);
public static void valid(String name, Object object){
if (object==null)
throw new IllegalArgumentException(name+" is null");
}
public static < R extends Resource > boolean isPresent(R resource, String currentScope){
ScopeGroup<String> scopes=resource.scopes();
boolean founded= false;
for(Iterator<String> it=scopes.iterator(); it.hasNext();){
String scope=it.next();
if(scope.equals(currentScope))
founded=true;
}
if(founded)
return true;
return false;
}
public static < R extends Resource > boolean isNotPresent(R resource, String currentScope){
@ -47,28 +30,7 @@ public class ValidationUtils {
}
/**
* If scope is a VRE scope and the VO and INFRA scopes are not present in the resource, this method add these scopes to the resource
* @param resource the resource
* @param scope a scope
*/
public static <T extends Resource> void addEnclosingScopesOnResource(T resource, String scope){
log.trace("add enclosed scopes of "+scope+" to the resource with id: "+resource.id());
if(new ScopeBean(scope).is(Type.VRE)){
String voScope=new ScopeBean(scope).enclosingScope().toString();
String infraScope=new ScopeBean(voScope).enclosingScope().toString();
// The scope collection is a set, I can add scope without checking
log.debug("adding "+voScope+" to the resource "+resource.id());
ResourceMediator.setScope(resource, voScope);
log.debug("adding "+infraScope+" to the resource "+resource.id());
ResourceMediator.setScope(resource, infraScope);
}else if(new ScopeBean(scope).is(Type.VO)){
String infraScope=new ScopeBean(scope).enclosingScope().toString();
log.debug("adding "+infraScope+" to the resource "+resource.id());
// The scope collection is a set, I can add scope without checking
ResourceMediator.setScope(resource, infraScope);
}
}
/*
public static <T extends Resource> boolean isTheLastScopeOnResource(T resource, String scope){
if(resource.scopes().size() == 0)
@ -133,7 +95,7 @@ public class ValidationUtils {
return false;
}
*/
}

2
src/main/webapp/WEB-INF/gcube-app.xml

@ -1,7 +1,7 @@
<application mode='online'>
<name>WhnManager</name>
<group>VREManagement</group>
<version>1.1.0-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<description>Web Hosting Node Service</description>
<local-persistence location='target' />
</application>

7
src/main/webapp/WEB-INF/web.xml

@ -4,15 +4,10 @@
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
version="2.5">
<!-- <listener> -->
<!-- <listener-class>org.jboss.weld.environment.servlet.Listener</listener-class> -->
<!-- </listener> -->
<listener>
<listener-class>com.sun.xml.ws.transport.http.servlet.WSServletContextListener</listener-class>
</listener>
<!--
<!--
<listener>
<listener-class>org.gcube.data.analysis.tabulardata.context.MyContext</listener-class>
</listener>

50
src/test/java/org/gcube/vremanagement/whnmanager/client/test/WhnManagerTest.java

@ -1,50 +0,0 @@
package org.gcube.vremanagement.whnmanager.client.test;
import static org.junit.Assert.*;
import java.net.URL;
import javax.xml.namespace.QName;
import org.gcube.common.calls.jaxws.GcubeService;
import org.gcube.common.scope.api.ScopeProvider;
import org.junit.Before;
import org.junit.Test;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.net.MalformedURLException;
import javax.xml.ws.Service;
import org.gcube.resourcemanagement.whnmanager.api.WhnManager;
import org.gcube.resourcemanagement.whnmanager.api.types.AddScopeInputParams;
public class WhnManagerTest {
private Logger logger = LoggerFactory.getLogger(WhnManagerTest.class);
private final static String address="http://localhost:8080/whn-manager/gcube/vremanagement/ws/whnmanager";
private URL url;
private WhnManager whn;
@Before
public void setup() throws MalformedURLException{
ScopeProvider.instance.set("/gcube/devsec");
url = new URL(address);
QName qname = new QName(WhnManager.TNS, WhnManager.SERVICE_NAME);
GcubeService<WhnManager> serviceManager = GcubeService.service().withName(qname).andInterface(WhnManager.class);
whn=org.gcube.common.calls.jaxws.StubFactory.stubFor(serviceManager).at(address);
}
// @Test
public void addScopeTest() throws Exception{
AddScopeInputParams params = new AddScopeInputParams("/gcube/devsec", "");
assertTrue(whn.addScope(params));
}
// @Test
public void removeScopeTest() throws Exception{
assertTrue(whn.removeScope("/gcube/devsec"));
}
}

20
target/apidocs/allclasses-frame.html

@ -0,0 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Tue Sep 06 10:18:38 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>All Classes (whn-manager 2.0.0-SNAPSHOT API)</title>
<meta name="date" content="2016-09-06">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
<h1 class="bar">All Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html" title="class in org.gcube.vremanagement.whnmanager.utils" target="classFrame">ValidationUtils</a></li>
<li><a href="org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html" title="class in org.gcube.vremanagement.whnmanager.jaxws.ws" target="classFrame">WhnManagerImpl</a></li>
</ul>
</div>
</body>
</html>

20
target/apidocs/allclasses-noframe.html

@ -0,0 +1,20 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Tue Sep 06 10:18:38 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>All Classes (whn-manager 2.0.0-SNAPSHOT API)</title>
<meta name="date" content="2016-09-06">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
<h1 class="bar">All Classes</h1>
<div class="indexContainer">
<ul>
<li><a href="org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html" title="class in org.gcube.vremanagement.whnmanager.utils">ValidationUtils</a></li>
<li><a href="org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html" title="class in org.gcube.vremanagement.whnmanager.jaxws.ws">WhnManagerImpl</a></li>
</ul>
</div>
</body>
</html>

117
target/apidocs/constant-values.html

@ -0,0 +1,117 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Tue Sep 06 10:18:38 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Constant Field Values (whn-manager 2.0.0-SNAPSHOT API)</title>
<meta name="date" content="2016-09-06">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Constant Field Values (whn-manager 2.0.0-SNAPSHOT API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
<li><a href="constant-values.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Constant Field Values" class="title">Constant Field Values</h1>
<h2 title="Contents">Contents</h2>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?constant-values.html" target="_top">Frames</a></li>
<li><a href="constant-values.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016. All Rights Reserved.</small></p>
</body>
</html>

117
target/apidocs/deprecated-list.html

@ -0,0 +1,117 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Tue Sep 06 10:18:38 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Deprecated List (whn-manager 2.0.0-SNAPSHOT API)</title>
<meta name="date" content="2016-09-06">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Deprecated List (whn-manager 2.0.0-SNAPSHOT API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="overview-tree.html">Tree</a></li>
<li class="navBarCell1Rev">Deprecated</li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 title="Deprecated API" class="title">Deprecated API</h1>
<h2 title="Contents">Contents</h2>
</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="overview-tree.html">Tree</a></li>
<li class="navBarCell1Rev">Deprecated</li>
<li><a href="index-all.html">Index</a></li>
<li><a href="help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?deprecated-list.html" target="_top">Frames</a></li>
<li><a href="deprecated-list.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016. All Rights Reserved.</small></p>
</body>
</html>

222
target/apidocs/help-doc.html

@ -0,0 +1,222 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Tue Sep 06 10:18:38 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>API Help (whn-manager 2.0.0-SNAPSHOT API)</title>
<meta name="date" content="2016-09-06">
<link rel="stylesheet" type="text/css" href="stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="API Help (whn-manager 2.0.0-SNAPSHOT API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li class="navBarCell1Rev">Help</li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
<li><a href="help-doc.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="header">
<h1 class="title">How This API Document Is Organized</h1>
<div class="subTitle">This API (Application Programming Interface) document has pages corresponding to the items in the navigation bar, described as follows.</div>
</div>
<div class="contentContainer">
<ul class="blockList">
<li class="blockList">
<h2>Overview</h2>
<p>The <a href="overview-summary.html">Overview</a> page is the front page of this API document and provides a list of all packages with a summary for each. This page can also contain an overall description of the set of packages.</p>
</li>
<li class="blockList">
<h2>Package</h2>
<p>Each package has a page that contains a list of its classes and interfaces, with a summary for each. This page can contain six categories:</p>
<ul>
<li>Interfaces (italic)</li>
<li>Classes</li>
<li>Enums</li>
<li>Exceptions</li>
<li>Errors</li>
<li>Annotation Types</li>
</ul>
</li>
<li class="blockList">
<h2>Class/Interface</h2>
<p>Each class, interface, nested class and nested interface has its own separate page. Each of these pages has three sections consisting of a class/interface description, summary tables, and detailed member descriptions:</p>
<ul>
<li>Class inheritance diagram</li>
<li>Direct Subclasses</li>
<li>All Known Subinterfaces</li>
<li>All Known Implementing Classes</li>
<li>Class/interface declaration</li>
<li>Class/interface description</li>
</ul>
<ul>
<li>Nested Class Summary</li>
<li>Field Summary</li>
<li>Constructor Summary</li>
<li>Method Summary</li>
</ul>
<ul>
<li>Field Detail</li>
<li>Constructor Detail</li>
<li>Method Detail</li>
</ul>
<p>Each summary entry contains the first sentence from the detailed description for that item. The summary entries are alphabetical, while the detailed descriptions are in the order they appear in the source code. This preserves the logical groupings established by the programmer.</p>
</li>
<li class="blockList">
<h2>Annotation Type</h2>
<p>Each annotation type has its own separate page with the following sections:</p>
<ul>
<li>Annotation Type declaration</li>
<li>Annotation Type description</li>
<li>Required Element Summary</li>
<li>Optional Element Summary</li>
<li>Element Detail</li>
</ul>
</li>
<li class="blockList">
<h2>Enum</h2>
<p>Each enum has its own separate page with the following sections:</p>
<ul>
<li>Enum declaration</li>
<li>Enum description</li>
<li>Enum Constant Summary</li>
<li>Enum Constant Detail</li>
</ul>
</li>
<li class="blockList">
<h2>Use</h2>
<p>Each documented package, class and interface has its own Use page. This page describes what packages, classes, methods, constructors and fields use any part of the given class or package. Given a class or interface A, its Use page includes subclasses of A, fields declared as A, methods that return A, and methods and constructors with parameters of type A. You can access this page by first going to the package, class or interface, then clicking on the "Use" link in the navigation bar.</p>
</li>
<li class="blockList">
<h2>Tree (Class Hierarchy)</h2>
<p>There is a <a href="overview-tree.html">Class Hierarchy</a> page for all packages, plus a hierarchy for each package. Each hierarchy page contains a list of classes and a list of interfaces. The classes are organized by inheritance structure starting with <code>java.lang.Object</code>. The interfaces do not inherit from <code>java.lang.Object</code>.</p>
<ul>
<li>When viewing the Overview page, clicking on "Tree" displays the hierarchy for all packages.</li>
<li>When viewing a particular package, class or interface page, clicking "Tree" displays the hierarchy for only that package.</li>
</ul>
</li>
<li class="blockList">
<h2>Deprecated API</h2>
<p>The <a href="deprecated-list.html">Deprecated API</a> page lists all of the API that have been deprecated. A deprecated API is not recommended for use, generally due to improvements, and a replacement API is usually given. Deprecated APIs may be removed in future implementations.</p>
</li>
<li class="blockList">
<h2>Index</h2>
<p>The <a href="index-all.html">Index</a> contains an alphabetic list of all classes, interfaces, constructors, methods, and fields.</p>
</li>
<li class="blockList">
<h2>Prev/Next</h2>
<p>These links take you to the next or previous class, interface, package, or related page.</p>
</li>
<li class="blockList">
<h2>Frames/No Frames</h2>
<p>These links show and hide the HTML frames. All pages are available with or without frames.</p>
</li>
<li class="blockList">
<h2>All Classes</h2>
<p>The <a href="allclasses-noframe.html">All Classes</a> link shows all classes and interfaces except non-static nested types.</p>
</li>
<li class="blockList">
<h2>Serialized Form</h2>
<p>Each serializable or externalizable class has a description of its serialization fields and methods. This information is of interest to re-implementors, not to developers using the API. While there is no link in the navigation bar, you can get to this information by going to any serialized class and clicking "Serialized Form" in the "See also" section of the class description.</p>
</li>
<li class="blockList">
<h2>Constant Field Values</h2>
<p>The <a href="constant-values.html">Constant Field Values</a> page lists the static final fields and their values.</p>
</li>
</ul>
<em>This help file applies to API documentation generated using the standard doclet.</em></div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="overview-tree.html">Tree</a></li>
<li><a href="deprecated-list.html">Deprecated</a></li>
<li><a href="index-all.html">Index</a></li>
<li class="navBarCell1Rev">Help</li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="index.html?help-doc.html" target="_top">Frames</a></li>
<li><a href="help-doc.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016. All Rights Reserved.</small></p>
</body>
</html>

174
target/apidocs/index-all.html

@ -0,0 +1,174 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc (version 1.7.0_80) on Tue Sep 06 10:18:38 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Index (whn-manager 2.0.0-SNAPSHOT API)</title>
<meta name="date" content="2016-09-06">
<link rel="stylesheet" type="text/css" href="./stylesheet.css" title="Style">
</head>
<body>
<script type="text/javascript"><!--
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="Index (whn-manager 2.0.0-SNAPSHOT API)";
}
//-->
</script>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<!-- ========= START OF TOP NAVBAR ======= -->
<div class="topNav"><a name="navbar_top">
<!-- -->
</a><a href="#skip-navbar_top" title="Skip navigation links"></a><a name="navbar_top_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="./overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="./overview-tree.html">Tree</a></li>
<li><a href="./deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="./help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="./index.html?index-all.html" target="_top">Frames</a></li>
<li><a href="index-all.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_top">
<li><a href="./allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_top");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_top">
<!-- -->
</a></div>
<!-- ========= END OF TOP NAVBAR ========= -->
<div class="contentContainer"><a href="#_A_">A</a>&nbsp;<a href="#_I_">I</a>&nbsp;<a href="#_O_">O</a>&nbsp;<a href="#_R_">R</a>&nbsp;<a href="#_V_">V</a>&nbsp;<a href="#_W_">W</a>&nbsp;<a name="_A_">
<!-- -->
</a>
<h2 class="title">A</h2>
<dl>
<dt><span class="strong"><a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html#addToContext(java.lang.String)">addToContext(String)</a></span> - Method in class org.gcube.vremanagement.whnmanager.jaxws.ws.<a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html" title="class in org.gcube.vremanagement.whnmanager.jaxws.ws">WhnManagerImpl</a></dt>
<dd>
<div class="block">Add a scope to the ghn profile and publish it on IS</div>
</dd>
</dl>
<a name="_I_">
<!-- -->
</a>
<h2 class="title">I</h2>
<dl>
<dt><span class="strong"><a href="./org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html#isNotPresent(R,%20java.lang.String)">isNotPresent(R, String)</a></span> - Static method in class org.gcube.vremanagement.whnmanager.utils.<a href="./org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html" title="class in org.gcube.vremanagement.whnmanager.utils">ValidationUtils</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="_O_">
<!-- -->
</a>
<h2 class="title">O</h2>
<dl>
<dt><a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/package-summary.html">org.gcube.vremanagement.whnmanager.jaxws.ws</a> - package org.gcube.vremanagement.whnmanager.jaxws.ws</dt>
<dd>&nbsp;</dd>
<dt><a href="./org/gcube/vremanagement/whnmanager/utils/package-summary.html">org.gcube.vremanagement.whnmanager.utils</a> - package org.gcube.vremanagement.whnmanager.utils</dt>
<dd>&nbsp;</dd>
</dl>
<a name="_R_">
<!-- -->
</a>
<h2 class="title">R</h2>
<dl>
<dt><span class="strong"><a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html#removeFromContext(java.lang.String)">removeFromContext(String)</a></span> - Method in class org.gcube.vremanagement.whnmanager.jaxws.ws.<a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html" title="class in org.gcube.vremanagement.whnmanager.jaxws.ws">WhnManagerImpl</a></dt>
<dd>
<div class="block">Remove a scope from ghn profile and publish the new profile on IS</div>
</dd>
</dl>
<a name="_V_">
<!-- -->
</a>
<h2 class="title">V</h2>
<dl>
<dt><span class="strong"><a href="./org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html#valid(java.lang.String,%20java.lang.Object)">valid(String, Object)</a></span> - Static method in class org.gcube.vremanagement.whnmanager.utils.<a href="./org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html" title="class in org.gcube.vremanagement.whnmanager.utils">ValidationUtils</a></dt>
<dd>&nbsp;</dd>
<dt><a href="./org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html" title="class in org.gcube.vremanagement.whnmanager.utils"><span class="strong">ValidationUtils</span></a> - Class in <a href="./org/gcube/vremanagement/whnmanager/utils/package-summary.html">org.gcube.vremanagement.whnmanager.utils</a></dt>
<dd>&nbsp;</dd>
<dt><span class="strong"><a href="./org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html#ValidationUtils()">ValidationUtils()</a></span> - Constructor for class org.gcube.vremanagement.whnmanager.utils.<a href="./org/gcube/vremanagement/whnmanager/utils/ValidationUtils.html" title="class in org.gcube.vremanagement.whnmanager.utils">ValidationUtils</a></dt>
<dd>&nbsp;</dd>
</dl>
<a name="_W_">
<!-- -->
</a>
<h2 class="title">W</h2>
<dl>
<dt><a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html" title="class in org.gcube.vremanagement.whnmanager.jaxws.ws"><span class="strong">WhnManagerImpl</span></a> - Class in <a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/package-summary.html">org.gcube.vremanagement.whnmanager.jaxws.ws</a></dt>
<dd>&nbsp;</dd>
<dt><span class="strong"><a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html#WhnManagerImpl()">WhnManagerImpl()</a></span> - Constructor for class org.gcube.vremanagement.whnmanager.jaxws.ws.<a href="./org/gcube/vremanagement/whnmanager/jaxws/ws/WhnManagerImpl.html" title="class in org.gcube.vremanagement.whnmanager.jaxws.ws">WhnManagerImpl</a></dt>
<dd>&nbsp;</dd>
</dl>
<a href="#_A_">A</a>&nbsp;<a href="#_I_">I</a>&nbsp;<a href="#_O_">O</a>&nbsp;<a href="#_R_">R</a>&nbsp;<a href="#_V_">V</a>&nbsp;<a href="#_W_">W</a>&nbsp;</div>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<div class="bottomNav"><a name="navbar_bottom">
<!-- -->
</a><a href="#skip-navbar_bottom" title="Skip navigation links"></a><a name="navbar_bottom_firstrow">
<!-- -->
</a>
<ul class="navList" title="Navigation">
<li><a href="./overview-summary.html">Overview</a></li>
<li>Package</li>
<li>Class</li>
<li>Use</li>
<li><a href="./overview-tree.html">Tree</a></li>
<li><a href="./deprecated-list.html">Deprecated</a></li>
<li class="navBarCell1Rev">Index</li>
<li><a href="./help-doc.html">Help</a></li>
</ul>
</div>
<div class="subNav">
<ul class="navList">
<li>Prev</li>
<li>Next</li>
</ul>
<ul class="navList">
<li><a href="./index.html?index-all.html" target="_top">Frames</a></li>
<li><a href="index-all.html" target="_top">No Frames</a></li>
</ul>
<ul class="navList" id="allclasses_navbar_bottom">
<li><a href="./allclasses-noframe.html">All Classes</a></li>
</ul>
<div>
<script type="text/javascript"><!--
allClassesLink = document.getElementById("allclasses_navbar_bottom");
if(window==top) {
allClassesLink.style.display = "block";
}
else {
allClassesLink.style.display = "none";
}
//-->
</script>
</div>
<a name="skip-navbar_bottom">
<!-- -->
</a></div>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<p class="legalCopy"><small>Copyright &#169; 2016. All Rights Reserved.</small></p>
</body>
</html>

75
target/apidocs/index.html

@ -0,0 +1,75 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<!-- NewPage -->
<html lang="en">
<head>
<!-- Generated by javadoc on Tue Sep 06 10:18:38 CEST 2016 -->
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>whn-manager 2.0.0-SNAPSHOT API</title>
<script type="text/javascript">
targetPage = "" + window.location.search;
if (targetPage != "" && targetPage != "undefined")
targetPage = targetPage.substring(1);
if (targetPage.indexOf(":") != -1 || (targetPage != "" && !validURL(targetPage)))
targetPage = "undefined";
function validURL(url) {
try {
url = decodeURIComponent(url);
}
catch (error) {
return false;
}
var pos = url.indexOf(".html");
if (pos == -1 || pos != url.length - 5)
return false;
var allowNumber = false;
var allowSep = false;
var seenDot = false;
for (var i = 0; i < url.length - 5; i++) {
var ch = url.charAt(i);
if ('a' <= ch && ch <= 'z' ||
'A' <= ch && ch <= 'Z' ||
ch == '$' ||
ch == '_' ||
ch.charCodeAt(0) > 127) {
allowNumber = true;
allowSep = true;
} else if ('0' <= ch && ch <= '9'
|| ch == '-') {
if (!allowNumber)
return false;
} else if (ch == '/' || ch == '.') {
if (!allowSep)
return false;
allowNumber = false;
allowSep = false;
if (ch == '.')
seenDot = true;
if (ch == '/' && seenDot)
return false;
} else {
return false;
}
}
return true;
}
function loadFrames() {
if (targetPage != "" && targetPage != "undefined")
top.classFrame.location = top.targetPage;
}
</script>
</head>
<frameset cols="20%,80%" title="Documentation frame" onload="top.loadFrames()">
<frameset rows="30%,70%" title="Left frames" onload="top.loadFrames()">
<frame src="overview-frame.html" name="packageListFrame" title="All Packages">
<frame src="allclasses-frame.html" name="packageFrame" title="All classes and interfaces (except non-static nested types)">
</frameset>
<frame src="overview-summary.html" name="classFrame" title="Package, class and interface descriptions" scrolling="yes">
<noframes>
<noscript>
<div>JavaScript is disabled on your browser.</div>
</noscript>
<h2>Frame Alert</h2