|
CodeBeamer 5.4.0.1-RC API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.intland.codebeamer.persistence.dto.base.IdentifiableDto
com.intland.codebeamer.persistence.dto.base.NamedDto
com.intland.codebeamer.persistence.dto.base.DescribeableDto
com.intland.codebeamer.persistence.dto.ArtifactDto
public class ArtifactDto
Wraps an artifact.
Nested Class Summary | |
---|---|
static class |
ArtifactDto.PathComparator
A special Comparator to compare artifacts by canonical path |
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.DescribeableDto |
---|
DescribeableDto.DescriptionComparator |
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.NamedDto |
---|
NamedDto.NameComparator |
Nested classes/interfaces inherited from class com.intland.codebeamer.persistence.dto.base.IdentifiableDto |
---|
IdentifiableDto.IdComparator |
Nested classes/interfaces inherited from interface com.intland.codebeamer.persistence.dto.base.ReferableDto |
---|
ReferableDto.DescriptionComparator |
Field Summary | |
---|---|
static java.lang.String |
INTERWIKI_LINK_TYPE_DIR
|
static java.lang.String |
INTERWIKI_LINK_TYPE_DOC
|
static java.lang.String |
INTERWIKI_LINK_TYPE_NOTE
|
static java.lang.String |
INTERWIKI_LINK_TYPE_NOTES
Deprecated. Use INTERWIKI_LINK_TYPE_NOTE instead. |
static java.lang.String |
INTERWIKI_LINK_TYPE_REPORT
|
Fields inherited from interface com.intland.codebeamer.persistence.dto.base.ReferableDto |
---|
HEAD_VERSION, SECTION_DELIMITER, VERSION_DELIMITER |
Constructor Summary | |
---|---|
ArtifactDto()
|
Method Summary | |
---|---|
java.lang.Object |
clone()
|
static int |
compareArtifacts(ArtifactDto t1,
ArtifactDto t2)
Compare two ArtifactDtos that may be null |
static int |
compareScope(java.lang.String s1,
java.lang.String s2)
Compare two scope names, which is basically identical to NamedDto.compareStringIgnoreCase(String, String) ,
except that null is treated as less than not null . |
int |
compareTo(java.lang.Object obj)
Caution: NamedDto compareTo violates the rule that a.equals(b)
is equivalent to a.compareTo(b) == 0 , because only the names are compared |
static int |
compareType(java.lang.Integer t1,
java.lang.Integer t2)
Compare two ArtifactType constants, so that directories are in front of other artifacts,
but do not distinguish between the type of non-directories |
boolean |
equals(java.lang.Object obj)
|
ArtifactAdditionalInfoDto |
getAdditionalInfo()
Get information about the artifact body/content (if any) |
long |
getAge()
Get the age of the artifact (ellapsed time since last modification/creation) in milliseconds |
boolean |
getCanDelete()
Check if the current user may delete this artifact |
static java.lang.Integer |
getCompareType(java.lang.Integer typeId)
|
java.util.Date |
getCreatedAt()
Get the date and time of artifact creation |
java.lang.Integer |
getGenericReferenceId()
|
java.lang.String |
getIconUrl()
Returns the URL of the (small) icon image that represents this DTO type. |
java.lang.String |
getInterwikiLink()
Returns the interwiki link that points to the web page where this DTO is managed. |
java.lang.String |
getInterwikiLinkVersioned(java.lang.String version)
|
java.util.Date |
getLastModifiedAt()
Get the date and time of the last artifact modification |
UserDto |
getLastModifiedBy()
Get the user that made the last artifact modification |
java.lang.Integer |
getNotification()
|
UserDto |
getOwner()
Get the user that created this artifact |
ArtifactDto |
getParent()
Get the parent artifact |
java.lang.String |
getPath()
Get the canonical path of this document. |
ProjectDto |
getProject()
Get the project this artifact belongs to |
java.lang.String |
getScopeName()
Get the concatenated names of all artifact ancestors, separated by slash / . |
java.lang.String |
getShortDescription()
Get the canonical path of this document, or, if the document is within a hidden directory, only the document name |
java.lang.Integer |
getTypeId()
Get the artifact type. |
java.lang.String |
getUrlLink()
Returns the local URL that points to the web page where this DTO is managed. |
java.lang.String |
getUrlLinkVersioned(java.lang.String version)
|
java.lang.String |
getVersion()
Returns its version or null if not available. |
int |
hashCode()
|
boolean |
isA(int type)
Check whether this is an artifact of the specified type ArtifactType |
boolean |
isApprovalSupported()
Returns whether this supports artifact approval workflows. |
boolean |
isDeleted()
Check if this artifact has been deleted |
boolean |
isDirectory()
Check if this artifact is a directory/folder |
boolean |
isExists()
Check if artifact exists |
boolean |
isFile()
Check if this artifact has a body/content getAdditionalInfo() |
boolean |
isIndexed()
Check if this artifact has already been indexed for search |
boolean |
isReadable()
Check if the current user can read the artifact (content) |
boolean |
isSubscribed()
|
boolean |
isWikiNotes()
Check if this artifact is a Wiki note (a file with extension ".wki") |
boolean |
isWikiPage()
Check if this is a wiki document, including personal- and project pages and even wiki notes. |
boolean |
isWritable()
Check if the current user can edit the artifact (content) |
void |
setAdditionalInfo(ArtifactAdditionalInfoDto additionalInfo)
Set information about the artifact body/content (if any) |
void |
setCreatedAt(java.util.Date createdAt)
Set the date and time of artifact creation |
void |
setDeleted(boolean deleted)
This method is only public because of an implementation side effect. |
void |
setGenericReferenceId(java.lang.Integer genericReferenceId)
|
void |
setIndexed(boolean indexed)
Set whether this artifact has already been indexed for search This method is only public because of an implementation side effect. |
void |
setLastModifiedAt(java.util.Date lastModifiedAt)
Set the date and time of the last artifact modification |
void |
setLastModifiedBy(UserDto lastModifiedByUser)
Set the user that made the last artifact modification |
void |
setName(java.lang.String name)
Sets its (descriptive) name. |
void |
setNotification(java.lang.Integer notification)
|
void |
setOwner(UserDto owner)
Set the user that created this artifact |
void |
setParent(ArtifactDto parent)
Set the parent artifact |
void |
setProject(ProjectDto project)
Set the project this artifact belongs to |
void |
setReadable(boolean readable)
Set whether the current user can read the artifact (content) |
void |
setScopeName(java.lang.String scopeName)
This method is only public because of an implementation side effect. |
void |
setTypeId(java.lang.Integer typeId)
Set the artifact type. |
void |
setWritable(boolean writable)
Set whether the current user can edit the artifact (content) |
java.lang.String |
toString()
|
Methods inherited from class com.intland.codebeamer.persistence.dto.base.DescribeableDto |
---|
compareByDescription, getDescription, getDescriptionFormat, setDescription, setDescriptionFormat |
Methods inherited from class com.intland.codebeamer.persistence.dto.base.NamedDto |
---|
compareNames, compareString, compareStringIgnoreCase, createLookupMap, getName |
Methods inherited from class com.intland.codebeamer.persistence.dto.base.IdentifiableDto |
---|
compare, compareInteger, equals, getId, hashCode, setId |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String INTERWIKI_LINK_TYPE_DIR
public static final java.lang.String INTERWIKI_LINK_TYPE_DOC
public static final java.lang.String INTERWIKI_LINK_TYPE_NOTE
public static final java.lang.String INTERWIKI_LINK_TYPE_REPORT
public static final java.lang.String INTERWIKI_LINK_TYPE_NOTES
Constructor Detail |
---|
public ArtifactDto()
Method Detail |
---|
public ArtifactDto getParent()
public void setParent(ArtifactDto parent)
parent
- artifact, or null if top-level artifactpublic java.lang.Integer getTypeId()
public void setTypeId(java.lang.Integer typeId)
typeId
- of the artifactpublic ProjectDto getProject()
getProject
in interface ProjectAwareDto
public void setProject(ProjectDto project)
setProject
in interface ProjectAwareDto
project
- this artifact belongs to, or null if project independent artifactpublic void setName(java.lang.String name)
NamedDto
setName
in class NamedDto
public void setScopeName(java.lang.String scopeName)
scopeName
- public java.lang.String getScopeName()
/
.
/
, or null if this is a top-level artifactpublic java.lang.String getPath()
/
public java.lang.String getShortDescription()
getShortDescription
in interface ReferableDto
public java.util.Date getCreatedAt()
public void setCreatedAt(java.util.Date createdAt)
createdAt
- is the date and time this artifact was createdpublic UserDto getOwner()
public void setOwner(UserDto owner)
owner
- is the user that created this artifactpublic java.util.Date getLastModifiedAt()
public void setLastModifiedAt(java.util.Date lastModifiedAt)
lastModifiedAt
- is the date and time of the last artifact modificationpublic UserDto getLastModifiedBy()
public void setLastModifiedBy(UserDto lastModifiedByUser)
lastModifiedByUser
- is the user that made the last artifact modificationpublic boolean isIndexed()
isIndexed
in interface IndexableDto
public void setIndexed(boolean indexed)
setIndexed
in interface IndexableDto
indexed
- is true if the artifact has been indexed, otherwise falsepublic boolean isDeleted()
public void setDeleted(boolean deleted)
deleted
- public boolean isExists()
public boolean isReadable()
public void setReadable(boolean readable)
readable
- is true if the current user can read the artifact (content), otherwise falsepublic boolean isWritable()
isWritable
in interface WriteControlledDto
public void setWritable(boolean writable)
setWritable
in interface WriteControlledDto
writable
- is true if the current user can edit the artifact (content), otherwise falsepublic boolean getCanDelete()
public ArtifactAdditionalInfoDto getAdditionalInfo()
public void setAdditionalInfo(ArtifactAdditionalInfoDto additionalInfo)
additionalInfo
- about the artifact body/content, or null if no body/content existspublic java.lang.String getVersion()
null
if not available.
public boolean isA(int type)
ArtifactType
type
- to check (ArtifactType
constant)
public boolean isFile()
getAdditionalInfo()
public boolean isDirectory()
public boolean isWikiNotes()
public boolean isWikiPage()
public boolean isApprovalSupported()
public java.lang.Integer getNotification()
public void setNotification(java.lang.Integer notification)
public boolean isSubscribed()
public java.lang.Integer getGenericReferenceId()
public void setGenericReferenceId(java.lang.Integer genericReferenceId)
public long getAge()
public java.lang.String getUrlLink()
ReferableDto
getUrlLink
in interface ReferableDto
public java.lang.String getUrlLinkVersioned(java.lang.String version)
getUrlLinkVersioned
in interface VersionedReferableDto
public java.lang.String getInterwikiLink()
ReferableDto
getInterwikiLink
in interface ReferableDto
public java.lang.String getInterwikiLinkVersioned(java.lang.String version)
getInterwikiLinkVersioned
in interface VersionedReferableDto
public java.lang.String getIconUrl()
ReferableDto
getIconUrl
in interface ReferableDto
public boolean equals(java.lang.Object obj)
equals
in class NamedDto
public int hashCode()
hashCode
in class NamedDto
public java.lang.Object clone()
clone
in class IdentifiableDto
public java.lang.String toString()
toString
in class NamedDto
public int compareTo(java.lang.Object obj)
NamedDto
a.equals(b)
is equivalent to a.compareTo(b) == 0
, because only the names are compared
compareTo
in interface java.lang.Comparable
compareTo
in class NamedDto
public static int compareArtifacts(ArtifactDto t1, ArtifactDto t2)
t1
- is the first ArtifactDto, or nullt2
- is the second ArtifactDto, or null
public static int compareType(java.lang.Integer t1, java.lang.Integer t2)
ArtifactType
constants, so that directories are in front of other artifacts,
but do not distinguish between the type of non-directories
t1
- is the first ArtifactType, or nullt2
- is the second ArtifactType, or null
public static int compareScope(java.lang.String s1, java.lang.String s2)
NamedDto.compareStringIgnoreCase(String, String)
,
except that null
is treated as less than not null
.
s1
- is the first scope name to compares2
- is the second scope name to compare
public static java.lang.Integer getCompareType(java.lang.Integer typeId)
|
CodeBeamer 5.4.0.1-RC API | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |