com.ibm.mfp.server.security.external.checks.impl
Class SecurityCheckConfigurationBase
- java.lang.Object
-
- com.ibm.mfp.server.security.external.checks.impl.SecurityCheckConfigurationBase
-
- All Implemented Interfaces:
- SecurityCheckConfiguration
- Direct Known Subclasses:
- ExternalizableSecurityCheckConfig
public abstract class SecurityCheckConfigurationBase extends java.lang.Object implements SecurityCheckConfiguration
Convenience base class for implementations of SecurityCheckConfiguration
-
-
Field Summary
Fields Modifier and Type Field and Description protected java.util.Map
errors
protected java.util.Map
info
protected java.util.Map
warnings
-
Constructor Summary
Constructors Constructor and Description SecurityCheckConfigurationBase()
-
Method Summary
Methods Modifier and Type Method and Description protected void
addMessage(java.util.Map map, java.lang.String property, java.lang.String msg)
java.util.Map
getErrors()
Get validation errors as a map with property name as key and error message as valuejava.util.Map
getInfo()
Get validation warnings as a map with property name as key and warning message as valueprotected int
getIntProperty(java.lang.String name, java.util.Properties properties, java.lang.Integer defaultValue)
Find property with the given name in Properties and convert it to int.protected java.lang.String
getStringProperty(java.lang.String name, java.util.Properties properties, java.lang.String defaultValue)
Find property with the given name in Properties.java.util.Map
getWarnings()
Get validation warnings as a map with property name as key and warning message as value-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.ibm.mfp.server.security.external.checks.SecurityCheckConfiguration
validateExpirationLimit
-
-
-
-
Field Detail
-
errors
protected java.util.Map errors
-
warnings
protected java.util.Map warnings
-
info
protected java.util.Map info
-
-
Method Detail
-
getErrors
public java.util.Map getErrors()
Description copied from interface:SecurityCheckConfiguration
Get validation errors as a map with property name as key and error message as value- Specified by:
getErrors
in interfaceSecurityCheckConfiguration
- Returns:
- validation errors, may be null
-
getWarnings
public java.util.Map getWarnings()
Description copied from interface:SecurityCheckConfiguration
Get validation warnings as a map with property name as key and warning message as value- Specified by:
getWarnings
in interfaceSecurityCheckConfiguration
- Returns:
- validation warnings, may be null
-
getInfo
public java.util.Map getInfo()
Description copied from interface:SecurityCheckConfiguration
Get validation warnings as a map with property name as key and warning message as value- Specified by:
getInfo
in interfaceSecurityCheckConfiguration
- Returns:
- validation warnings, may be null
-
getStringProperty
protected java.lang.String getStringProperty(java.lang.String name, java.util.Properties properties, java.lang.String defaultValue)
Find property with the given name in Properties. If the property exists, it is removed from input Properties to allow tracking unused properties. If the property does not exist and the default value is not null, a "missing property" warning is reported, and the default is returned as a result If the property does not exist and the default value is null, a "missing property" error is reported.- Parameters:
name
- the property nameproperties
- the properties to get from, modified by the methoddefaultValue
- the value to return if the property does not exist, null means the property is mandatory- Returns:
- property value if the property exists. If the property does not exist - default value if provided, null otherwise
-
getIntProperty
protected int getIntProperty(java.lang.String name, java.util.Properties properties, java.lang.Integer defaultValue)
Find property with the given name in Properties and convert it to int. If the property exists, it is removed from input Properties to allow tracking unused properties. If the value cannot be converted to int, an "invalid value" error is reported If the property does not exist and the default value is not null, a "missing property" warning is reported, and the default is returned as a result If the property does not exist and the default value is null, a "missing property" error is reported.- Parameters:
name
- the property nameproperties
- the properties to get from, modified by the methoddefaultValue
- the value to return if the property does not exist, null means the property is mandatory- Returns:
- property value if the property exists. If the property does not exist - default value if provided, -1 otherwise
-
addMessage
protected void addMessage(java.util.Map map, java.lang.String property, java.lang.String msg)
-
-