org.opennms.netmgt.config
Class DestinationPathManager
java.lang.Object
org.opennms.netmgt.config.DestinationPathManager
- Direct Known Subclasses:
- DestinationPathFactory
public abstract class DestinationPathManager
- extends Object
- Author:
- David Hustace
|
Method Summary |
void |
addPath(org.opennms.netmgt.config.destinationPaths.Path newPath)
|
org.opennms.netmgt.config.destinationPaths.Path |
getPath(String pathName)
|
Map<String,org.opennms.netmgt.config.destinationPaths.Path> |
getPaths()
|
Collection<String> |
getTargetCommands(org.opennms.netmgt.config.destinationPaths.Path path,
int index,
String target)
|
org.opennms.netmgt.config.destinationPaths.Target[] |
getTargetList(int index,
org.opennms.netmgt.config.destinationPaths.Path path)
|
protected void |
parseXML(Reader reader)
|
boolean |
pathHasTarget(org.opennms.netmgt.config.destinationPaths.Path path,
String target)
|
void |
removePath(org.opennms.netmgt.config.destinationPaths.Path path)
Removes a Path from the xml file. |
void |
removePath(String name)
Removes a Path form the xml file based on its name |
void |
replacePath(String oldName,
org.opennms.netmgt.config.destinationPaths.Path newPath)
|
void |
saveCurrent()
|
protected abstract void |
saveXML(String writerString)
|
abstract void |
update()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
configIn
protected InputStream configIn
DestinationPathManager
public DestinationPathManager()
parseXML
protected void parseXML(Reader reader)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Parameters:
reader -
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
getPath
public org.opennms.netmgt.config.destinationPaths.Path getPath(String pathName)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
getPaths
public Map<String,org.opennms.netmgt.config.destinationPaths.Path> getPaths()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
getTargetCommands
public Collection<String> getTargetCommands(org.opennms.netmgt.config.destinationPaths.Path path,
int index,
String target)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
getTargetList
public org.opennms.netmgt.config.destinationPaths.Target[] getTargetList(int index,
org.opennms.netmgt.config.destinationPaths.Path path)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
pathHasTarget
public boolean pathHasTarget(org.opennms.netmgt.config.destinationPaths.Path path,
String target)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
addPath
public void addPath(org.opennms.netmgt.config.destinationPaths.Path newPath)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
replacePath
public void replacePath(String oldName,
org.opennms.netmgt.config.destinationPaths.Path newPath)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
removePath
public void removePath(org.opennms.netmgt.config.destinationPaths.Path path)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
- Removes a Path from the xml file.
- Parameters:
path - the path to remove
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
removePath
public void removePath(String name)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
- Removes a Path form the xml file based on its name
- Parameters:
name - the name of the path to remove
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
saveCurrent
public void saveCurrent()
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
saveXML
protected abstract void saveXML(String writerString)
throws IOException
- Parameters:
writerString -
- Throws:
IOException
update
public abstract void update()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
FileNotFoundException
- Throws:
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
FileNotFoundException
Copyright ? 2007. All Rights Reserved.