org.gcube.portlets.admin.irbootstrapperportlet.gwt.server.resourceManagement
Class ResourceCache

java.lang.Object
  extended by org.gcube.portlets.admin.irbootstrapperportlet.gwt.server.resourceManagement.ResourceCache

public class ResourceCache
extends Object

Author:
Spyros Boutsis, NKUA

Constructor Summary
ResourceCache(org.gcube.common.core.scope.GCUBEScope scope)
          Class constructor
 
Method Summary
 void addResourceToFetchedResourceTypesList(Resource res)
          Adds a new resource type to the list of types to retrieve
 void clearResourceTypes()
          Removes everything from the list of resource types to retrieve
<T extends Resource>
List<T>
getResourcesWithGivenAttributes(T resource)
          Returns the resources having the given property values
 void populateCacheFromIS()
          Retrieves and returns the resources which belong to the previously defined resource types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ResourceCache

public ResourceCache(org.gcube.common.core.scope.GCUBEScope scope)
Class constructor

Parameters:
scope - the scope in which this ResourceCache operates
Method Detail

addResourceToFetchedResourceTypesList

public void addResourceToFetchedResourceTypesList(Resource res)
Adds a new resource type to the list of types to retrieve

Parameters:
resourceTypeName - the resource type name

clearResourceTypes

public void clearResourceTypes()
Removes everything from the list of resource types to retrieve


populateCacheFromIS

public void populateCacheFromIS()
                         throws Exception
Retrieves and returns the resources which belong to the previously defined resource types.

Throws:
Exception

getResourcesWithGivenAttributes

public <T extends Resource> List<T> getResourcesWithGivenAttributes(T resource)
Returns the resources having the given property values

Parameters:
resourceType - the type of resources to get
attributes - the list of attributes that the requested resources should have
Returns:


Copyright © 2013. All Rights Reserved.