public abstract class RrdResourceAttributeUtils extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
RrdResourceAttributeUtils.AlphaNumericOnmsAttributeComparator
Alphanumeric sort that handles substrings with numeric components
|
| Modifier and Type | Field and Description |
|---|---|
static String |
DS_PROPERTIES_FILE
File name to look for in a resource directory for datasource attributes.
|
static String |
STRINGS_PROPERTIES_FILE_NAME
File name to look for in a resource directory for string attributes.
|
| Constructor and Description |
|---|
RrdResourceAttributeUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static Set<OnmsAttribute> |
getAttributesAtRelativePath(File rrdDirectory,
String relativePath,
String rrdFileSuffix)
getAttributesAtRelativePath
|
protected static Properties |
getDsProperties(File directory)
getDsProperties
|
protected static Properties |
getProperties(File file)
getProperties
|
protected static File |
getRrdFileForDs(File directory,
String ds,
String extension)
getRrdFileForDs
|
protected static Properties |
getStringProperties(File rrdDirectory,
String relativePath)
getStringProperties
|
protected static String |
getStringProperty(File directory,
String key)
getStringProperty
|
protected static void |
saveUpdatedProperties(File propertiesFile,
Properties props)
saveUpdatedProperties
|
protected static void |
updateDsProperties(File resourceDir,
Map<String,String> dsNamesToRrdNames)
updateDsProperties
|
protected static void |
updateStringProperty(File resourceDir,
String attrVal,
String attrName)
updateStringProperty
|
public static final String DS_PROPERTIES_FILE
public static final String STRINGS_PROPERTIES_FILE_NAME
protected static Set<OnmsAttribute> getAttributesAtRelativePath(File rrdDirectory, String relativePath, String rrdFileSuffix)
getAttributesAtRelativePath
protected static Properties getDsProperties(File directory)
getDsProperties
directory - a File object.Properties object.protected static File getRrdFileForDs(File directory, String ds, String extension)
getRrdFileForDs
protected static Properties getStringProperties(File rrdDirectory, String relativePath)
getStringProperties
rrdDirectory - a File object.relativePath - a String object.Properties object.protected static Properties getProperties(File file)
getProperties
file - a File object.Properties object.protected static void saveUpdatedProperties(File propertiesFile, Properties props) throws FileNotFoundException, IOException
saveUpdatedProperties
propertiesFile - a File object.props - a Properties object.FileNotFoundException - if any.IOException - if any.protected static void updateDsProperties(File resourceDir, Map<String,String> dsNamesToRrdNames)
updateDsProperties
protected static void updateStringProperty(File resourceDir, String attrVal, String attrName) throws FileNotFoundException, IOException
updateStringProperty
resourceDir - a File object.attrVal - a String object.attrName - a String object.FileNotFoundException - if any.IOException - if any.Copyright © 2022. All rights reserved.