org.gcube.common.informationsystem.publisher.impl
Class GCUBEPublisher

java.lang.Object
  extended by org.gcube.common.informationsystem.publisher.impl.GCUBEPublisher
All Implemented Interfaces:
org.gcube.common.core.informationsystem.publisher.ISPublisher

public class GCUBEPublisher
extends Object
implements org.gcube.common.core.informationsystem.publisher.ISPublisher

Reference implementation for GCUBE of the ISPublisher interface

Author:
Manuele Simi, Lucio Lelii (ISTI-CNR)

Field Summary
protected static org.gcube.common.core.utils.logging.GCUBELog logger
          Object logger.
 
Constructor Summary
GCUBEPublisher()
          There MUST be a constructor with NO parameter to instantiate it with the reflection API
 
Method Summary
 InstanceStatePublisher getWSRPDocumentManager(org.gcube.common.core.state.GCUBEWSResource resource, org.gcube.common.core.scope.GCUBEScope... scope)
          Gets an instance of a InstanceStatePublisher.
 String registerGCUBEResource(org.gcube.common.core.resources.GCUBEResource profile, org.gcube.common.core.scope.GCUBEScope scope, org.gcube.common.core.security.GCUBESecurityManager manager)
          Registers a GCUBEResource on the Information System
 void registerWSResource(org.gcube.common.core.state.GCUBEWSResource resource, org.gcube.common.core.scope.GCUBEScope... scope)
          Publishes GCUBEWSResource registration on a Information System.
 void removeGCUBEResource(String ID, String type, org.gcube.common.core.scope.GCUBEScope scope, org.gcube.common.core.security.GCUBESecurityManager manager)
          Removes a GCUBEResource from the Information System
 void removeWSResource(org.gcube.common.core.state.GCUBEWSResource resource, org.gcube.common.core.scope.GCUBEScope... scope)
          Unpublishes the registration of a GCUBEWSResource form the Information System
 void updateGCUBEResource(org.gcube.common.core.resources.GCUBEResource profile, org.gcube.common.core.scope.GCUBEScope scope, org.gcube.common.core.security.GCUBESecurityManager manager)
          Updates a GCUBEResource in the Information System
 void updateWSResource(org.gcube.common.core.state.GCUBEWSResource resource, org.gcube.common.core.scope.GCUBEScope... scope)
          Updates a GCUBEWSResource in the Information System
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

logger

protected static final org.gcube.common.core.utils.logging.GCUBELog logger
Object logger.

Constructor Detail

GCUBEPublisher

public GCUBEPublisher()
There MUST be a constructor with NO parameter to instantiate it with the reflection API

Method Detail

getWSRPDocumentManager

public InstanceStatePublisher getWSRPDocumentManager(org.gcube.common.core.state.GCUBEWSResource resource,
                                                     org.gcube.common.core.scope.GCUBEScope... scope)
                                              throws GCUBEPublisherException
Gets an instance of a InstanceStatePublisher. The returned object provides functionalities to register/unregister GCUBEWSResource on the IS-IC

Parameters:
resource - the GCUBEWSResource
scope - optional registration GCUBEScope, replace the one in the resource
Returns:
the InstanceStatePublisher to register the RP document of the resource
Throws:
GCUBEPublisherException - Exception

registerWSResource

public void registerWSResource(org.gcube.common.core.state.GCUBEWSResource resource,
                               org.gcube.common.core.scope.GCUBEScope... scope)
                        throws org.gcube.common.core.informationsystem.publisher.ISPublisherException
Publishes GCUBEWSResource registration on a Information System.

Specified by:
registerWSResource in interface org.gcube.common.core.informationsystem.publisher.ISPublisher
Parameters:
resource - the GCUBEWSResource to register
scope - optional GCUBEScope (overrides the scope specified by the GCUBEWSResource)
Throws:
org.gcube.common.core.informationsystem.publisher.ISPublisherException - if the registration fails

removeWSResource

public void removeWSResource(org.gcube.common.core.state.GCUBEWSResource resource,
                             org.gcube.common.core.scope.GCUBEScope... scope)
                      throws org.gcube.common.core.informationsystem.publisher.ISPublisherException
Unpublishes the registration of a GCUBEWSResource form the Information System

Specified by:
removeWSResource in interface org.gcube.common.core.informationsystem.publisher.ISPublisher
Parameters:
resource - the GCUBEWSResource to unregister
optional - GCUBEScope (overrides the scope specified by the GCUBEWSResource)
Throws:
org.gcube.common.core.informationsystem.publisher.ISPublisherException - if the remove fails

registerGCUBEResource

public String registerGCUBEResource(org.gcube.common.core.resources.GCUBEResource profile,
                                    org.gcube.common.core.scope.GCUBEScope scope,
                                    org.gcube.common.core.security.GCUBESecurityManager manager)
                             throws org.gcube.common.core.informationsystem.publisher.ISPublisherException
Registers a GCUBEResource on the Information System

Specified by:
registerGCUBEResource in interface org.gcube.common.core.informationsystem.publisher.ISPublisher
Parameters:
resource - the GCUBEResource to register
scope - the GCUBEScope in which to register the resource
Returns:
the GCUBESecurityManager of the registrant
Throws:
org.gcube.common.core.informationsystem.publisher.ISPublisherException - if the publication fails

removeGCUBEResource

public void removeGCUBEResource(String ID,
                                String type,
                                org.gcube.common.core.scope.GCUBEScope scope,
                                org.gcube.common.core.security.GCUBESecurityManager manager)
                         throws org.gcube.common.core.informationsystem.publisher.ISPublisherException
Removes a GCUBEResource from the Information System

Specified by:
removeGCUBEResource in interface org.gcube.common.core.informationsystem.publisher.ISPublisher
Parameters:
ID - the ID related to the GCUBEResource to remove
type - the GCUBEResource type to remove
scope - the registration GCUBEScope
manager - the GCUBESecurityManager for contacting the IS
Throws:
org.gcube.common.core.informationsystem.publisher.ISPublisherException - if the remove fails

updateGCUBEResource

public void updateGCUBEResource(org.gcube.common.core.resources.GCUBEResource profile,
                                org.gcube.common.core.scope.GCUBEScope scope,
                                org.gcube.common.core.security.GCUBESecurityManager manager)
                         throws org.gcube.common.core.informationsystem.publisher.ISPublisherException
Updates a GCUBEResource in the Information System

Specified by:
updateGCUBEResource in interface org.gcube.common.core.informationsystem.publisher.ISPublisher
Parameters:
resource - the new GCUBEResource to update
manager - the GCUBESecurityManager for contacting the IS
Throws:
org.gcube.common.core.informationsystem.publisher.ISPublisherException - if the update fails

updateWSResource

public void updateWSResource(org.gcube.common.core.state.GCUBEWSResource resource,
                             org.gcube.common.core.scope.GCUBEScope... scope)
                      throws org.gcube.common.core.informationsystem.publisher.ISPublisherException
Updates a GCUBEWSResource in the Information System

Specified by:
updateWSResource in interface org.gcube.common.core.informationsystem.publisher.ISPublisher
Parameters:
resource - the GCUBEWSResource
scope - optional registration GCUBEScope, replace the one in the resource
Throws:
org.gcube.common.core.informationsystem.publisher.ISPublisherException - if the update fails


Copyright © 2013. All Rights Reserved.