OpenNMS API 1.1.4

org.opennms.netmgt.config
Class DestinationPathFactory

java.lang.Object
  extended byorg.opennms.netmgt.config.DestinationPathFactory

public class DestinationPathFactory
extends java.lang.Object


Field Summary
private static DestinationPaths allPaths
           
protected static java.io.InputStream configIn
           
private static boolean initialized
          Boolean indicating if the init() method has been called
private static DestinationPathFactory instance
           
private static java.util.Map m_destinationPaths
           
private static long m_lastModified
           
private static java.io.File m_notifConfFile
           
private static java.io.File m_pathsConfFile
           
private static Header oldHeader
           
 
Constructor Summary
private DestinationPathFactory()
           
 
Method Summary
 void addPath(Path newPath)
           
static DestinationPathFactory getInstance()
           
 Path getPath(java.lang.String pathName)
           
 java.util.Map getPaths()
           
 java.util.Collection getTargetCommands(Path path, int index, java.lang.String target)
           
 Target[] getTargetList(int index, Path path)
           
static void init()
           
 boolean pathHasTarget(Path path, java.lang.String target)
           
private  Header rebuildHeader()
           
static void reload()
           
 void removePath(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, Path newPath)
           
 void saveCurrent()
           
private static void updateFromFile()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

allPaths

private static DestinationPaths allPaths

instance

private static DestinationPathFactory instance

m_destinationPaths

private static java.util.Map m_destinationPaths

m_notifConfFile

private static java.io.File m_notifConfFile

configIn

protected static java.io.InputStream configIn

initialized

private static boolean initialized
Boolean indicating if the init() method has been called


oldHeader

private static Header oldHeader

m_pathsConfFile

private static java.io.File m_pathsConfFile

m_lastModified

private static long m_lastModified
Constructor Detail

DestinationPathFactory

private DestinationPathFactory()
Method Detail

init

public static void init()
                 throws java.io.IOException,
                        java.io.FileNotFoundException,
                        org.exolab.castor.xml.MarshalException,
                        org.exolab.castor.xml.ValidationException
Throws:
java.io.IOException
java.io.FileNotFoundException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

getInstance

public static DestinationPathFactory getInstance()

reload

public static void reload()
                   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

getPath

public 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 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 getTargetCommands(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 Target[] getTargetList(int index,
                              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(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(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,
                        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(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

rebuildHeader

private Header rebuildHeader()

updateFromFile

private static void updateFromFile()
                            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

OpenNMS API 1.1.4

Generated by eevans on November 12 2004 1715.