org.gcube.resourcemanagement.support.server.managers.resources
Class GenericResourceManager

java.lang.Object
  extended by org.gcube.resourcemanagement.support.server.managers.resources.AbstractResourceManager
      extended by org.gcube.resourcemanagement.support.server.managers.resources.GenericResourceManager

public class GenericResourceManager
extends AbstractResourceManager

Author:
Daniele Strollo (ISTI-CNR)

Constructor Summary
GenericResourceManager()
          Deprecated. discouraged use. With no ID some operations cannot be accessed.
GenericResourceManager(String id)
           
GenericResourceManager(String id, String name)
           
GenericResourceManager(String id, String name, String subtype)
           
 
Method Summary
protected  org.gcube.common.core.resources.GCUBEResource buildGCUBEResource(String xmlRepresentation)
          Given the XML profile representation of a gcube resource, its GCUBEResource is built.
static String create(String ID, org.gcube.common.core.scope.GCUBEScope scope, String name, String description, String body, String subType)
          Creates a Generic Resource and returns the ID given by the resource manager at creation phase.
 void update(String name, String description, String body, String subType, org.gcube.common.core.scope.GCUBEScope scope)
          Updates the resource.
 
Methods inherited from class org.gcube.resourcemanagement.support.server.managers.resources.AbstractResourceManager
addToExistingScope, copyFromToVO, delete, forceDelete, getGCUBEResource, getID, getISClient, getISPublisher, getName, getReportResourceManager, getResourceManager, getResourceManagers, getResourceReportManagers, getSecurityManager, getSubType, getType, getXMLDescription, removeFromScope, setID, setSecurityManager, validateScopes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericResourceManager

public GenericResourceManager()
                       throws ResourceParameterException,
                              ResourceAccessException
Deprecated. discouraged use. With no ID some operations cannot be accessed.

Throws:
ResourceParameterException
ResourceAccessException

GenericResourceManager

public GenericResourceManager(String id)
                       throws ResourceParameterException,
                              ResourceAccessException
Throws:
ResourceParameterException
ResourceAccessException

GenericResourceManager

public GenericResourceManager(String id,
                              String name)
                       throws ResourceParameterException,
                              ResourceAccessException
Parameters:
id -
name -
type -
Throws:
ResourceParameterException
ResourceAccessException

GenericResourceManager

public GenericResourceManager(String id,
                              String name,
                              String subtype)
                       throws ResourceParameterException,
                              ResourceAccessException
Parameters:
id -
name -
type -
subtype -
Throws:
ResourceParameterException
ResourceAccessException
Method Detail

update

public final void update(String name,
                         String description,
                         String body,
                         String subType,
                         org.gcube.common.core.scope.GCUBEScope scope)
                  throws AbstractResourceException
Updates the resource.

Parameters:
name - (Mandatory) the name to assign to the resource
description - (optional) if null it will not be changed
body - (optional) if null it will not be changed
subType - (optional) if null it will not be changed
scope - (optional) if null it will not be changed
Throws:
AbstractResourceException

create

public static final String create(String ID,
                                  org.gcube.common.core.scope.GCUBEScope scope,
                                  String name,
                                  String description,
                                  String body,
                                  String subType)
                           throws Exception
Creates a Generic Resource and returns the ID given by the resource manager at creation phase.

Returns:
the id assigned to the newly created resource
Throws:
Exception

buildGCUBEResource

protected final org.gcube.common.core.resources.GCUBEResource buildGCUBEResource(String xmlRepresentation)
                                                                          throws AbstractResourceException
Description copied from class: AbstractResourceManager
Given the XML profile representation of a gcube resource, its GCUBEResource is built. Since it depends on the type of the resource, each concrete implementation of resource managers must implement it.

Specified by:
buildGCUBEResource in class AbstractResourceManager
Returns:
Throws:
AbstractResourceException


Copyright © 2013. All Rights Reserved.