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:
parent
5dc54a18ae
commit
53fc427971
2
.project
2
.project
|
@ -1,6 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<projectDescription>
|
<projectDescription>
|
||||||
<name>InformationCollector_branched</name>
|
<name>InformationCollector</name>
|
||||||
<comment></comment>
|
<comment></comment>
|
||||||
<projects>
|
<projects>
|
||||||
</projects>
|
</projects>
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
|
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)
|
v. 2.0.0 (30-08-2009)
|
||||||
* test-suite
|
* test-suite
|
||||||
|
|
|
@ -20,7 +20,7 @@
|
||||||
sink by collecting and exposing the information published by the
|
sink by collecting and exposing the information published by the
|
||||||
registered gCube services</Description>
|
registered gCube services</Description>
|
||||||
<Name>IS-Collector-service</Name>
|
<Name>IS-Collector-service</Name>
|
||||||
<Version>2.1.0</Version>
|
<Version>2.2.0</Version>
|
||||||
<Dependencies>
|
<Dependencies>
|
||||||
<Dependency>
|
<Dependency>
|
||||||
<Service>
|
<Service>
|
||||||
|
@ -29,7 +29,7 @@
|
||||||
<Version>1.0.0</Version>
|
<Version>1.0.0</Version>
|
||||||
</Service>
|
</Service>
|
||||||
<Package>IS-Collector-stubs</Package>
|
<Package>IS-Collector-stubs</Package>
|
||||||
<Version>[2.1.0]</Version>
|
<Version>[2.2.0]</Version>
|
||||||
<Scope level="GHN" />
|
<Scope level="GHN" />
|
||||||
<Optional>false</Optional>
|
<Optional>false</Optional>
|
||||||
</Dependency>
|
</Dependency>
|
||||||
|
@ -76,7 +76,7 @@
|
||||||
<Software deployable="true">
|
<Software deployable="true">
|
||||||
<Description>InformationCollector Stubs</Description>
|
<Description>InformationCollector Stubs</Description>
|
||||||
<Name>IS-Collector-stubs</Name>
|
<Name>IS-Collector-stubs</Name>
|
||||||
<Version>2.1.0</Version>
|
<Version>2.2.0</Version>
|
||||||
<MultiVersion value="true" />
|
<MultiVersion value="true" />
|
||||||
<Mandatory level="VO" />
|
<Mandatory level="VO" />
|
||||||
<Shareable level="VO" />
|
<Shareable level="VO" />
|
||||||
|
@ -88,7 +88,7 @@
|
||||||
<Software>
|
<Software>
|
||||||
<Description>Test-suite for IS-Collector: provide sample usages of interaction with a IS-Collector instance</Description>
|
<Description>Test-suite for IS-Collector: provide sample usages of interaction with a IS-Collector instance</Description>
|
||||||
<Name>IS-Collector-test-suite</Name>
|
<Name>IS-Collector-test-suite</Name>
|
||||||
<Version>2.1.0</Version>
|
<Version>2.2.0</Version>
|
||||||
<MultiVersion value="true"/>
|
<MultiVersion value="true"/>
|
||||||
<Shareable level="VO"/>
|
<Shareable level="VO"/>
|
||||||
<Type>application</Type>
|
<Type>application</Type>
|
||||||
|
|
|
@ -49,6 +49,10 @@
|
||||||
|
|
||||||
<xsd:element name="getResourceResponse" type="xsd:string"/>
|
<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:element name="deleteProfileParams">
|
||||||
<xsd:complexType >
|
<xsd:complexType >
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
|
@ -58,6 +62,23 @@
|
||||||
</xsd:complexType>
|
</xsd:complexType>
|
||||||
</xsd:element>
|
</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:element name="GetProfileCriteria">
|
||||||
<xsd:complexType >
|
<xsd:complexType >
|
||||||
<xsd:sequence>
|
<xsd:sequence>
|
||||||
|
@ -115,6 +136,14 @@
|
||||||
<part name="parameters" element="tns:getResourceResponse"/>
|
<part name="parameters" element="tns:getResourceResponse"/>
|
||||||
</wsdl:message>
|
</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">
|
<wsdl:message name="DeleteProfileInputMessage">
|
||||||
<part name="parameters" element="tns:deleteProfileParams"/>
|
<part name="parameters" element="tns:deleteProfileParams"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
|
@ -131,6 +160,13 @@
|
||||||
<part name="parameters" element="tns:getProfileResponse"/>
|
<part name="parameters" element="tns:getProfileResponse"/>
|
||||||
</wsdl:message>
|
</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">
|
<wsdl:message name="VoidMessage">
|
||||||
<part name="parameters" element="tns:voidElement"/>
|
<part name="parameters" element="tns:voidElement"/>
|
||||||
</wsdl:message>
|
</wsdl:message>
|
||||||
|
@ -157,6 +193,16 @@
|
||||||
<wsdl:output message="tns:GetResourceOutputMessage"/>
|
<wsdl:output message="tns:GetResourceOutputMessage"/>
|
||||||
<wsdl:fault name="fault" message="tns:DocumentNotFoundFaultTypeMessage"/>
|
<wsdl:fault name="fault" message="tns:DocumentNotFoundFaultTypeMessage"/>
|
||||||
</wsdl:operation>
|
</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:operation name="DeleteResource">
|
||||||
<wsdl:input message="tns:DeleteResourceInputMessage"/>
|
<wsdl:input message="tns:DeleteResourceInputMessage"/>
|
||||||
<wsdl:output message="tns:DeleteResourceOutputMessage"/>
|
<wsdl:output message="tns:DeleteResourceOutputMessage"/>
|
||||||
|
|
|
@ -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.DeleteProfileParams;
|
||||||
import org.gcube.informationsystem.collector.stubs.DocumentNotFoundFaultType;
|
import org.gcube.informationsystem.collector.stubs.DocumentNotFoundFaultType;
|
||||||
import org.gcube.informationsystem.collector.stubs.GetProfileCriteria;
|
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.GetResourceCriteria;
|
||||||
|
import org.gcube.informationsystem.collector.stubs.GetResourceLastModificationTimeMsCriteria;
|
||||||
|
|
||||||
import org.globus.wsrf.utils.FaultHelper;
|
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
|
* Deletes the entire set of registered RPs from the storage
|
||||||
*
|
*
|
||||||
* @throws BaseFaultType
|
* @throws BaseFaultType if an error occurs when deleting the resources
|
||||||
* if an error occurs when deleting the resources
|
|
||||||
*/
|
*/
|
||||||
public void deleteAllRPs() throws BaseFaultType {
|
public void deleteAllRPs() throws BaseFaultType {
|
||||||
try {
|
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 {
|
public String getResource(GetResourceCriteria criteria) throws DocumentNotFoundFaultType {
|
||||||
try {
|
try {
|
||||||
AggregatorPersistentResource aresource = State.getDataManager().retrievePropertyResourceFromID(criteria.getID());
|
AggregatorPersistentResource aresource = State.getDataManager().retrievePropertyResourceFromID(criteria.getID());
|
||||||
logger.debug("Returning resource:" + aresource.getData());
|
|
||||||
return aresource.getData();
|
return aresource.getData();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.warn("Unable to find Resource with ID=" + criteria.getID(), 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 {
|
public String getProfile(GetProfileCriteria criteria) throws DocumentNotFoundFaultType {
|
||||||
try {
|
try {
|
||||||
AggregatorPersistentResource aresource = State.getDataManager().retrieveProfile(criteria.getID(), criteria.getProfileType());
|
AggregatorPersistentResource aresource = State.getDataManager().retrieveProfile(criteria.getID(), criteria.getProfileType());
|
||||||
logger.debug("Returning profile:" + aresource.getData());
|
|
||||||
return aresource.getData();
|
return aresource.getData();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.warn("Unable to find Profile with ID=" + criteria.getID(), 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} */
|
/** {@inheritDoc} */
|
||||||
@Override
|
@Override
|
||||||
protected GCUBEServiceContext getServiceContext() {
|
protected GCUBEServiceContext getServiceContext() {
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
<ServiceMap>
|
<ServiceMap>
|
||||||
<Service name ="ISICAllQueryPT" endpoint ="http://node10.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/collector/XQueryAccess"/>
|
<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 ="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" /> -->
|
<!-- <Service name ="ISRegistry" endpoint="http://node6.d.d4science.research-infrastructures.eu:8080/wsrf/services/gcube/informationsystem/registry/RegistryFactory" /> -->
|
||||||
</ServiceMap>
|
</ServiceMap>
|
||||||
|
|
Loading…
Reference in New Issue