|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.globus.exec.service.exec.utils.FileMappingConfig
Helper class to add, replace, remove map elements from an xml file containing a fileSystemMaps document (typically used with $GLOBUS_LOCATION/etc/gram-service/globus_gram_fS_map_config.xml).
| Field Summary | |
static java.lang.String |
DEFAULT_MAP_FILE
|
private org.w3c.dom.Document |
doc
|
private static java.util.Properties |
env
|
private static java.lang.String |
GLOBUS_HOSTNAME_EXEC
|
private static java.lang.String |
GRAM_NS
|
private static javax.xml.namespace.QName |
MAP_QNAME
|
private java.io.File |
path
|
| Constructor Summary | |
FileMappingConfig(java.io.File config)
Create a new FileMappingConfig for manipulating a map in a file. |
|
| Method Summary | |
void |
addMap(FileSystemMapType map)
Add a map entry for a scheduler. |
private static java.lang.String |
getHostName()
Determine host name for default (grid)ftp server |
private org.w3c.dom.Node |
getOldMap(java.lang.String scheduler)
Get the first mapping for a particular scheduler if present. |
private static void |
loadEnvironment()
Determine environment values |
static void |
main(java.lang.String[] args)
|
void |
removeMap(java.lang.String scheduler)
Remove map entries for the named scheduler. |
void |
replaceMap(FileSystemMapType map)
Replace all existing map entries for this scheduler with the new map. |
(package private) static void |
usage()
Display usage message |
void |
writeConfig()
Replace the config file on disk with the modified map. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private org.w3c.dom.Document doc
private java.io.File path
public static final java.lang.String DEFAULT_MAP_FILE
private static final java.lang.String GLOBUS_HOSTNAME_EXEC
private static java.util.Properties env
private static final java.lang.String GRAM_NS
private static final javax.xml.namespace.QName MAP_QNAME
| Constructor Detail |
public FileMappingConfig(java.io.File config)
throws java.io.FileNotFoundException,
javax.xml.parsers.ParserConfigurationException,
org.xml.sax.SAXException,
java.io.IOException
config - Path to xml file.| Method Detail |
private org.w3c.dom.Node getOldMap(java.lang.String scheduler)
scheduler - Scheduler name to look for.
public void removeMap(java.lang.String scheduler)
throws org.w3c.dom.DOMException
org.w3c.dom.DOMException
public void addMap(FileSystemMapType map)
throws java.io.IOException,
SerializationException
map - FileSystemMapType containing all mappings for the
particular scheduler.
java.io.IOException
SerializationException
public void replaceMap(FileSystemMapType map)
throws java.io.IOException,
SerializationException
map - FileSystemMapType containing all mappings for the
particular scheduler.
java.io.IOException
SerializationException
public void writeConfig()
throws java.io.IOException
java.io.IOExceptionstatic void usage()
private static void loadEnvironment()
throws java.io.IOException
java.io.IOException
private static java.lang.String getHostName()
throws java.io.IOException
java.io.IOExceptionpublic static void main(java.lang.String[] args)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||