|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rhq.core.domain.configuration.AbstractConfigurationUpdate
public abstract class AbstractConfigurationUpdate
Field Summary | |
---|---|
protected Configuration |
configuration
|
protected long |
createdTime
|
protected String |
errorMessage
|
protected long |
modifiedTime
|
protected ConfigurationUpdateStatus |
status
|
protected String |
subjectName
|
Constructor Summary | |
---|---|
AbstractConfigurationUpdate()
|
Method Summary | |
---|---|
protected void |
appendToStringInternals(StringBuilder str)
Subclasses can override this to add things it wants to see in the toString. |
boolean |
equals(Object obj)
|
Configuration |
getConfiguration()
Contains the entire configuration that was submitted as the new configuration for a resource. |
Date |
getCreatedTime()
The time this entity was originally created; in other words, when the request was originally made. |
long |
getDuration()
The duration of the configuration update request which simply is the difference between the getCreatedTime() and the getModifiedTime() . |
String |
getErrorMessage()
If not null , this is an error message (possibly a full stack trace) to indicate the overall error
that occurred when the configuration update failed. |
Date |
getModifiedTime()
The time this entity was last modified. |
ConfigurationUpdateStatus |
getStatus()
The status of the request which indicates that the request is either still in progress, or it has completed and either succeeded or failed. |
String |
getSubjectName()
For auditing purposes, this method tells you the username of the person that created the request. |
int |
hashCode()
|
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 . |
void |
setErrorMessageFromThrowable(Throwable t)
Convienence method that sets the error message to the given throwable's stack trace dump. |
void |
setStatus(ConfigurationUpdateStatus status)
|
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected Configuration configuration
protected ConfigurationUpdateStatus status
protected String errorMessage
protected String subjectName
protected long createdTime
protected long modifiedTime
Constructor Detail |
---|
public AbstractConfigurationUpdate()
Method Detail |
---|
public Configuration getConfiguration()
public void setConfiguration(Configuration configuration)
public ConfigurationUpdateStatus getStatus()
public void setStatus(ConfigurationUpdateStatus status)
public String getErrorMessage()
null
, this is an error message (possibly a full stack trace) to indicate the overall error
that occurred when the configuration update failed. This will normally be null
unless the
status
indicates a ConfigurationUpdateStatus.FAILURE
.
If the update failed because one or more configuration property values were invalid, then you can also examine the error messages in each of the failed properties to find out more specific details about the errors for each invalid property.
public void setErrorMessage(String errorMessage)
null
error message implies that the request's status is
ConfigurationUpdateStatus.FAILURE
. 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.
errorMessage
- public void setErrorMessageFromThrowable(Throwable t)
null
, the error message will be set to null
as if passing null
to
setErrorMessage(String)
.
t
- throwable whose message and stack trace will make up the error message (may be null
)public String getSubjectName()
If the configuration update was automatically detected by the plugin (that is, was not initiated by a JBoss ON
user; for example, someone modified a configuration file on disk), this will return null
as an
indication that we don't know who modified it
public Date getCreatedTime()
public Date getModifiedTime()
created time
.
public long getDuration()
getCreatedTime()
and the getModifiedTime()
. If the request hasn't completed yet, this will be
the difference between the current time and the created time.
public int hashCode()
hashCode
in class Object
public boolean equals(Object obj)
equals
in class Object
public String toString()
toString
in class Object
protected void appendToStringInternals(StringBuilder str)
str
- the builder to append strings to
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |