Class UpkeepConfigUtils
- java.lang.Object
-
- edu.uiuc.ncsa.security.util.configuration.XMLConfigUtil
-
- edu.uiuc.ncsa.security.storage.monitored.upkeep.UpkeepConfigUtils
-
- All Implemented Interfaces:
TimeConstants
public class UpkeepConfigUtils extends XMLConfigUtil
Utilities for processing upkeep configurations found in a server configuration file.Created by Jeff Gaynor
on 2/15/24 at 1:21 PM
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class edu.uiuc.ncsa.security.util.configuration.XMLConfigUtil
XMLConfigUtil.TimeThingy
-
-
Field Summary
Fields Modifier and Type Field Description static longDATE_NO_VALUEstatic StringDATE_TAGstatic StringDATE_TYPEstatic StringDATE_VALUEstatic StringDATE_WHENstatic StringID_NOT_FLAGstatic StringID_REGEX_FLAGstatic StringID_TAGstatic StringRULE_ACTIONstatic StringRULE_ENABLEDstatic StringRULE_EXTENDSstatic StringRULE_NAMEstatic StringRULE_SKIP_COLLATERALSkip the update hooks, i.e., have no collateral damage from the rule.static StringRULE_SKIP_VERSIONSstatic StringRULE_TAGstatic StringUPKEEP_ALARMSstatic StringUPKEEP_DEBUGstatic LongUPKEEP_DEFAULT_INTERVALstatic intUPKEEP_DEFAULT_RUN_COUNTstatic StringUPKEEP_ENABLEDstatic StringUPKEEP_INTERVALstatic StringUPKEEP_OUTPUTstatic StringUPKEEP_RUN_COUNTstatic StringUPKEEP_TAGstatic StringUPKEEP_TEST_ONLYstatic StringUPKEEP_VERBOSE-
Fields inherited from interface edu.uiuc.ncsa.security.util.configuration.TimeConstants
ONE_DAY, ONE_HOUR, ONE_MINUTES, ONE_MONTH, ONE_WEEK, ONE_YEAR, SECONDS, UNITS__WEEK, UNITS_DAYS, UNITS_DAYS_LONG, UNITS_HOURS, UNITS_HOURS_LONG, UNITS_MILLISECOND_LONG, UNITS_MILLISECOND_MULTIPLIER, UNITS_MILLISECONDS, UNITS_MINUTES, UNITS_MINUTES_LONG, UNITS_MINUTES_LONG2, UNITS_MONTHS, UNITS_MONTHS_LONG, UNITS_SECONDS, UNITS_SECONDS_LONG, UNITS_SECONDS_LONG2, UNITS_WEEK_LONG, UNITS_YEARS, UNITS_YEARS_LONG
-
-
Constructor Summary
Constructors Constructor Description UpkeepConfigUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static DateValuecreateDateValue(String rawDate)protected static RuleEntrycreateRuleEntry(CFNode ruleEntryNode)protected static RuleEntrycreateRuleEntry(org.apache.commons.configuration.tree.ConfigurationNode ruleEntryNode)protected static RuleListdoExtension(RuleList sourceRL, RuleList targetRL)Takes the attributes and rules of the source rule list = parent and overwrites targetRL.protected static BooleandoSkipCollateral(CFNode node)protected static BooleandoSkipCollateral(org.apache.commons.configuration.tree.ConfigurationNode node)protected static BooleandoSkipVersions(CFNode node)protected static BooleandoSkipVersions(org.apache.commons.configuration.tree.ConfigurationNode node)static Collection<LocalTime>getAlarms(CFNode node, String tag)static Collection<LocalTime>getAlarms(String raw)static Collection<LocalTime>getAlarms(org.apache.commons.configuration.tree.ConfigurationNode node, String tag)protected static StringgetRandomRuleName()protected static List<Monitored>getTestList(List<String> actionList)static voidmain(String[] args)static UpkeepConfigurationprocessUpkeep(CFNode upkeepNode)Port to use CFNodestatic UpkeepConfigurationprocessUpkeep(org.apache.commons.configuration.tree.ConfigurationNode upkeepNode)Processes the XML configuration and returns theUpkeepConfigurationfor the given store.-
Methods inherited from class edu.uiuc.ncsa.security.util.configuration.XMLConfigUtil
createTimeThingy, findConfiguration, findMultiNode, findNamedConfig, getConfigurations2, getMultiplier, getValueSecsOrMillis, getValueSecsOrMillis, NEWcreateTimeThingy, splitNumber
-
-
-
-
Field Detail
-
UPKEEP_TAG
public static final String UPKEEP_TAG
- See Also:
- Constant Field Values
-
UPKEEP_INTERVAL
public static final String UPKEEP_INTERVAL
- See Also:
- Constant Field Values
-
UPKEEP_ALARMS
public static final String UPKEEP_ALARMS
- See Also:
- Constant Field Values
-
UPKEEP_TEST_ONLY
public static final String UPKEEP_TEST_ONLY
- See Also:
- Constant Field Values
-
UPKEEP_DEBUG
public static final String UPKEEP_DEBUG
- See Also:
- Constant Field Values
-
UPKEEP_ENABLED
public static final String UPKEEP_ENABLED
- See Also:
- Constant Field Values
-
UPKEEP_DEFAULT_INTERVAL
public static final Long UPKEEP_DEFAULT_INTERVAL
-
UPKEEP_DEFAULT_RUN_COUNT
public static final int UPKEEP_DEFAULT_RUN_COUNT
- See Also:
- Constant Field Values
-
UPKEEP_VERBOSE
public static final String UPKEEP_VERBOSE
- See Also:
- Constant Field Values
-
UPKEEP_OUTPUT
public static final String UPKEEP_OUTPUT
- See Also:
- Constant Field Values
-
UPKEEP_RUN_COUNT
public static final String UPKEEP_RUN_COUNT
- See Also:
- Constant Field Values
-
RULE_TAG
public static final String RULE_TAG
- See Also:
- Constant Field Values
-
RULE_NAME
public static final String RULE_NAME
- See Also:
- Constant Field Values
-
RULE_ACTION
public static final String RULE_ACTION
- See Also:
- Constant Field Values
-
RULE_ENABLED
public static final String RULE_ENABLED
- See Also:
- Constant Field Values
-
RULE_EXTENDS
public static final String RULE_EXTENDS
- See Also:
- Constant Field Values
-
RULE_SKIP_VERSIONS
public static final String RULE_SKIP_VERSIONS
- See Also:
- Constant Field Values
-
RULE_SKIP_COLLATERAL
public static final String RULE_SKIP_COLLATERAL
Skip the update hooks, i.e., have no collateral damage from the rule.- See Also:
- Constant Field Values
-
ID_TAG
public static final String ID_TAG
- See Also:
- Constant Field Values
-
ID_REGEX_FLAG
public static final String ID_REGEX_FLAG
- See Also:
- Constant Field Values
-
ID_NOT_FLAG
public static final String ID_NOT_FLAG
- See Also:
- Constant Field Values
-
DATE_TAG
public static final String DATE_TAG
- See Also:
- Constant Field Values
-
DATE_TYPE
public static final String DATE_TYPE
- See Also:
- Constant Field Values
-
DATE_WHEN
public static final String DATE_WHEN
- See Also:
- Constant Field Values
-
DATE_VALUE
public static final String DATE_VALUE
- See Also:
- Constant Field Values
-
DATE_NO_VALUE
public static final long DATE_NO_VALUE
- See Also:
- Constant Field Values
-
-
Method Detail
-
processUpkeep
public static UpkeepConfiguration processUpkeep(org.apache.commons.configuration.tree.ConfigurationNode upkeepNode)
Processes the XML configuration and returns theUpkeepConfigurationfor the given store.- Parameters:
upkeepNode-- Returns:
-
processUpkeep
public static UpkeepConfiguration processUpkeep(CFNode upkeepNode)
Port to use CFNode- Parameters:
upkeepNode-- Returns:
-
doSkipVersions
protected static Boolean doSkipVersions(org.apache.commons.configuration.tree.ConfigurationNode node)
-
doSkipCollateral
protected static Boolean doSkipCollateral(org.apache.commons.configuration.tree.ConfigurationNode node)
-
doExtension
protected static RuleList doExtension(RuleList sourceRL, RuleList targetRL)
Takes the attributes and rules of the source rule list = parent and overwrites targetRL.- Parameters:
sourceRL-targetRL-
-
getRandomRuleName
protected static String getRandomRuleName()
-
createRuleEntry
protected static RuleEntry createRuleEntry(org.apache.commons.configuration.tree.ConfigurationNode ruleEntryNode)
-
main
public static void main(String[] args)
-
getAlarms
public static Collection<LocalTime> getAlarms(org.apache.commons.configuration.tree.ConfigurationNode node, String tag)
-
getAlarms
public static Collection<LocalTime> getAlarms(CFNode node, String tag)
-
getAlarms
public static Collection<LocalTime> getAlarms(String raw)
-
-