org.gcube.portlets.admin.resourcemanagement.client.remote
Interface ServiceProxy

All Superinterfaces:
com.google.gwt.user.client.rpc.RemoteService
All Known Implementing Classes:
ServiceProxyImpl

public interface ServiceProxy
extends com.google.gwt.user.client.rpc.RemoteService

Interface of RPC servlet implementing the server side logics of the application.

Author:
Daniele Strollo (ISTI-CNR)

Method Summary
 org.gcube.resourcemanagement.support.shared.types.Tuple<String> addResourcesToScope(String resType, List<String> resourceIDs, String scope)
           
 org.gcube.resourcemanagement.support.shared.types.Tuple<String> checkDeployStatus(String scope, String deployID)
           
 String createGenericResource(String id, String name, String description, String body, String subType)
           
 String deploy(List<String> ghnsID, List<String> servicesID)
           
 void doOperation(org.gcube.resourcemanagement.support.shared.operations.SupportedOperations opCode, String scope, List<org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor> resources)
          RESOURCE OPERATIONS
 void emptyCache()
           
 List<String> getAvailableAddScopes()
           
 List<String> getAvailableScopes()
           
 org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor getGenericResourceDescriptor(String scope, String resID)
          Used for generic resource editing form to retrieve the profile.
 Map<String,org.gcube.resourcemanagement.support.shared.plugins.GenericResourcePlugin> getGenericResourcePlugins()
           
 List<String> getRelatedResources(String type, String id, String scope)
          Given a type retrieves its related resources.
 org.gcube.resourcemanagement.support.shared.types.datamodel.CompleteResourceProfile getResourceByID(String scope, String type, String resID)
          Retrieves the XML profiles and its HTML representation of a resource given its unique identifier and its type.
 List<String> getResourcesBySubType(String scope, String type, String subtype)
          Filters the resources in a given scope by their type and subtype.
 List<String> getResourcesByType(String scope, String type)
          For a given type returns all the resources defined in the IS having the chosen type.
 List<org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor> getResourcesModel(String scope, String type, String subType, List<org.gcube.resourcemanagement.support.shared.types.Tuple<String>> additionalMaps)
           
 HashMap<String,ArrayList<String>> getResourceTypeTree(String scope)
          Given a scope, provides the set of (Type, SubType) couples defining resources in the system.
 List<String> getWSResources(String scope)
          Returns the list of WSResources
 void initScopes(boolean doClean)
           
 org.gcube.resourcemanagement.support.client.utils.CurrentStatus initStatus()
           
 org.gcube.resourcemanagement.support.shared.types.Tuple<String> removeResourcesFromScope(String resType, List<String> resourceIDs, String scope)
           
 void setCurrentScope(String scope)
          This way the servlet stores the scope in the session.
 void setSuperUser(boolean superUser)
           
 void setUseCache(boolean flag)
           
 void updateGenericResource(String id, String name, String description, String body, String subType)
           
 

Method Detail

initStatus

org.gcube.resourcemanagement.support.client.utils.CurrentStatus initStatus()

emptyCache

void emptyCache()

setUseCache

void setUseCache(boolean flag)

initScopes

void initScopes(boolean doClean)

setSuperUser

void setSuperUser(boolean superUser)

setCurrentScope

void setCurrentScope(String scope)
This way the servlet stores the scope in the session.


getAvailableScopes

List<String> getAvailableScopes()
Returns:
the list of all available scopes.

getAvailableAddScopes

List<String> getAvailableAddScopes()

addResourcesToScope

org.gcube.resourcemanagement.support.shared.types.Tuple<String> addResourcesToScope(String resType,
                                                                                    List<String> resourceIDs,
                                                                                    String scope)
                                                                                    throws Exception
Parameters:
resType -
resourceIDs -
scope -
Returns:
the xml representation of the generated report (if not failed). it is a tuple consisting of:
0) the reportID
1) the resourceType
2) the xmlrepresentation
3) the html representation
Throws:
Exception

removeResourcesFromScope

org.gcube.resourcemanagement.support.shared.types.Tuple<String> removeResourcesFromScope(String resType,
                                                                                         List<String> resourceIDs,
                                                                                         String scope)
                                                                                         throws Exception
