org.opennms.netmgt.config
Class DestinationPathManager
java.lang.Object
org.opennms.netmgt.config.DestinationPathManager
- Direct Known Subclasses:
- DestinationPathFactory
public abstract class DestinationPathManager
- extends java.lang.Object
- Author:
- David Hustace
|
Field Summary |
protected java.io.InputStream |
configIn
|
|
Method Summary |
void |
addPath(org.opennms.netmgt.config.destinationPaths.Path newPath)
|
org.opennms.netmgt.config.destinationPaths.Path |
getPath(java.lang.String pathName)
|
java.util.Map<java.lang.String,org.opennms.netmgt.config.destinationPaths.Path> |
getPaths()
|
java.util.Collection<java.lang.String> |
getTargetCommands(org.opennms.netmgt.config.destinationPaths.Path path,
int index,
java.lang.String target)
|
org.opennms.netmgt.config.destinationPaths.Target[] |
getTargetList(int index,
org.opennms.netmgt.config.destinationPaths.Path path)
|
protected void |
parseXML(java.io.Reader reader)
|
boolean |
pathHasTarget(org.opennms.netmgt.config.destinationPaths.Path path,
java.lang.String target)
|
void |
removePath(org.opennms.netmgt.config.destinationPaths.Path path)
Removes a Path from the xml file. |
void |
removePath(java.lang.String name)
Removes a Path form the xml file based on its name |
void |
replacePath(java.lang.String oldName,
org.opennms.netmgt.config.destinationPaths.Path newPath)
|
void |
saveCurrent()
|
protected abstract void |
saveXML(java.lang.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 java.io.InputStream configIn
DestinationPathManager
public DestinationPathManager()
parseXML
protected void parseXML(java.io.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(java.lang.String pathName)
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
getPaths
public java.util.Map<java.lang.String,org.opennms.netmgt.config.destinationPaths.Path> getPaths()
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
getTargetCommands
public java.util.Collection<java.lang.String> getTargetCommands(org.opennms.netmgt.config.destinationPaths.Path path,
int index,
java.lang.String target)
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
java.io.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 java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
pathHasTarget
public boolean pathHasTarget(org.opennms.netmgt.config.destinationPaths.Path path,
java.lang.String target)
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
- Throws:
java.io.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,
java.io.IOException
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.io.IOException
replacePath
public void replacePath(java.lang.String oldName,
org.opennms.netmgt.config.destinationPaths.Path newPath)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
java.io.IOException
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.io.IOException
removePath
public void removePath(org.opennms.netmgt.config.destinationPaths.Path path)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
java.io.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
java.io.IOException
removePath
public void removePath(java.lang.String name)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
java.io.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
java.io.IOException
saveCurrent
public void saveCurrent()
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
java.io.IOException
- Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.io.IOException
saveXML
protected abstract void saveXML(java.lang.String writerString)
throws java.io.IOException
- Parameters:
writerString -
- Throws:
java.io.IOException
update
public abstract void update()
throws java.io.IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
java.io.FileNotFoundException
- Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
java.io.FileNotFoundException
Copyright © 2007. All Rights Reserved.