R
- the type of the artifact recordpublic abstract class ArtifactRecord<R extends ArtifactRecord<R>> extends ChangeRecord<R> implements ArtifactDiff
ArtifactDiff.ChangeType, ArtifactDiff.Field<T>
_values
ARTIFACT_PATH, CHANGE_TYPE, ELEMENT_ID, ELEMENT_NAME, ELEMENT_TYPE, MERGE_INFO, REPORTED_BY, REPOSITORY_ID
Modifier | Constructor and Description |
---|---|
protected |
ArtifactRecord(java.util.Map<java.lang.String,java.lang.Object> values)
Creates a record from existing values.
|
protected |
ArtifactRecord(java.lang.String objName,
java.lang.String objType,
java.lang.String summary)
Constructs an artifact record.
|
Modifier and Type | Method and Description |
---|---|
R |
artifactPath(java.lang.String path)
Indicates the full path of the involved artifact.
|
R |
changeType(ArtifactDiff.ChangeType t)
Indicates the type of the change.
|
R |
elementId(java.lang.String id)
Indicates the ID of the element that has changed.
|
R |
elementName(java.lang.String name)
Indicates the name of the element that has changed.
|
R |
elementType(java.lang.String type)
Indicates the type of the element that has changed.
|
<T> T |
get(ArtifactDiff.Field<T> field)
Returns the value of a field.
|
R |
reportedBy(java.lang.String cid)
The ID of the component that logs the record.
|
R |
repositoryId(java.lang.String s)
Indicates the ID of the repository that is changed.
|
changeDate, changedBy, getObjectName, getObjectType, objectId, url
clone, clone, get, getChildren, getDiagnosticRecordId, getPersistableValues, getSummary, hasChildren, newChild, put, toString
protected ArtifactRecord(java.lang.String objName, java.lang.String objType, java.lang.String summary)
objName
- the name of the object that is changedobjType
- the type of the changed objectsummary
- a brief description of how the object is changedjava.lang.IllegalArgumentException
- if the given object name or type is
nullprotected ArtifactRecord(java.util.Map<java.lang.String,java.lang.Object> values)
values
- the existing valuesjava.lang.NullPointerException
- If the given map is nullpublic <T> T get(ArtifactDiff.Field<T> field)
ArtifactDiff
get
in interface ArtifactDiff
T
- the data type of the fieldfield
- the name of the fieldpublic R elementName(java.lang.String name)
name
- the name of the element that has changedpublic R elementType(java.lang.String type)
type
- the type of the elementpublic R elementId(java.lang.String id)
id
- the ID of the elementpublic R artifactPath(java.lang.String path)
path
- the full path of the involved artifactpublic R changeType(ArtifactDiff.ChangeType t)
t
- the type of the changepublic R repositoryId(java.lang.String s)
s
- the ID of the repositorypublic R reportedBy(java.lang.String cid)
cid
- the ID of the component that logs the record