org.rhq.core.pluginapi.configuration
Class ConfigurationUpdateReport

java.lang.Object
  extended by org.rhq.core.pluginapi.configuration.ConfigurationUpdateReport
All Implemented Interfaces:
Serializable

public class ConfigurationUpdateReport
extends Object
implements Serializable

Represents the configuration update request and its results.

See Also:
ConfigurationFacet.updateResourceConfiguration(ConfigurationUpdateReport), Serialized Form

Constructor Summary
ConfigurationUpdateReport(Configuration config)
           
 
Method Summary
 Configuration getConfiguration()
           
 String getErrorMessage()
           
 ConfigurationUpdateStatus getStatus()
           
 void setConfiguration(Configuration configuration)
           
 void setErrorMessage(String errorMessage)
          Calling this method with a non-null error message implies that the request's status is ConfigurationUpdateStatus.FAILURE and will set it as such.
 void setErrorMessageFromThrowable(Throwable t)
          Convienence method that sets the error message to the given throwable's stack trace dump.
 void setStatus(ConfigurationUpdateStatus status)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigurationUpdateReport

public ConfigurationUpdateReport(Configuration config)
Method Detail

getConfiguration

public Configuration getConfiguration()

setConfiguration

public void setConfiguration(Configuration configuration)

getStatus

public ConfigurationUpdateStatus getStatus()

setStatus

public void setStatus(ConfigurationUpdateStatus status)

getErrorMessage

public String getErrorMessage()

setErrorMessage

public void setErrorMessage(String errorMessage)
Calling this method with a non-null error message implies that the request's status is ConfigurationUpdateStatus.FAILURE and will set it as such. The inverse is not true - that is, if you set the error message to null, the status is left as-is; it will not assume that a null error message means the status is successful.

Parameters:
errorMessage -

setErrorMessageFromThrowable

public void setErrorMessageFromThrowable(Throwable t)
Convienence method that sets the error message to the given throwable's stack trace dump. If the given throwable is null, the error message will be set to null as if passing null to setErrorMessage(String).

Parameters:
t - throwable whose message and stack trace will make up the error message (may be null)


Copyright © 2008-2009 RHQ Project Advisory Board (Red Hat, Inc.). All Rights Reserved.