git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@602 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
bda88af001
commit
639cc77d80
|
@ -2,7 +2,7 @@
|
|||
<classpath>
|
||||
<classpathentry excluding="src/|build/|schema/|etc/|src/|lib/" kind="src" path=""/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
|
||||
<classpathentry exported="true" kind="con" path="org.eclipse.jdt.USER_LIBRARY/GCORELIBS"/>
|
||||
<classpathentry kind="lib" path="/Dependencies/ISREGISTRY/org.gcube.informationsystem.registry.stubs.jar"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
</resourceParams>
|
||||
</resource>
|
||||
|
||||
<resource name="home" type="org.gcube.informationsystem.registry.impl.core.ProfileResourceHome">
|
||||
<resource name="home" type="org.gcube.informationsystem.registry.impl.state.ProfileResourceHome">
|
||||
|
||||
<resourceParams>
|
||||
|
||||
|
@ -65,11 +65,11 @@
|
|||
</parameter>
|
||||
<parameter>
|
||||
<name>resourceClass</name>
|
||||
<value>org.gcube.informationsystem.registry.impl.core.ProfileResource</value>
|
||||
<value>org.gcube.informationsystem.registry.impl.state.ProfileResource</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>persistenceDelegateClass</name>
|
||||
<value>org.gcube.informationsystem.registry.impl.core.RegistryPersistenceDelegate</value>
|
||||
<value>org.gcube.informationsystem.registry.impl.persistence.RegistryPersistenceDelegate</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>sweeperDelay</name>
|
||||
|
@ -118,21 +118,19 @@
|
|||
</resourceParams>
|
||||
</resource>
|
||||
|
||||
<resource name="home" type="org.gcube.informationsystem.registry.impl.core.RegistryFactoryResourceHome">
|
||||
|
||||
<resource name="home" type="org.gcube.informationsystem.registry.impl.state.RegistryFactoryResourceHome">
|
||||
<resourceParams>
|
||||
|
||||
<parameter>
|
||||
<name>factory</name>
|
||||
<value>org.globus.wsrf.jndi.BeanFactory</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>resourceClass</name>
|
||||
<value>org.gcube.informationsystem.registry.impl.core.RegistryFactoryResource</value>
|
||||
<value>org.gcube.informationsystem.registry.impl.state.RegistryFactoryResource</value>
|
||||
</parameter>
|
||||
<parameter>
|
||||
<name>persistenceDelegateClass</name>
|
||||
<value>org.gcube.informationsystem.registry.impl.core.RegistryFactoryPersistenceDelegate</value>
|
||||
<value>org.gcube.informationsystem.registry.impl.persistence.RegistryFactoryPersistenceDelegate</value>
|
||||
</parameter>
|
||||
|
||||
</resourceParams>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
xmlns:aggr="http://mds.globus.org/aggregator/types">
|
||||
|
||||
<service name="gcube/informationsystem/registry/Registry" provider="Handler" use="literal" style="document">
|
||||
<parameter name="className" value="org.gcube.informationsystem.registry.impl.core.Registry"/>
|
||||
<parameter name="className" value="org.gcube.informationsystem.registry.impl.Registry"/>
|
||||
<wsdlFile>share/schema/org.gcube.informationsystem.registry/Registry_service.wsdl</wsdlFile>
|
||||
<typeMapping
|
||||
deserializer="org.apache.axis.encoding.ser.ElementDeserializerFactory"
|
||||
|
@ -31,7 +31,7 @@
|
|||
|
||||
<!-- Factory service -->
|
||||
<service name="gcube/informationsystem/registry/RegistryFactory" provider="Handler" use="literal" style="document">
|
||||
<parameter name="className" value="org.gcube.informationsystem.registry.impl.core.RegistryFactory"/>
|
||||
<parameter name="className" value="org.gcube.informationsystem.registry.impl.RegistryFactory"/>
|
||||
<wsdlFile>share/schema/org.gcube.informationsystem.registry/RegistryFactory_service.wsdl</wsdlFile>
|
||||
<typeMapping
|
||||
deserializer="org.apache.axis.encoding.ser.ElementDeserializerFactory"
|
||||
|
|
|
@ -8,13 +8,25 @@
|
|||
<Version>1.0</Version>
|
||||
<Packages>
|
||||
<Main>
|
||||
<Name>IS-Registry-Service</Name>
|
||||
<Name>IS-Registry-service</Name>
|
||||
<Version>1.0</Version>
|
||||
<Mandatory level="VO"/>
|
||||
<Shareable level="VO"/>
|
||||
<GHNRequirements>
|
||||
<Requirement category="Site" requirement="string" value="java1.5" operator="le"/>
|
||||
</GHNRequirements>
|
||||
<Requirement category="Site" requirement="string" value="java1.5" operator="ge"/>
|
||||
</GHNRequirements>
|
||||
<Dependencies>
|
||||
<Dependency>
|
||||
<Service>
|
||||
<Class>InformationSystem</Class>
|
||||
<Name>IS-Registry</Name>
|
||||
</Service>
|
||||
<Package>IS-Registry-stubs</Package>
|
||||
<Version>1.0</Version>
|
||||
<Scope level="GHN"/>
|
||||
<Optional>false</Optional>
|
||||
</Dependency>
|
||||
</Dependencies>
|
||||
<GARArchive>org.gcube.informationsystem.registry.gar</GARArchive>
|
||||
<PortType>
|
||||
<Name>gcube/informationsystem/registry/registryFactory</Name>
|
||||
|
@ -34,7 +46,7 @@
|
|||
<Mandatory level="GHN"/>
|
||||
<Shareable level="VO"/>
|
||||
<GHNRequirements>
|
||||
<Requirement category="Site" operator="le" requirement="string" value="java1.5"/>
|
||||
<Requirement category="Site" operator="ge" requirement="string" value="java1.5"/>
|
||||
</GHNRequirements>
|
||||
<SpecificData>text</SpecificData>
|
||||
<Type>library</Type>
|
||||
|
|
|
@ -70,10 +70,10 @@
|
|||
</types>
|
||||
|
||||
|
||||
<message name="GetProfileStringInputMessage">
|
||||
<message name="GetProfileAsStringInputMessage">
|
||||
<part name="parameters" element="tns:getProfileString"/>
|
||||
</message>
|
||||
<message name="GetProfileStringOutputMessage">
|
||||
<message name="GetProfileAsStringOutputMessage">
|
||||
<part name="parameters" element="tns:getProfileStringResponse"/>
|
||||
</message>
|
||||
|
||||
|
@ -91,9 +91,9 @@
|
|||
provider:GCUBEProvider"
|
||||
wsrp:ResourceProperties="tns:ProfileResourceProperties">
|
||||
|
||||
<operation name="getProfileString">
|
||||
<input message="tns:GetProfileStringInputMessage"/>
|
||||
<output message="tns:GetProfileStringOutputMessage"/>
|
||||
<operation name="getProfileAsString">
|
||||
<input message="tns:GetProfileAsStringInputMessage"/>
|
||||
<output message="tns:GetProfileAsStringOutputMessage"/>
|
||||
</operation>
|
||||
</portType>
|
||||
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
package org.gcube.informationsystem.registry.impl;
|
||||
|
||||
import org.apache.axis.utils.XMLUtils;
|
||||
import org.gcube.common.core.faults.GCUBEFault;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.ProfileContext;
|
||||
import org.gcube.informationsystem.registry.impl.state.ProfileResource;
|
||||
import org.gcube.informationsystem.registry.stubs.GetProfileString;
|
||||
import org.globus.wsrf.ResourceException;
|
||||
|
||||
|
||||
/**
|
||||
* Implementation of the <em>Registry</em> portType
|
||||
*
|
||||
* @author Manuele Simi (CNR)
|
||||
*
|
||||
*/
|
||||
public class Registry {
|
||||
|
||||
/**
|
||||
* Gets a string representation of the profile
|
||||
* @param voidType
|
||||
* @return a string representation of the profile
|
||||
* @throws GCUBEFault
|
||||
*/
|
||||
public String getProfileAsString(GetProfileString voidType) throws GCUBEFault{
|
||||
|
||||
try {
|
||||
return XMLUtils.DocumentToString(((ProfileResource)ProfileContext.getContext().getWSHome().find()).getProfile());
|
||||
} catch (ResourceException e) {
|
||||
e.printStackTrace();
|
||||
throw new GCUBEFault();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
|
@ -30,6 +30,10 @@ import org.gcube.common.core.resources.GCUBEVRE;
|
|||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.state.GCUBEWSResourceKey;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.ProfileContext;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.ServiceContext;
|
||||
import org.gcube.informationsystem.registry.impl.state.ProfileResource;
|
||||
import org.gcube.informationsystem.registry.impl.state.RegistryFactoryResource;
|
||||
import org.gcube.informationsystem.registry.impl.util.ProfileManager;
|
||||
import org.gcube.informationsystem.registry.impl.util.RegistryUtil;
|
||||
import org.gcube.informationsystem.registry.stubs.CreateResourceMessage;
|
||||
|
@ -52,9 +56,9 @@ import org.oasis.wsrf.lifetime.Destroy;
|
|||
|
||||
|
||||
/**
|
||||
* Registry Factory implementation
|
||||
* Implementation of the <em>Registry Factory</em> portType
|
||||
*
|
||||
* @author Andrea Manzi, Manuele SImi (ISTI-CNR)
|
||||
* @author Andrea Manzi, Manuele Simi (ISTI-CNR)
|
||||
*
|
||||
*/
|
||||
public class RegistryFactory extends GCUBEStartupPortType{
|
||||
|
@ -94,7 +98,7 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
|||
*
|
||||
*
|
||||
*/
|
||||
public enum OperationType {create,update,destroy};
|
||||
enum OperationType {create,update,destroy};
|
||||
|
||||
/**
|
||||
* Map of registration to Notification
|
||||
|
@ -102,7 +106,7 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
|||
public static List<GCUBEWSResourceKey> notificationMap = Collections.synchronizedList(new ArrayList<GCUBEWSResourceKey>());
|
||||
|
||||
/** the key used to label the Factory Resource */
|
||||
protected static final String NOTIFICATOR_RESOURCE_KEY = "RegistryResource";
|
||||
public static final String NOTIFICATOR_RESOURCE_KEY = "RegistryResource";
|
||||
|
||||
@Override
|
||||
protected GCUBEServiceContext getServiceContext() {
|
||||
|
@ -134,10 +138,10 @@ public class RegistryFactory extends GCUBEStartupPortType{
|
|||
|
||||
/**
|
||||
*
|
||||
* Creates a GCUBEResource
|
||||
* Creates a new GCUBEResource's profile manager
|
||||
*
|
||||
* @param inputMessage
|
||||
* @return
|
||||
* @return the profile as string
|
||||
* @throws SchemaValidationFault
|
||||
* @throws RemoteException
|
||||
* @throws ProfileAlreadyRegisteredFault
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.contexts;
|
||||
|
||||
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
||||
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.contexts;
|
||||
|
||||
import org.gcube.common.core.contexts.GCUBEServiceContext;
|
||||
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.contexts;
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
|
@ -18,7 +18,9 @@ import org.gcube.common.core.resources.GCUBERunningInstance;
|
|||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.utils.handlers.GCUBEHandler;
|
||||
import org.gcube.common.core.utils.handlers.GCUBEScheduledHandler;
|
||||
import org.gcube.informationsystem.registry.impl.RegistryFactory;
|
||||
import org.gcube.informationsystem.registry.impl.core.RegistryConfiguration.ROOT_SERVICES;
|
||||
import org.gcube.informationsystem.registry.impl.state.RegistryFactoryResource;
|
||||
import org.globus.mds.servicegroup.client.ServiceGroupRegistrationParameters;
|
||||
import org.globus.wsrf.encoding.ObjectDeserializer;
|
||||
import org.globus.wsrf.utils.XmlUtils;
|
|
@ -1,21 +0,0 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
|
||||
import org.apache.axis.utils.XMLUtils;
|
||||
import org.gcube.common.core.faults.GCUBEFault;
|
||||
import org.gcube.informationsystem.registry.impl.core.ProfileResource;
|
||||
import org.gcube.informationsystem.registry.stubs.GetProfileString;
|
||||
import org.globus.wsrf.ResourceException;
|
||||
|
||||
|
||||
public class Registry {
|
||||
|
||||
public String getProfileString(GetProfileString voidType) throws GCUBEFault{
|
||||
|
||||
try {
|
||||
return XMLUtils.DocumentToString(((ProfileResource)ProfileContext.getContext().getWSHome().find()).getProfile());
|
||||
} catch (ResourceException e) {
|
||||
e.printStackTrace();
|
||||
throw new GCUBEFault();
|
||||
}
|
||||
}
|
||||
}
|
|
@ -13,12 +13,12 @@ public class RegistryConfiguration {
|
|||
|
||||
/** The root service to take care at service's startup */
|
||||
public static enum ROOT_SERVICES {
|
||||
ISIC() {String getClazz() {return "InformationSystem";} String getName() {return "IS-IC";}},
|
||||
ISNOTIFIER() {String getClazz() {return "InformationSystem";} String getName() {return "IS-Notifier";}},
|
||||
GHNMANAGER() {String getClazz() {return "VREManagement";} String getName() {return "GHNManager";}};
|
||||
ISIC() {public String getClazz() {return "InformationSystem";} public String getName() {return "IS-IC";}},
|
||||
ISNOTIFIER() {public String getClazz() {return "InformationSystem";} public String getName() {return "IS-Notifier";}},
|
||||
GHNMANAGER() {public String getClazz() {return "VREManagement";} public String getName() {return "GHNManager";}};
|
||||
|
||||
abstract String getName();
|
||||
abstract String getClazz();
|
||||
abstract public String getName();
|
||||
abstract public String getClazz();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.persistence;
|
||||
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
|
||||
import org.gcube.common.core.persistence.GCUBEWSFilePersistenceDelegate;
|
||||
import org.gcube.informationsystem.registry.impl.state.RegistryFactoryResource;
|
||||
import org.gcube.informationsystem.registry.stubs.RegistryProperty;
|
||||
import org.globus.wsrf.utils.SubscriptionPersistenceUtils;
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.persistence;
|
||||
|
||||
import java.io.ObjectInputStream;
|
||||
import java.io.ObjectOutputStream;
|
||||
import org.gcube.common.core.persistence.GCUBEWSFilePersistenceDelegate;
|
||||
import org.gcube.informationsystem.registry.impl.state.ProfileResource;
|
||||
import org.w3c.dom.Document;
|
||||
|
||||
public class RegistryPersistenceDelegate extends GCUBEWSFilePersistenceDelegate<ProfileResource> {
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.state;
|
||||
|
||||
import java.io.StringReader;
|
||||
import java.io.StringWriter;
|
||||
|
@ -18,6 +18,8 @@ import org.gcube.common.core.resources.GCUBERunningInstance;
|
|||
import org.gcube.common.core.resources.GCUBEService;
|
||||
import org.gcube.common.core.state.GCUBEWSResource;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.gcube.informationsystem.registry.impl.RegistryFactory;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.ServiceContext;
|
||||
import org.globus.wsrf.ResourceException;
|
||||
import org.w3c.dom.Document;
|
||||
import org.xml.sax.InputSource;
|
||||
|
@ -189,7 +191,7 @@ public class ProfileResource extends GCUBEWSResource {
|
|||
|
||||
}
|
||||
|
||||
protected void removeProfile() throws ResourceException {
|
||||
public void removeProfile() throws ResourceException {
|
||||
this.getPersistenceDelegate().remove(this);
|
||||
}
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.state;
|
||||
|
||||
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
||||
|
||||
import org.gcube.common.core.state.GCUBEWSHome;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.ProfileContext;
|
||||
|
||||
public class ProfileResourceHome extends GCUBEWSHome {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.state;
|
||||
|
||||
|
||||
import java.util.ArrayList;
|
|
@ -1,7 +1,8 @@
|
|||
package org.gcube.informationsystem.registry.impl.core;
|
||||
package org.gcube.informationsystem.registry.impl.state;
|
||||
|
||||
import org.gcube.common.core.contexts.GCUBEStatefulPortTypeContext;
|
||||
import org.gcube.common.core.state.GCUBEWSHome;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.FactoryContext;
|
||||
|
||||
public class RegistryFactoryResourceHome extends GCUBEWSHome {
|
||||
|
|
@ -11,7 +11,7 @@ import org.gcube.common.core.scope.GCUBEScopeNotSupportedException;
|
|||
import org.gcube.common.core.scope.ServiceMap;
|
||||
import org.gcube.common.core.scope.ServiceMap.ServiceType;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.gcube.informationsystem.registry.impl.core.ServiceContext;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.ServiceContext;
|
||||
import org.ietf.jgss.GSSCredential;
|
||||
|
||||
public class ProfileManager {
|
||||
|
|
|
@ -7,8 +7,8 @@ import javax.xml.namespace.QName;
|
|||
import org.gcube.common.core.informationsystem.publisher.ISPublisher;
|
||||
import org.gcube.common.core.contexts.GHNContext;
|
||||
import org.gcube.common.core.utils.logging.GCUBELog;
|
||||
import org.gcube.informationsystem.registry.impl.core.FactoryContext;
|
||||
import org.gcube.informationsystem.registry.impl.core.ServiceContext;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.FactoryContext;
|
||||
import org.gcube.informationsystem.registry.impl.contexts.ServiceContext;
|
||||
|
||||
/**
|
||||
* Registration Thread class
|
||||
|
|
|
@ -13,7 +13,7 @@ import org.gcube.common.core.informationsystem.client.queries.GCUBERIsOnGHNQuery
|
|||
import org.gcube.common.core.informationsystem.client.queries.GCUBEResourceFromIDQuery;
|
||||
import org.gcube.common.core.resources.GCUBEResource;
|
||||
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||
import org.gcube.informationsystem.registry.impl.core.RegistryFactory;
|
||||
import org.gcube.informationsystem.registry.impl.RegistryFactory;
|
||||
import org.gcube.informationsystem.registry.stubs.RemoveResourceMessage;
|
||||
|
||||
|
||||
|
|
|
@ -6,6 +6,7 @@ import org.apache.axis.message.addressing.Address;
|
|||
import org.apache.axis.message.addressing.EndpointReferenceType;
|
||||
import org.gcube.common.core.contexts.GCUBERemotePortTypeContext;
|
||||
import org.gcube.common.core.resources.GCUBEHostingNode;
|
||||
import org.gcube.common.core.resources.GCUBERunningInstance;
|
||||
import org.gcube.common.core.resources.GCUBEService;
|
||||
import org.gcube.common.core.scope.GCUBEScope;
|
||||
import org.gcube.common.core.security.GCUBESecurityManagerImpl;
|
||||
|
|
Loading…
Reference in New Issue