Throws:
Exception

deploy

String deploy(List<String> ghnsID,
              List<String> servicesID)
              throws Exception
Throws:
Exception

checkDeployStatus

org.gcube.resourcemanagement.support.shared.types.Tuple<String> checkDeployStatus(String scope,
                                                                                  String deployID)
                                                                                  throws Exception
Throws:
Exception

getResourcesModel

List<org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor> getResourcesModel(String scope,
                                                                                                       String type,
                                                                                                       String subType,
                                                                                                       List<org.gcube.resourcemanagement.support.shared.types.Tuple<String>> additionalMaps)
                                                                                                       throws Exception
Throws:
Exception

getResourceTypeTree

HashMap<String,ArrayList<String>> getResourceTypeTree(String scope)
                                                      throws Exception
Given a scope, provides the set of (Type, SubType) couples defining resources in the system. The key of returned hashmap is the type and the associated value is a list of string representing its related sub-types.

Parameters:
scope - the scope of resources
Returns:
the hash of (type, list(subtypes))
Throws:
Exception
See Also:
org.gcube.portlets.admin.resourcemanagement.server.gcube.services.ISClientRequester#getResourcesTypes(org.gcube.common.core.scope.GCUBEScope)

getRelatedResources

List<String> getRelatedResources(String type,
                                 String id,
                                 String scope)
Given a type retrieves its related resources. E.g. for GHN returns the RunningInstances on it.

Parameters:
scope -
type -
Returns:

getResourcesByType

List<String> getResourcesByType(String scope,
                                String type)
For a given type returns all the resources defined in the IS having the chosen type.

Parameters:
scope - the scope of resources
type - the type of searched resources (e.g. GHN, RunningInstance, ...)
Returns:
list of XML profiles of resources found

getResourcesBySubType

List<String> getResourcesBySubType(String scope,
                                   String type,
                                   String subtype)
Filters the resources in a given scope by their type and subtype. For example it allows to retrieve in a scope all the GHN (type) defined in a domain (its subtype).

Parameters:
scope - the scope of resources
type - the type of searched resources (e.g. GHN, RunningInstance, ...)
subtype - the subtype of search resources (e.g. for GHN is its domain).
Returns:
list of XML profiles of resources found

getGenericResourceDescriptor

org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor getGenericResourceDescriptor(String scope,
                                                                                                            String resID)
                                                                                                            throws Exception
Used for generic resource editing form to retrieve the profile.

Parameters:
scope -
resID -
Returns:
Throws:
Exception

getWSResources

List<String> getWSResources(String scope)
Returns the list of WSResources

Parameters:
scope - the scope of resources
Returns:
list of XML profiles of resources found

getResourceByID

org.gcube.resourcemanagement.support.shared.types.datamodel.CompleteResourceProfile getResourceByID(String scope,
                                                                                                    String type,
                                                                                                    String resID)
Retrieves the XML profiles and its HTML representation of a resource given its unique identifier and its type. Notice that the ID is ensured to be unique for resources of the same type.

Parameters:
scope - the scope of the resource
type - the type of the searched resource (e.g. GHN, RunningInstance, ...)
resID - the unique identifier of the resource
Returns:
a couple of strings (XMLProfile, HTMLProfileRepresentation)

createGenericResource

String createGenericResource(String id,
                             String name,
                             String description,
                             String body,
                             String subType)
                             throws Exception
Throws:
Exception

updateGenericResource

void updateGenericResource(String id,
                           String name,
                           String description,
                           String body,
                           String subType)
                           throws Exception
Throws:
Exception

getGenericResourcePlugins

Map<String,org.gcube.resourcemanagement.support.shared.plugins.GenericResourcePlugin> getGenericResourcePlugins()
                                                                                                                throws Exception
Throws:
Exception

doOperation

void doOperation(org.gcube.resourcemanagement.support.shared.operations.SupportedOperations opCode,
                 String scope,
                 List<org.gcube.resourcemanagement.support.shared.types.datamodel.ResourceDescriptor> resources)
                 throws Exception
RESOURCE OPERATIONS

Throws:
Exception


Copyright © 2014. All Rights Reserved.