| java.lang.Object org.netbeans.jemmy.BundleManager
BundleManager | public class BundleManager extends Object (Code) | | Provides functionality to work with a bunch of resource files.
See Also: org.netbeans.jemmy.Bundle author: Alexandre Iline (alexandre.iline@sun.com) |
Constructor Summary | |
public | BundleManager() Bundle manager constructor. |
BundleManager | public BundleManager()(Code) | | Bundle manager constructor.
|
addBundle | public Bundle addBundle(Bundle bundle, String ID)(Code) | | Adds a Bundle to the managed collection of resource files.
Parameters: bundle - Bundle object Parameters: ID - Symbolic bundle id First parameter or null if bundle with ID already exists. See Also: org.netbeans.jemmy.Bundle |
calculateResources | public int calculateResources(String key)(Code) | | Counts the number of resource occurences in all the managed Bundles.
Parameters: key - Resource key the number of resource occurences with the given key amongall the Bundles managed by this BundleManager. |
cloneThis | public BundleManager cloneThis()(Code) | | Creates a shallow copy of this BundleManager.
Does not copy bundles, only their references.
a copy of this BundleManager. |
getBundle | public Bundle getBundle(String ID)(Code) | | Returns a Bundle given it's symbolic ID.
Parameters: ID - Symbolic bundle ID the Bundle. A null reference is returned ifno bundle with the symbolic ID was found. |
getResource | public String getResource(String bundleID, String key)(Code) | | Returns resource from ID bundle.
Parameters: bundleID - Bundle ID. Parameters: key - Resource key. the resource value. If the bundle ID does not existif the resource with the given key cannot be found, a nullreference is returned. |
getResource | public String getResource(String key)(Code) | | Searches for a resource in all the managed Bundles.
Parameters: key - Resource key. first resource value found that is indexed by the given key.If no resource is found, return a null reference. |
loadBundleFromFile | public Bundle loadBundleFromFile(String fileName, String ID) throws IOException, FileNotFoundException(Code) | | Create a new Bundle, load resources from a simple text file,
and add the bundle.
Load resources from a text file to a new Bundle object. The new
Bundle is added to the collection of objects managed by this
BundleManager .
Parameters: fileName - Name of a file to load resources from. Parameters: ID - Symbolic bundle ID used to identify the new bundle usedto manage the resources from the file. a newly created bundle. exception: IOException - exception: FileNotFoundException - |
print | public void print(PrintWriter writer)(Code) | | Prints bundles contents.
Parameters: writer - Writer to print data in. |
print | public void print(PrintStream stream)(Code) | | Prints bundles contents.
Parameters: stream - Stream to print data in. |
removeBundle | public Bundle removeBundle(String ID)(Code) | | Removes a Bundle from the managed collection of resource files.
Parameters: ID - Symbolic bundle id Removed bundle or null if no bundle ID is. |
|
|