GetProfileLastModificationTimeMs and GetResourceLastModificationTimeMs operations

git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Collector@17057 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Manuele Simi 2009-11-20 22:53:10 +00:00
parent 5dc54a18ae
commit 53fc427971
6 changed files with 108 additions and 11 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>InformationCollector_branched</name>
<name>InformationCollector</name>
<comment></comment>
<projects>
</projects>

View File

@ -1,4 +1,9 @@
v. 2.1.0 (30-10-2009)
* GetProfileLastModificationTimeMs and GetResourceLastModificationTimeMs operations
v. 2.1.0 (15-10-2009)
* GetProfile and GetResource operations
v. 2.0.0 (30-08-2009)
* test-suite
* Data e Query specialized managers

View File

@ -20,7 +20,7 @@
sink by collecting and exposing the information published by the
registered gCube services</Description>
<Name>IS-Collector-service</Name>
<Version>2.1.0</Version>
<Version>2.2.0</Version>
<Dependencies>
<Dependency>
<Service>
@ -29,7 +29,7 @@
<Version>1.0.0</Version>
</Service>
<Package>IS-Collector-stubs</Package>
<Version>[2.1.0]</Version>
<Version>[2.2.0]</Version>
<Scope level="GHN" />
<Optional>false</Optional>
</Dependency>
@ -76,7 +76,7 @@
<Software deployable="true">
<Description>InformationCollector Stubs</Description>
<Name>IS-Collector-stubs</Name>
<Version>2.1.0</Version>
<Version>2.2.0</Version>
<MultiVersion value="true" />
<Mandatory level="VO" />
<Shareable level="VO" />
@ -88,7 +88,7 @@
<Software>
<Description>Test-suite for IS-Collector: provide sample usages of interaction with a IS-Collector instance</Description>
<Name>IS-Collector-test-suite</Name>
<Version>2.1.0</Version>
<Version>2.2.0</Version>
<MultiVersion value="true"/>
<Shareable level="VO"/>
<Type>application</Type>

View File

@ -49,6 +49,10 @@
<xsd:element name="getResourceResponse" type="xsd:string"/>
<xsd:element name="getResourceLastModificationTimeMsResponse" type="xsd:long"/>
<xsd:element name="getProfileLastModificationTimeMsResponse" type="xsd:long"/>
<xsd:element name="deleteProfileParams">
<xsd:complexType >
<xsd:sequence>
@ -58,6 +62,23 @@
</xsd:complexType>
</xsd:element>
<xsd:element name="GetProfileLastModificationTimeMsCriteria">
<xsd:complexType >
<xsd:sequence>
<xsd:element name="ID" type="xsd:string"/>
<xsd:element name="profileType" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GetResourceLastModificationTimeMsCriteria">
<xsd:complexType >
<xsd:sequence>
<xsd:element name="ID" type="xsd:string"/>
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="GetProfileCriteria">
<xsd:complexType >
<xsd:sequence>
@ -115,6 +136,14 @@
<part name="parameters" element="tns:getResourceResponse"/>
</wsdl:message>
<wsdl:message name="GetResourceLastModificationTimeMsInputMessage">
<part name="parameters" element="tns:GetResourceLastModificationTimeMsCriteria"/>
</wsdl:message>
<wsdl:message name="GetResourceLastModificationTimeMsOutputMessage">
<part name="parameters" element="tns:getResourceLastModificationTimeMsResponse"/>
</wsdl:message>
<wsdl:message name="DeleteProfileInputMessage">
<part name="parameters" element="tns:deleteProfileParams"/>
</wsdl:message>
@ -131,6 +160,13 @@
<part name="parameters" element="tns:getProfileResponse"/>
</wsdl:message>
<wsdl:message name="GetProfileLastModificationTimeMsInputMessage">
<part name="parameters" element="tns:GetProfileLastModificationTimeMsCriteria"/>
</wsdl:message>
<wsdl:message name="GetProfileLastModificationTimeMsOutputMessage">
<part name="parameters" element="tns:getProfileLastModificationTimeMsResponse"/>
</wsdl:message>
<wsdl:message name="VoidMessage">
<part name="parameters" element="tns:voidElement"/>
</wsdl:message>
@ -157,6 +193,16 @@
<wsdl:output message="tns:GetResourceOutputMessage"/>
<wsdl:fault name="fault" message="tns:DocumentNotFoundFaultTypeMessage"/>
</wsdl:operation>
<wsdl:operation name="GetProfileLastModificationTimeMs">
<wsdl:input message="tns:GetProfileLastModificationTimeMsInputMessage"/>
<wsdl:output message="tns:GetProfileLastModificationTimeMsOutputMessage"/>
<wsdl:fault name="fault" message="tns:DocumentNotFoundFaultTypeMessage"/>
</wsdl:operation>
<wsdl:operation name="GetResourceLastModificationTimeMs">
<wsdl:input message="tns:GetResourceLastModificationTimeMsInputMessage"/>
<wsdl:output message="tns:GetResourceLastModificationTimeMsOutputMessage"/>
<wsdl:fault name="fault" message="tns:DocumentNotFoundFaultTypeMessage"/>
</wsdl:operation>
<wsdl:operation name="DeleteResource">
<wsdl:input message="tns:DeleteResourceInputMessage"/>
<wsdl:output message="tns:DeleteResourceOutputMessage"/>

