From 44a54c91508805daaa9c5aaf621c1369566ff41c Mon Sep 17 00:00:00 2001 From: Lucio Lelii Date: Wed, 24 Oct 2012 15:47:54 +0000 Subject: [PATCH] added field invocationScope to the Registry Factory property git-svn-id: http://svn.research-infrastructures.eu/public/d4science/gcube/trunk/information-system/gCubeIS/Registry@60418 82a268e6-3cf1-43bd-a215-b396298e98cf --- .classpath | 5 +---- changelog.xml | 3 +++ etc/profile.xml | 6 +++--- schema/RegistryFactory.wsdl | 3 ++- .../registry/impl/porttypes/LocalResourceRegistration.java | 6 +++--- .../registry/impl/porttypes/RegistryFactory.java | 4 +++- 6 files changed, 15 insertions(+), 12 deletions(-) diff --git a/.classpath b/.classpath index 67f6d72..0dbd3aa 100644 --- a/.classpath +++ b/.classpath @@ -4,9 +4,6 @@ - - - - + diff --git a/changelog.xml b/changelog.xml index 948d421..08089a9 100644 --- a/changelog.xml +++ b/changelog.xml @@ -1,4 +1,7 @@ + + Adding new field in the factory property for the caller scope + Adding WS-Topic for the new Runtime Resource diff --git a/etc/profile.xml b/etc/profile.xml index 9103d08..f823202 100644 --- a/etc/profile.xml +++ b/etc/profile.xml @@ -18,7 +18,7 @@
IS-Registry: validate, register and unregister gCube resources to/from the IS. It exposes WS-Topics for notifications about gCube resources' lifecycle IS-Registry-service - 2.1.3 + 2.1.4 @@ -32,7 +32,7 @@ 1.0.0 IS-Registry-stubs - 2.1.0 + 2.1.4 false @@ -52,7 +52,7 @@ Stub classes for interfacing the IS-Registry IS-Registry-stubs - 2.1.3 + 2.1.4 diff --git a/schema/RegistryFactory.wsdl b/schema/RegistryFactory.wsdl index 6e41355..eea857e 100644 --- a/schema/RegistryFactory.wsdl +++ b/schema/RegistryFactory.wsdl @@ -84,7 +84,8 @@ - + + diff --git a/src/org/gcube/informationsystem/registry/impl/porttypes/LocalResourceRegistration.java b/src/org/gcube/informationsystem/registry/impl/porttypes/LocalResourceRegistration.java index 0b9a117..916016e 100644 --- a/src/org/gcube/informationsystem/registry/impl/porttypes/LocalResourceRegistration.java +++ b/src/org/gcube/informationsystem/registry/impl/porttypes/LocalResourceRegistration.java @@ -43,7 +43,7 @@ public class LocalResourceRegistration { resource.store(writer); RegistryFactory.updateCounterInfo(resource.getID(), ResourceMappings.valueOf( resource.getType()), OperationType.create, - Calendar.getInstance(), writer.toString()); + Calendar.getInstance(), writer.toString(), ServiceContext.getContext().getScope()); } /** * @@ -71,7 +71,7 @@ public class LocalResourceRegistration { GCUBEResource resource = ResourceMappings.valueOf(type).getResourceImplementation(); resource.setID(id); LocalNotifier.notifyEvent(resource, RegistryTopic.REMOVE); - RegistryFactory.updateCounterInfo(id, ResourceMappings.valueOf(type),OperationType.destroy, Calendar.getInstance(), null); + RegistryFactory.updateCounterInfo(id, ResourceMappings.valueOf(type),OperationType.destroy, Calendar.getInstance(), null, ServiceContext.getContext().getScope()); } public void update(GCUBEResource resource) throws Exception { @@ -93,7 +93,7 @@ public class LocalResourceRegistration { StringWriter writer = new StringWriter(); resource.store(writer); RegistryFactory.updateCounterInfo(resource.getID(), ResourceMappings.valueOf(resource.getType()), - OperationType.update, Calendar.getInstance(), writer.toString()); + OperationType.update, Calendar.getInstance(), writer.toString(), ServiceContext.getContext().getScope()); } } diff --git a/src/org/gcube/informationsystem/registry/impl/porttypes/RegistryFactory.java b/src/org/gcube/informationsystem/registry/impl/porttypes/RegistryFactory.java index 5d55ab2..0d2340b 100644 --- a/src/org/gcube/informationsystem/registry/impl/porttypes/RegistryFactory.java +++ b/src/org/gcube/informationsystem/registry/impl/porttypes/RegistryFactory.java @@ -182,13 +182,15 @@ public class RegistryFactory extends GCUBEPortType { */ protected static synchronized void updateCounterInfo(String ID, ResourceMappings resType, OperationType opType, Calendar updateTime, - String profile) throws Exception { + String profile, GCUBEScope scope) throws Exception { //return; RegistryProperty property = new RegistryProperty(); property.setUniqueID(ID); property.setProfile(profile); property.setOperationType(opType.name()); property.setChangeTime(updateTime); + property.setInvocationScope(scope.toString()); + // select the type of the resource to update logger.trace("Notifying about resource " + ID +", event: " + opType); for (Method method : getResource().getClass().getDeclaredMethods()) {