class ResourceManager

Manage Resources for discovered targets and provide methods to retrieve matched Resources.

Public Methods

[more] ResourceManager(UCH* uch, string localResDirUri, string resServerAppPath, string docRoot)
Constructor.
[more] ResourceManager(UCH* uch, string localResDirUri, string resserverPath, string docRoot, string userName, string password)
Constructor.
[more]void addResourceDir(string tdUri)
Parse <ResDir> Element of Target Description and add it in the list of TargetDescriptions.
[more]list<list<map<string, list<string>*>*>*> * getResources(string sessionId, list<map<string, list<string>*>*>*resPropsList)
Return List of matched Resources with 'resPropsList'.
[more]void updateDynRes(list<string>* sessionIds, list<string>* eltIds)
Signals that the set of atomic resources pertaining to a specific socket element has changed.
[more]list<list<map<string, list<string>*>*>*> * retrieveResource( list<map<string, list<string>*>*>* resPropList)
Retrieve all matched Resources from Resource Server.
[more]list<map<string, list<string>*>*> * retrieveResource(map<string, list<string>*>* resPropMap)
Retrieve all matched Resources from Resource Server.
[more]RetrievalManager* getRetrievalManager()
Return the Retrieval Manager Object
[more]string retrieveResource(string url)
Retrieve the resource from Resource Server and save it in cache directory and return that file path.
[more]list<string> * clearCache()
Clear all resources cache
[more]void clearAtomicResources(list<string>*deletedLocalUris)
Clear all Atomic Resources
[more]list<string> * clearResourceSheetCache()
Clear all resource sheet cache
[more]list<string> * clearCache(string type)
Clear all cache
[more]list<map<string, string>*> * uploadResources(list<map<string, list<string>*>*>* props, list<string>* owners, list<string>* groups, map<string, list<string>*>* rights, list<string>*resourceUri)
Call the same method on ResourceManager.
[more]list<map<string, list<string>*>*> * getResourceServerResources(map<string, list<string>*>* resourceProps)
Retrieve only best matched Resource from Resource Server.
[more]list<map<string, list<string>*>*> * getResServerResource(map<string, list<string>*>* resourceProps)
Retrieve only best matched Resource from Local Resource.
[more]string convertURI(string uri)
Call the same method of UCH.
[more]list<map<string, void*>*> * getDynRes(string sessionId, list<map<string, string>*>* resProps)
Get a dynamic atomic resource from the TA.
[more]bool isUriContainsResServerAppPath(string uri)
Check whether URI contains Resource Server Address or not
[more]string getUserProfile()
Get User Profile for logged user.
[more]bool addLocalResource(string ucfFileURI)
Add resource derived by specifies UCF file to the local resources.

Public Members

[more] Clear the Resource Map


Documentation

Manage Resources for discovered targets and provide methods to retrieve matched Resources.

o ResourceManager(UCH* uch, string localResDirUri, string resServerAppPath, string docRoot)
Constructor. Assign reference of UCH to local variable.

Parameters:
uch - an Object of UCH

o ResourceManager(UCH* uch, string localResDirUri, string resserverPath, string docRoot, string userName, string password)
Constructor. Assign reference of UCH to local variable. Instantiate ResourceRetrival class using other parameters.

Parameters:
uch - an Object of UCH
resServerUrl - a String value of resServerUrl
cacheDir - a String value of Cache dir path
userName - a String value of userName
password - a String value of password
serverName - a String value of Server Name
serverIP - a String value of Server IP

ovoid addResourceDir(string tdUri)
Parse <ResDir> Element of Target Description and add it in the list of TargetDescriptions.

Parameters:
tdUri - a String value of Target Description URI(tdUri)

olist<list<map<string, list<string>*>*>*> * getResources(string sessionId, list<map<string, list<string>*>*>*resPropsList)
Return List of matched Resources with 'resPropsList'. First find it as Dynamic Resource and it is not found then find from the available Resource Directories. Return cross indexed List of Matched Resources. If one or more Resource then make 'NULL' entry for respective Resource in the List.

