Package org.opennms.netmgt.model
Class ResourceTypeUtils
- java.lang.Object
-
- org.opennms.netmgt.model.ResourceTypeUtils
-
public abstract class ResourceTypeUtils extends Object
ResourceTypeUtils class.
-
-
Field Summary
Fields Modifier and Type Field Description static File
DEFAULT_RRD_ROOT
Default folder where RRD files are stored.static String
FOREIGN_SOURCE_DIRECTORY
Directory name of where stored-by-foreign-source data is stored.static String
RESPONSE_DIRECTORY
Directory name of where latency data is stored.static String
SNMP_DIRECTORY
Directory name of where all other collected data is stored.static String
STATUS_DIRECTORY
Directory name of where status data is stored.
-
Constructor Summary
Constructors Constructor Description ResourceTypeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static String[]
getFsAndFidFromNodeSource(String nodeSource)
static OnmsNode
getNodeFromResource(OnmsResource resource)
Convenience method for retrieving the OnmsNode entity from an abstract resource.static OnmsNode
getNodeFromResourceRoot(OnmsResource resource)
Convenience method for retrieving the OnmsNode entity from an abstract resource's ancestor.static File
getRelativeNodeSourceDirectory(String nodeSource)
static ResourcePath
getResourcePathWithRepository(RrdRepository repository, ResourcePath resource)
Retrieves the ResourcePath relative to rrd.base.dir.static boolean
isResponseTime(String relativePath)
isResponseTimestatic boolean
isStatus(String relativePath)
static boolean
isStoreByForeignSource()
isStoreByForeignSourcestatic boolean
isStoreByGroup()
isStoreByGroup
-
-
-
Field Detail
-
DEFAULT_RRD_ROOT
public static final File DEFAULT_RRD_ROOT
Default folder where RRD files are stored. Working directory defaults to $OPENNMS_HOME, so we can find these in $OPENNMS_HOME/share/rrd.
-
RESPONSE_DIRECTORY
public static final String RESPONSE_DIRECTORY
Directory name of where latency data is stored.- See Also:
- Constant Field Values
-
STATUS_DIRECTORY
public static final String STATUS_DIRECTORY
Directory name of where status data is stored.- See Also:
- Constant Field Values
-
SNMP_DIRECTORY
public static final String SNMP_DIRECTORY
Directory name of where all other collected data is stored.- See Also:
- Constant Field Values
-
FOREIGN_SOURCE_DIRECTORY
public static final String FOREIGN_SOURCE_DIRECTORY
Directory name of where stored-by-foreign-source data is stored.- See Also:
- Constant Field Values
-
-
Method Detail
-
isStoreByGroup
public static boolean isStoreByGroup()
isStoreByGroup
- Returns:
- a boolean.
-
isStoreByForeignSource
public static boolean isStoreByForeignSource()
isStoreByForeignSource
- Returns:
- a boolean.
-
isResponseTime
public static boolean isResponseTime(String relativePath)
isResponseTime
- Parameters:
relativePath
- aString
object.- Returns:
- a boolean.
-
isStatus
public static boolean isStatus(String relativePath)
-
getRelativeNodeSourceDirectory
public static File getRelativeNodeSourceDirectory(String nodeSource)
-
getNodeFromResource
public static OnmsNode getNodeFromResource(OnmsResource resource)
Convenience method for retrieving the OnmsNode entity from an abstract resource.- Throws:
org.springframework.orm.ObjectRetrievalFailureException
- on failure
-
getNodeFromResourceRoot
public static OnmsNode getNodeFromResourceRoot(OnmsResource resource)
Convenience method for retrieving the OnmsNode entity from an abstract resource's ancestor.- Throws:
org.springframework.orm.ObjectRetrievalFailureException
- on failure
-
getResourcePathWithRepository
public static ResourcePath getResourcePathWithRepository(RrdRepository repository, ResourcePath resource)
Retrieves the ResourcePath relative to rrd.base.dir.
-
-