Package org.opennms.netmgt.model
Class ResourceTypeUtils
- java.lang.Object
-
- org.opennms.netmgt.model.ResourceTypeUtils
-
public abstract class ResourceTypeUtils extends java.lang.Object
ResourceTypeUtils class.
-
-
Field Summary
Fields Modifier and Type Field Description static java.io.File
DEFAULT_RRD_ROOT
Default folder where RRD files are stored.static java.lang.String
FOREIGN_SOURCE_DIRECTORY
Directory name of where stored-by-foreign-source data is stored.static java.lang.String
RESPONSE_DIRECTORY
Directory name of where latency data is stored.static java.lang.String
SNMP_DIRECTORY
Directory name of where all other collected data is stored.
-
Constructor Summary
Constructors Constructor Description ResourceTypeUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String[]
getFsAndFidFromNodeSource(java.lang.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 java.io.File
getRelativeNodeSourceDirectory(java.lang.String nodeSource)
static ResourcePath
getResourcePathWithRepository(RrdRepository repository, ResourcePath resource)
Retrieves the ResourcePath relative to rrd.base.dir.static boolean
isResponseTime(java.lang.String relativePath)
isResponseTimestatic boolean
isStoreByForeignSource()
isStoreByForeignSourcestatic boolean
isStoreByGroup()
isStoreByGroup
-
-
-
Field Detail
-
DEFAULT_RRD_ROOT
public static final java.io.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 java.lang.String RESPONSE_DIRECTORY
Directory name of where latency data is stored.- See Also:
- Constant Field Values
-
SNMP_DIRECTORY
public static final java.lang.String SNMP_DIRECTORY
Directory name of where all other collected data is stored.- See Also:
- Constant Field Values
-
FOREIGN_SOURCE_DIRECTORY
public static final java.lang.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(java.lang.String relativePath)
isResponseTime
- Parameters:
relativePath
- aString
object.- Returns:
- a boolean.
-
getRelativeNodeSourceDirectory
public static java.io.File getRelativeNodeSourceDirectory(java.lang.String nodeSource)
- Parameters:
nodeSource
- aString
object.- Returns:
- a
File
object.
-
getFsAndFidFromNodeSource
public static java.lang.String[] getFsAndFidFromNodeSource(java.lang.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.
-
-