Parameters:
sessionId - a String value of SessionId
resPropsList - a List<Map<String, String>> of Resource Properties
Returns:
a List<List<Map<String,Object>>> of resources

ovoid updateDynRes(list<string>* sessionIds, list<string>* eltIds)
Signals that the set of atomic resources pertaining to a specific socket element has changed.

Parameters:
sessionIds - a List<String> value of sessionIds
eltIds - a List<String> value of eltIds

olist<list<map<string, list<string>*>*>*> * retrieveResource( list<map<string, list<string>*>*>* resPropList)
Retrieve all matched Resources from Resource Server.

Parameters:
resourceProps - an Object of List<Map<String, String&gt>;
Returns:
an Object of List<Map<String, Object>>

olist<map<string, list<string>*>*> * retrieveResource(map<string, list<string>*>* resPropMap)
Retrieve all matched Resources from Resource Server.

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

oRetrievalManager* getRetrievalManager()
Return the Retrieval Manager Object
Returns:
Object of Retrieval Manager.

ostring retrieveResource(string url)
Retrieve the resource from Resource Server and save it in cache directory and return that file path.
Parameters:
url - a String value of uri.
Returns:
a String value of file path.

olist<string> * clearCache()
Clear all resources cache
Returns:
list of clear resources

ovoid clearAtomicResources(list<string>*deletedLocalUris)
Clear all Atomic Resources
Parameters:
deletedLocalUris - a list<string>

o Clear the Resource Map
Clear the Resource Map

olist<string> * clearResourceSheetCache()
Clear all resource sheet cache
Returns:
list<string> of deleted resource sheet

olist<string> * clearCache(string type)
Clear all cache
Returns:
list<string> of cache

olist<map<string, string>*> * uploadResources(list<map<string, list<string>*>*>* props, list<string>* owners, list<string>* groups, map<string, list<string>*>* rights, list<string>*resourceUri)
Call the same method on ResourceManager.

Parameters:
props - an Object of List<Map<String, List<String>>> specifies Resource Properties
owners - an Object of List<String> specifies owners of Resource
groups - an Object of List<String> specifies groups of Resource
rights - an Object of Map<String, List<String>> specifies rights of Resource
resourceUri - a String value of local resource path URI
Returns:
an Object of List<Map<String, String>>

olist<map<string, list<string>*>*> * getResourceServerResources(map<string, list<string>*>* resourceProps)
Retrieve only best matched Resource from Resource Server.

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

olist<map<string, list<string>*>*> * getResServerResource(map<string, list<string>*>* resourceProps)
Retrieve only best matched Resource from Local Resource. if not found, will fetch from Resource Server.
Parameters:
caller - Object
resourceProps - an Object of Map<String, String>;
Returns:
an Object of List<Map<String, List<String>>>;

ostring convertURI(string uri)
Call the same method of UCH.

Parameters:
uri - a String value of URI
Returns:
a String value of converted URI

olist<map<string, void*>*> * getDynRes(string sessionId, list<map<string, string>*>* resProps)
Get a dynamic atomic resource from the TA.

Parameters:
sessionId - a map value of sessionId
resProps - a List<Map<String,Stirng>> value of resProps
Returns:
a List<Map<String,Object>> representing Matched Resources

obool isUriContainsResServerAppPath(string uri)
Check whether URI contains Resource Server Address or not
Parameters:
uri - a String Value of URI
Returns:
true if URI contains Resource Server Address else false

ostring getUserProfile()
Get User Profile for logged user.

Returns:
an user profile file data

obool addLocalResource(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


This class has no child classes.
Author:
Parikshit Thakur & Team, Trace R&D Center
Version:
Revision: 1.0

Alphabetic index HTML hierarchy of classes or Java



This page was generated with the help of DOC++.