@Entity public class Situation extends Object implements Externalizable
| Modifier and Type | Class and Description |
|---|---|
static class |
Situation.Severity
This enumeration type represents the severity of
the situation.
|
| Modifier and Type | Field and Description |
|---|---|
static String |
RESUBMITTED_SITUATION_ID
The property name used to defined the resubmitted situation id.
|
static char |
SUBJECT_SEPARATOR_CHAR
The separator character between parts of the subject.
|
| Constructor and Description |
|---|
Situation() |
| Modifier and Type | Method and Description |
|---|---|
static String |
createSubject(String... parts)
This method constructs a subject based on a variable
number of string parts.
|
boolean |
equals(Object obj) |
Set<ActivityTypeId> |
getActivityTypeIds()
This method returns the list of activity type ids
associated with the violation.
|
Set<Context> |
getContext()
This method gets the context.
|
String |
getDescription()
This method gets the situation description.
|
static Situation.Severity |
getHighestSeverity(List<Situation> sits)
This method returns the highest severity associated with the supplied
list of situations.
|
String |
getId()
This method returns the id.
|
Map<String,String> |
getProperties()
Deprecated.
|
Situation.Severity |
getSeverity()
This method returns the severity value.
|
Map<String,String> |
getSituationProperties()
This method gets the properties.
|
static List<Situation> |
getSituationsForSeverity(Situation.Severity severity,
List<Situation> sits)
This method filters the list of situations based on severity.
|
String |
getSubject()
This method gets the subject.
|
long |
getTimestamp()
This method returns the timestamp.
|
String |
getType()
This method gets the situation type.
|
int |
hashCode() |
void |
readExternal(ObjectInput in) |
void |
setActivityTypeIds(Set<ActivityTypeId> activityTypeIds)
This method sets the list of activity type ids.
|
void |
setContext(Set<Context> context)
This method sets the context.
|
void |
setDescription(String description)
This method sets the situation description.
|
void |
setId(String id)
This method sets the id.
|
void |
setProperties(Map<String,String> props)
Deprecated.
|
void |
setSeverity(Situation.Severity severity)
This method sets the severity value.
|
void |
setSituationProperties(Map<String,String> props)
This method sets the properties.
|
void |
setSubject(String subject)
This method sets the subject.
|
void |
setTimestamp(long timestamp)
This method sets the timestamp.
|
void |
setType(String type)
This method sets the situation type.
|
String[] |
subjectAsParts()
This method returns the subject as its constituent parts.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
public static final String RESUBMITTED_SITUATION_ID
public static final char SUBJECT_SEPARATOR_CHAR
public String getId()
public void setId(String id)
id - The idpublic void setType(String type)
type - The situation typepublic String getType()
public static String createSubject(String... parts)
parts - The partspublic String[] subjectAsParts()
public void setSubject(String subject)
subject - The subjectpublic String getSubject()
public void setDescription(String description)
description - The descriptionpublic String getDescription()
public void setTimestamp(long timestamp)
timestamp - The timestamppublic long getTimestamp()
public Situation.Severity getSeverity()
public void setSeverity(Situation.Severity severity)
severity - The severity valuepublic void setActivityTypeIds(Set<ActivityTypeId> activityTypeIds)
activityTypeIds - The list of activity type idspublic Set<ActivityTypeId> getActivityTypeIds()
public void setSituationProperties(Map<String,String> props)
props - The propertiespublic Map<String,String> getSituationProperties()
@Deprecated public void setProperties(Map<String,String> props)
setSituationProperties(java.util.Map).props - The properties@Deprecated public Map<String,String> getProperties()
getSituationProperties().public void setContext(Set<Context> context)
context - The contextpublic static Situation.Severity getHighestSeverity(List<Situation> sits)
sits - The list of situationspublic static List<Situation> getSituationsForSeverity(Situation.Severity severity, List<Situation> sits)
severity - The severitysits - The list of situationspublic void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizableIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizableIOExceptionClassNotFoundExceptionCopyright © 2013-2015 JBoss by Red Hat. All Rights Reserved.