Package org.opends.server.extensions
Class EntryCacheCommon.ConfigErrorHandler
- java.lang.Object
-
- org.opends.server.extensions.EntryCacheCommon.ConfigErrorHandler
-
- Enclosing class:
- EntryCacheCommon
public static class EntryCacheCommon.ConfigErrorHandler extends Object
Error handler used by local methods to report configuration error. The error handler simplifies the code of initializeEntryCache(), isConfigurationChangeAcceptable() and applyConfigurationChanges() methods.
-
-
Constructor Summary
Constructors Constructor Description ConfigErrorHandler(EntryCacheCommon.ConfigPhase configPhase, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons, List<org.forgerock.i18n.LocalizableMessage> errorMessages)Create an error handler.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description EntryCacheCommon.ConfigPhasegetConfigPhase()Get the current configuration phase.List<org.forgerock.i18n.LocalizableMessage>getErrorMessages()Get the current error messages.booleangetIsAcceptable()Get the current isAcceptable flag.booleangetIsAdminActionRequired()Get the current isAdminActionRequired flag as determined after apply action has been taken on a given configuration.ResultCodegetResultCode()Get the current result code that was elaborated right after a configuration has been applied.List<org.forgerock.i18n.LocalizableMessage>getUnacceptableReasons()Get the current unacceptable reasons.voidreportError(org.forgerock.i18n.LocalizableMessage error, boolean isAcceptable, ResultCode resultCode)Report an error.voidreportError(org.forgerock.i18n.LocalizableMessage error, boolean isAcceptable, ResultCode resultCode, boolean isAdminActionRequired)Report an error.
-
-
-
Constructor Detail
-
ConfigErrorHandler
public ConfigErrorHandler(EntryCacheCommon.ConfigPhase configPhase, List<org.forgerock.i18n.LocalizableMessage> unacceptableReasons, List<org.forgerock.i18n.LocalizableMessage> errorMessages)
Create an error handler.- Parameters:
configPhase- the configuration phase for which the error handler is usedunacceptableReasons- the reasons why the configuration cannot be applied (during PHASE_ACCEPTABLE phase)errorMessages- the errors found when applying a new configuration (during PHASE_APPLY phase)
-
-
Method Detail
-
reportError
public void reportError(org.forgerock.i18n.LocalizableMessage error, boolean isAcceptable, ResultCode resultCode)Report an error.- Parameters:
error- the error to reportisAcceptable-trueif the configuration is acceptableresultCode- the change result for the current configuration
-
reportError
public void reportError(org.forgerock.i18n.LocalizableMessage error, boolean isAcceptable, ResultCode resultCode, boolean isAdminActionRequired)Report an error.- Parameters:
error- the error to reportisAcceptable-trueif the configuration is acceptableresultCode- the change result for the current configurationisAdminActionRequired-trueif administrative action is required orfalseotherwise
-
getResultCode
public ResultCode getResultCode()
Get the current result code that was elaborated right after a configuration has been applied.- Returns:
- the current result code
-
getIsAcceptable
public boolean getIsAcceptable()
Get the current isAcceptable flag. The isAcceptable flag is elaborated right after the configuration was checked.- Returns:
- the isAcceptable flag
-
getUnacceptableReasons
public List<org.forgerock.i18n.LocalizableMessage> getUnacceptableReasons()
Get the current unacceptable reasons. The unacceptable reasons are elaborated when the configuration is checked.- Returns:
- the list of unacceptable reasons
-
getErrorMessages
public List<org.forgerock.i18n.LocalizableMessage> getErrorMessages()
Get the current error messages. The error messages are elaborated when the configuration is applied.- Returns:
- the list of error messages
-
getConfigPhase
public EntryCacheCommon.ConfigPhase getConfigPhase()
Get the current configuration phase. The configuration phase indicates whether the entry cache is in initialization step, or in configuration checking step or in configuration being applied step.- Returns:
- the current configuration phase.
-
getIsAdminActionRequired
public boolean getIsAdminActionRequired()
Get the current isAdminActionRequired flag as determined after apply action has been taken on a given configuration.- Returns:
- the isAdminActionRequired flag
-
-