Class ConfigChangeResult


  • public final class ConfigChangeResult
    extends Object
    This class defines a data structure that can be used to hold information about the result of processing a configuration change.
    • Constructor Detail

      • ConfigChangeResult

        public ConfigChangeResult()
        Creates a new config change result object with the provided information.
    • Method Detail

      • getResultCode

        public ResultCode getResultCode()
        Retrieves the result code for this config change result.
        Returns:
        The result code for this config change result.
      • isSuccess

        public boolean isSuccess()
        Whether applying the changes is a success so far.
        Returns:
        Whether applying the changes is a success so far.
      • setResultCode

        public void setResultCode​(ResultCode resultCode)
        Specifies the result code for this config change result.
        Parameters:
        resultCode - The result code for this config change result.
      • setResultCodeIfSuccess

        public void setResultCodeIfSuccess​(ResultCode newResultCode)
        Sets the provided result code for this config change result if the current result code is success.
        Parameters:
        newResultCode - The new result code for this config change result.
      • setExceptionDetails

        public void setExceptionDetails​(Exception e)
        Copies details from this exception into this config change result.
        Parameters:
        e - the exception for which to copy the result code and error message
      • aggregate

        public void aggregate​(ConfigChangeResult other)
        Aggregates the results from the provided config change result.
        Parameters:
        other - The config change result to aggregate
      • getJoinedMessages

        public LocalizableMessage getJoinedMessages()
        Returns all messages joined in a single message.
        Returns:
        all messages joined in a single message
      • adminActionRequired

        public boolean adminActionRequired()
        Indicates whether administrative action is required before one or more of the changes will take effect.
        Returns:
        true if one or more of the configuration changes require administrative action to take effect, or false if not.
      • setAdminActionRequired

        public void setAdminActionRequired​(boolean adminActionRequired)
        Specifies whether administrative action is required before one or more of the changes will take effect.
        Parameters:
        adminActionRequired - Specifies whether administrative action is required before one or more of the changes will take effect.
      • getMessages

        public List<LocalizableMessage> getMessages()
        Retrieves the set of messages that provide explanation for the processing of the configuration changes. This list may be modified by the caller.
        Returns:
        The set of messages that provide explanation for the processing of the configuration changes.
      • addMessage

        public void addMessage​(LocalizableMessage message)
        Adds the provided message to the set of messages for this config change result.
        Parameters:
        message - The message to add to the set of messages for this config change result.
      • toString

        public String toString()
        Retrieves a string representation of this config change result.
        Overrides:
        toString in class Object
        Returns:
        A string representation of this config change result.
      • toString

        public void toString​(StringBuilder buffer)
        Appends a string representation of this config change result to the provided buffer.
        Parameters:
        buffer - The buffer to which the information should be appended.