edu.wisc.trace.uch.resource.retrievalmanager
Class RetrievalManager

java.lang.Object
  extended by edu.wisc.trace.uch.resource.retrievalmanager.RetrievalManager

public class RetrievalManager
extends Object

Provide Method to Query and Retrieve Resources from Resource Server. Also cache the Resources and its properties and provides methods to clear resources.

Version:
$Revision: 1.1 $
Author:
Parikshit Thakur & Team, Trace R&D Center

Constructor Summary
RetrievalManager(String resServerUrl, String cacheDir, String userName, String password)
          Instantiate the Object of HttpRequestResponseUtil.
 
Method Summary
 List<String> clearCache()
          Try to delete all files in cache directory and return those fileUri which can't be deleted because they are used by other resource.
 List<String> clearCache(String resourceType)
          Clear specified type or resources from cache and return deleted resource paths.
 List<String> clearResourceSheetCache()
          Clear Resource Sheet Cache and return deleted resource paths.
 List<String> clearUipmClientCache()
          Clear UIPM Client Cache and return deleted resource paths.
 Map<String,List<String>> getResource(Map<String,List<String>> resPropMap)
          Get Specified Resource from Resource Server.
 List<List<Map<String,List<String>>>> getResources(List<Map<String,List<String>>> resPropList)
          Get Specified Resources from Resource Server.
 Map<String,List<String>> retrieveResource(String retrievalUri)
          Retrieve the specified Resource from Resource Server.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RetrievalManager

public RetrievalManager(String resServerUrl,
                        String cacheDir,
                        String userName,
                        String password)
Instantiate the Object of HttpRequestResponseUtil.

Parameters:
resServerUrl - a String value of Resource Server URL
cacheDir - a String value of Cache directory path
userName - a String value of userName
password - a String value of password
Method Detail

getResources

public List<List<Map<String,List<String>>>> getResources(List<Map<String,List<String>>> resPropList)
Get Specified Resources from Resource Server.

Parameters:
resPropList - an Object of List<Map<String, String>>
Returns:
an Object of List<List<Map<String, Object>>>

getResource

public Map<String,List<String>> getResource(Map<String,List<String>> resPropMap)
Get Specified Resource from Resource Server.

Parameters:
resPropMap - an Object of Map<String, String>
Returns:
an Object of Map<String, Object>

retrieveResource

public Map<String,List<String>> retrieveResource(String retrievalUri)
Retrieve the specified Resource from Resource Server.

Parameters:
retrievalUri - a String value of Resource Retrieval URI
Returns:
a URI String specifying the local path or Resource

clearCache

public List<String> clearCache()
Try to delete all files in cache directory and return those fileUri which can't be deleted because they are used by other resource.

Returns:
an Object of List<String> containing not deleted file.

clearResourceSheetCache

public List<String> clearResourceSheetCache()
Clear Resource Sheet Cache and return deleted resource paths.

Returns:
an Object of List<String>

clearUipmClientCache

public List<String> clearUipmClientCache()
Clear UIPM Client Cache and return deleted resource paths.

Returns:
an Object of List<String>

clearCache

public List<String> clearCache(String resourceType)
Clear specified type or resources from cache and return deleted resource paths.

Parameters:
resourceType - a String value of Resource Type
Returns:
an Object of List<String>


Copyright © 2006-2008 Trace R&D Center, University of Wisconsin-Madison. All Rights Reserved.