|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.cog.gridshell.model.ScopeableProperties
Allows property values to be processed with a given scope. Keys are NOT processed using the scope.
The default Scope includes ScopeImp.getSystemScope() plus:
Current properties file is the file object associated with ScopableProerperies and will not work if the user does not use the loadFromFile or the Constructor to load the properties
Example configuration file:
# a file location
file.location=${this.path.string}/another-path/file.extention
# a new classpath
new.classpath=${java.class.path}${path.separator}${this.path.string}
# the cog properties file
cog.home=${globus.home}/cog.properties
| Nested Class Summary | |
static class |
ScopeableProperties.KeyComparator
Trys to convert keys to a number if can't then it compares as String |
| Constructor Summary | |
ScopeableProperties()
|
|
ScopeableProperties(File file)
|
|
ScopeableProperties(File file,
String superKey)
|
|
| Method Summary | |
static List |
createList(Set keys,
String prefix)
|
File |
getFile()
Resturns the file object associated with this Properties |
String |
getProperty(String propertyName)
Override the return of getProperty to the variable's values |
String |
getProperty(String propertyName,
String defaultValue)
Allows a default value to be assciated with the command |
Scope |
getScope()
Returns the scope |
Scope |
getSubScope(String prefix)
|
void |
initScope()
These are the default variables supported ${this.path} -> the path to the directory of this file to add more variables override this method |
Set |
keySet()
|
Set |
keySet(String prefix)
Gets the key set such that includes each key that starts with prefix |
void |
load(InputStream stream)
Just gives a warning and calls the superclass |
void |
loadFromFile(File file)
Loads from a file, if the user does not use this method the value ${this.path} may not be correct |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public ScopeableProperties()
throws IOException,
ScopeException
public ScopeableProperties(File file)
throws IOException,
ScopeException
public ScopeableProperties(File file,
String superKey)
throws IOException,
ScopeException
| Method Detail |
public void load(InputStream stream)
throws IOException
IOException
public void loadFromFile(File file)
throws IOException,
ScopeException
IOException@throws - ScopeExceptio
ScopeExceptionn
IOException
ScopeException
public String getProperty(String propertyName,
String defaultValue)
propertyName - defaultValue -
public String getProperty(String propertyName)
public Set keySet()
public Set keySet(String prefix)
prefix -
public Scope getSubScope(String prefix)
public File getFile()
public Scope getScope()
public void initScope()
throws ScopeException
ScopeException
public static List createList(Set keys,
String prefix)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||