View File

@ -15,7 +15,9 @@ import org.gcube.informationsystem.collector.impl.xmlstorage.exist.Sweeper;
import org.gcube.informationsystem.collector.stubs.DeleteProfileParams;
import org.gcube.informationsystem.collector.stubs.DocumentNotFoundFaultType;
import org.gcube.informationsystem.collector.stubs.GetProfileCriteria;
import org.gcube.informationsystem.collector.stubs.GetProfileLastModificationTimeMsCriteria;
import org.gcube.informationsystem.collector.stubs.GetResourceCriteria;
import org.gcube.informationsystem.collector.stubs.GetResourceLastModificationTimeMsCriteria;
import org.globus.wsrf.utils.FaultHelper;
@ -131,8 +133,7 @@ public class XMLCollectionAccess extends GCUBEPortType {
/**
* Deletes the entire set of registered RPs from the storage
*
* @throws BaseFaultType
* if an error occurs when deleting the resources
* @throws BaseFaultType if an error occurs when deleting the resources
*/
public void deleteAllRPs() throws BaseFaultType {
try {
@ -149,10 +150,15 @@ public class XMLCollectionAccess extends GCUBEPortType {
}
}
/**
* Retrieves the given Resource
* @param criteria the Resource ID
* @return the XML serialization of the Resource
* @throws DocumentNotFoundFaultType if the Resource does not exist
*/
public String getResource(GetResourceCriteria criteria) throws DocumentNotFoundFaultType {
try {
AggregatorPersistentResource aresource = State.getDataManager().retrievePropertyResourceFromID(criteria.getID());
logger.debug("Returning resource:" + aresource.getData());
AggregatorPersistentResource aresource = State.getDataManager().retrievePropertyResourceFromID(criteria.getID());
return aresource.getData();
} catch (Exception e) {
logger.warn("Unable to find Resource with ID=" + criteria.getID(), e);
@ -161,10 +167,15 @@ public class XMLCollectionAccess extends GCUBEPortType {
}
/**
* Retrieves the given Profile
* @param criteria the Profile ID and Type
* @return the XML serialization of the Profile
* @throws DocumentNotFoundFaultType if the Profile does not exist
*/
public String getProfile(GetProfileCriteria criteria) throws DocumentNotFoundFaultType {
try {
AggregatorPersistentResource aresource = State.getDataManager().retrieveProfile(criteria.getID(), criteria.getProfileType());
logger.debug("Returning profile:" + aresource.getData());
AggregatorPersistentResource aresource = State.getDataManager().retrieveProfile(criteria.getID(), criteria.getProfileType());
return aresource.getData();
} catch (Exception e) {
logger.warn("Unable to find Profile with ID=" + criteria.getID(), e);
@ -172,6 +183,39 @@ public class XMLCollectionAccess extends GCUBEPortType {
}
}
/**
* Gets the last modification time in milliseconds of the given Profile
* @param criteria the Profile ID and Type
* @return the last update time in milliseconds
* @throws DocumentNotFoundFaultType if the Profile does not exist
*/
public long getProfileLastModificationTimeMs(GetProfileLastModificationTimeMsCriteria criteria) throws DocumentNotFoundFaultType {
try {
AggregatorPersistentResource aresource = State.getDataManager().retrieveProfile(criteria.getID(), criteria.getProfileType());
return aresource.getLastUpdateTimeinMills();
} catch (Exception e) {
logger.warn("Unable to find Profile with ID=" + criteria.getID(), e);
throw new DocumentNotFoundFaultType();
}
}
/**
* Gets the last modification time in milliseconds of the given Resource
* @param criteria the Resource ID
* @return the last update time in milliseconds
* @throws DocumentNotFoundFaultType if the Resource does not exist
*/
public long getResourceLastModificationTimeMs(GetResourceLastModificationTimeMsCriteria criteria) throws DocumentNotFoundFaultType {
try {
AggregatorPersistentResource aresource = State.getDataManager().retrievePropertyResourceFromID(criteria.getID());
return aresource.getLastUpdateTimeinMills();
} catch (Exception e) {
logger.warn("Unable to find Resource with ID=" + criteria.getID(), e);
throw new DocumentNotFoundFaultType();
}
}
/** {@inheritDoc} */
@Override
protected GCUBEServiceContext getServiceContext() {

View File

@ -1,5 +1,7 @@
<ServiceMap>
<Service name ="ISICAllQueryPT" endpoint ="http://node10.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/collector/XQueryAccess"/>
<Service name ="ISICAllRegistrationPT" endpoint ="http://node10.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/collector/Sink"/>
<Service name ="ISICAllCollectionPT" endpoint ="http://node10.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/collector/XMLCollectionAccess"/>
<Service name ="ISICAllStoragePT" endpoint ="http://node10.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/collector/XMLStorageAccess"/>
<!-- <Service name ="ISRegistry" endpoint="http://node6.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/registry/RegistryFactory" /> -->
</ServiceMap>