edu.wisc.trace.uch.resource.localresourcemanager
Class LocalResourceManager

java.lang.Object
  extended by edu.wisc.trace.uch.resource.localresourcemanager.LocalResourceManager

public class LocalResourceManager
extends Object

Parse all .ucf(UCH Config File) files from specific location. Validate these files and save their contents as resources. Also provide methods to find resources from available local resources.

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

Constructor Summary
LocalResourceManager(ResourceManager resourceManager, String resourceDirUri)
          Constructor.
 
Method Summary
 boolean addResource(String ucfFileURI)
          Add resource derived by specifies UCF file to the local resources.
 List<Map<String,List<String>>> getResources(Map<String,List<String>> reqProps)
          Get Resources for specified resource properties.
 void reload()
          Clear all local resource properties and load all resource again.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LocalResourceManager

public LocalResourceManager(ResourceManager resourceManager,
                            String resourceDirUri)
Constructor. Parse all .ucf(UCH Config File) files from sub directories of specified Directory. Validate these files and save their contents as resources.

Parameters:
resourceDirUri - a String value of Resource Directory URI
Method Detail

getResources

public List<Map<String,List<String>>> getResources(Map<String,List<String>> reqProps)
Get Resources for specified resource properties.

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

reload

public void reload()
Clear all local resource properties and load all resource again.


addResource

public boolean addResource(String ucfFileURI)
Add resource derived by specifies UCF file to the local resources.

Parameters:
ucfFileURI - a String value of UCF file.
Returns:
a boolean value specifies whether local resource added successfully or not


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