OpenNMS API 1.2.9

## org.opennms.netmgt.utils
Class RrdFileConstants

    java.lang.Object
      org.opennms.netmgt.utils.RrdFileConstants

public class RrdFileConstants
extends java.lang.Object

A convenience class containing RRD file and directory related constants.

Author:
  Mike Davidson , Lawrence Karnowski

Field Summary
`static java.io.FileFilter` `INTERFACE_DIRECTORY_FILTER` Convenience filter that matches directories with RRD files in them.
`static int` `MAX_RRD_FILENAME_LENGTH` The longest an RRD filename can be, currently 1024 characters.
`static java.io.FileFilter` `NODE_DIRECTORY_FILTER` Convenience filter that matches integer-named directories that either contain RRD files or directories that contain RRD files.
`static java.io.FilenameFilter` `RRD_FILENAME_FILTER` Convenience filter that matches only RRD files.
`static java.lang.String` `RRD_SUFFIX` Suffix common to all RRD filenames.

Constructor Summary
`RrdFileConstants()`

Method Summary
`static java.lang.String` `convertToValidRrdName(java.lang.String rrd)` Note this method will not handle references to higher directories ("..").
`static boolean` `isValidRRDInterfaceDir(java.io.File file)`
`static boolean` `isValidRRDLatencyDir(java.io.File file)` Determines if the provided File object represents a valid RRD latency directory.
`static boolean` `isValidRRDName(java.lang.String rrd)` Checks an RRD filename to make sure it is of the proper length and does not contain any unexpected charaters.
`static boolean` `isValidRRDNodeDir(java.io.File file)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### MAX_RRD_FILENAME_LENGTH

    public static final int MAX_RRD_FILENAME_LENGTH

  The longest an RRD filename can be, currently 1024 characters.

  See Also:
    Constant Field Values

### RRD_SUFFIX

    public static final java.lang.String RRD_SUFFIX

  Suffix common to all RRD filenames.

  See Also:
    Constant Field Values

### RRD_FILENAME_FILTER

    public static final java.io.FilenameFilter RRD_FILENAME_FILTER

  Convenience filter that matches only RRD files.

### INTERFACE_DIRECTORY_FILTER

    public static final java.io.FileFilter INTERFACE_DIRECTORY_FILTER

  Convenience filter that matches directories with RRD files in them.

### NODE_DIRECTORY_FILTER

    public static final java.io.FileFilter NODE_DIRECTORY_FILTER

  Convenience filter that matches integer-named directories that either contain RRD files or directories that contain RRD files.

Constructor Detail

### RrdFileConstants

    public RrdFileConstants()

Method Detail

### isValidRRDNodeDir

    public static final boolean isValidRRDNodeDir(java.io.File file)

### isValidRRDInterfaceDir

    public static final boolean isValidRRDInterfaceDir(java.io.File file)

### isValidRRDLatencyDir

    public static final boolean isValidRRDLatencyDir(java.io.File file)

  Determines if the provided File object represents a valid RRD latency directory.

### isValidRRDName

    public static boolean isValidRRDName(java.lang.String rrd)

  Checks an RRD filename to make sure it is of the proper length and does not contain any unexpected charaters. The maximum length is specified by the `MAX_RRD_FILENAME_LENGTH`constant. The only valid characters are letters (A-Z and a-z), numbers (0-9), dashes (-), dots (.), and underscores (_). These precautions are necessary since the RRD filename is used on the commandline and specified in the graph URL.

### convertToValidRrdName

    public static java.lang.String convertToValidRrdName(java.lang.String rrd)

  Note this method will not handle references to higher directories ("..").

OpenNMS API 1.2.9

Generated by ranger on May 19 2007 2335.