org.opennms.netmgt.config
Class DestinationPathManager

java.lang.Object
  extended by org.opennms.netmgt.config.DestinationPathManager
Direct Known Subclasses:
DestinationPathFactory

public abstract class DestinationPathManager
extends Object

Abstract DestinationPathManager class.

Version:
$Id: $
Author:
David Hustace

Field Summary
protected  InputStream configIn
           
 
Constructor Summary
DestinationPathManager()
           
 
Method Summary
 void addPath(Path newPath)
          addPath
 Path getPath(String pathName)
          getPath
 Map<String,Path> getPaths()
          getPaths
 Collection<String> getTargetCommands(Path path, int index, String target)
          getTargetCommands
 Target[] getTargetList(int index, Path path)
          getTargetList
protected  void parseXML(InputStream stream)
          parseXML
protected  void parseXML(Reader reader)
          Deprecated. 
 boolean pathHasTarget(Path path, String target)
          pathHasTarget
 void removePath(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, Path newPath)
          replacePath
 void saveCurrent()
          saveCurrent
protected abstract  void saveXML(String writerString)
          saveXML
abstract  void update()
          update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

configIn

protected InputStream configIn
Constructor Detail

DestinationPathManager

public DestinationPathManager()
Method Detail

parseXML

@Deprecated
protected void parseXML(Reader reader)
                 throws org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException
Deprecated. 

parseXML

Parameters:
reader - a Reader object.
Throws:
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

parseXML

protected void parseXML(InputStream stream)
                 throws org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException

parseXML

Parameters:
stream - a InputStream object.
Throws:
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

getPath

public Path getPath(String pathName)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException

getPath

Parameters:
pathName - a String object.
Returns:
a Path object.
Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

getPaths

public Map<String,Path> getPaths()
                          throws IOException,
                                 org.exolab.castor.xml.MarshalException,
                                 org.exolab.castor.xml.ValidationException

getPaths

Returns:
a Map object.
Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

getTargetCommands

public Collection<String> getTargetCommands(Path path,
                                            int index,
                                            String target)
                                     throws IOException,
                                            org.exolab.castor.xml.MarshalException,
                                            org.exolab.castor.xml.ValidationException

getTargetCommands

Parameters:
path - a Path object.
index - a int.
target - a String object.
Returns:
a Collection object.
Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

getTargetList

public Target[] getTargetList(int index,
                              Path path)
                       throws IOException,
                              org.exolab.castor.xml.MarshalException,
                              org.exolab.castor.xml.ValidationException

getTargetList

Parameters:
index - a int.
path - a Path object.
Returns:
an array of Target objects.
Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

pathHasTarget

public boolean pathHasTarget(Path path,
                             String target)
                      throws IOException,
                             org.exolab.castor.xml.MarshalException,
                             org.exolab.castor.xml.ValidationException

pathHasTarget

Parameters:
path - a Path object.
target - a String object.
Returns:
a boolean.
Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.

addPath

public void addPath(Path newPath)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException,
                    IOException

addPath

Parameters:
newPath - a Path object.
Throws:
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.

replacePath

public void replacePath(String oldName,
                        Path newPath)
                 throws org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException,
                        IOException

replacePath

Parameters:
oldName - a String object.
newPath - a Path object.
Throws:
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.

removePath

public void removePath(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
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.

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
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.

saveCurrent

public void saveCurrent()
                 throws org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException,
                        IOException

saveCurrent

Throws:
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.

saveXML

protected abstract void saveXML(String writerString)
                         throws IOException

saveXML

Parameters:
writerString - a String object.
Throws:
IOException - if any.

update

public abstract void update()
                     throws IOException,
                            org.exolab.castor.xml.MarshalException,
                            org.exolab.castor.xml.ValidationException,
                            FileNotFoundException

update

Throws:
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
FileNotFoundException - if any.


Copyright © 2011. All Rights Reserved.