org.gcube.informationsystem.glitebridge.publisher
Class GenericResourcesPublisher
java.lang.Object
org.gcube.informationsystem.glitebridge.publisher.GenericResourcesPublisher
public class GenericResourcesPublisher
- extends java.lang.Object
- Author:
- Luca Frosini (ISTI-CNR)
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GenericResourcesPublisher
public GenericResourcesPublisher()
throws java.lang.Exception
- Constructor. Initialize the ISPublisher.
- Throws:
java.lang.Exception
- if fails to initialize the ISPublisher.
publishGliteResource
public <T> void publishGliteResource(GenericResourcesPublisher.GCUBEGenericResourceCreator<T> g,
GCUBEScope gCubeScope)
throws java.lang.Exception
- Type Parameters:
T
- class- Parameters:
g
- GCUBEGenericResourceCreatorgCubeScope
- GCUBEScope
- Throws:
java.lang.Exception
- if fails
getGenericResourcesID
public java.util.List<java.lang.String> getGenericResourcesID(GCUBEScope gCubeScope,
java.lang.String secondaryType)
throws java.lang.Exception
- Parameters:
gCubeScope
- GCUBEScope where to look for Generic Resources IDssecondaryType
- Secondary Type of the Generic Resources to get the IDs
- Returns:
- List of String
- Throws:
java.lang.Exception
- if fails to retrieve the IDs of the Generic Resources with secondaryType in the specified gCubeScope
removeGenericResource
public void removeGenericResource(java.lang.String id,
GCUBEScope gCubeScope)
throws java.lang.Exception
- Remove all Generic Resources in the specified GCUBEScope with the IDs specified as argument
- Parameters:
id
- List of String with Generic Resources IDgCubeScope
- scope
- Throws:
java.lang.Exception
- if fails
publishResources
public java.util.List<java.lang.String> publishResources(java.util.List<KSite> kSitesTotal,
java.util.List<KCluster> kClustersTotal,
java.util.List<KStorageElement> kStorageElementsTotal,
GCUBEScope gcubeScope)
throws java.lang.Exception
- Public Harvested gLite Resources
- Parameters:
kSitesTotal
- List of KSite to publishkClustersTotal
- List of KCluster to publishkStorageElementsTotal
- List of KStorageElement to publishgcubeScope
- GCUBEScope where publish the Generic Resources
- Returns:
- List of String with IDs of published Generic Resources
- Throws:
java.lang.Exception
- if fails