com.ail.core
Class Version

java.lang.Object
  extended by com.ail.core.Type
      extended by com.ail.core.Version
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable

public class Version
extends Type

This type represents the version details of an artifact in a live system. The version might relate to a component or entry point, or to some live data like a type definition. The version information is flexible in format (hence the use of Strings). Different types of artifact are likely to return different version attributes in different formats.

Version:
$Revision: 1.3 $
See Also:
Serialized Form

Field Summary
static Version LATEST
           
 
Fields inherited from class com.ail.core.Type
jXPathContext, NOT_PERSISTED
 
Constructor Summary
Version()
           
 
Method Summary
 java.lang.String getAuthor()
          Getter to fetch the version's author.
 java.lang.String getComment()
          Getter to getch the comment associated with this version.
 java.lang.String getCopyright()
          Getter to fetch the copyright message
 java.lang.String getDate()
          Getter to fetch the version's date.
 java.lang.String getSource()
          Getter to fetch this artifacts source.
 java.lang.String getState()
          Getter to fetch this version's state.
 java.lang.String getVersion()
          Getter to fetch the version number.
 void setAuthor(java.lang.String author)
          Setter to change this version's author.
 void setComment(java.lang.String comment)
          Setter to set the comment associated with this version.
 void setCopyright(java.lang.String copyright)
          Setter to set the version's copyright message.
 void setDate(java.lang.String date)
          Setter for the artifacts change date.
 void setSource(java.lang.String source)
          Setter to change the source.
 void setState(java.lang.String state)
          Setter to set this version's state.
 void setVersion(java.lang.String version)
          Setter to change the version number.
 
Methods inherited from class com.ail.core.Type
addAttribute, clone, deleteLock, deleteSerialVersion, fetchJXPathContext, getAttribute, getAttribute, getAttributeCount, getForeignSystemId, getLock, getSerialVersion, getSystemId, hasLock, hasSerialVersion, hasSystemId, isPersisted, markAsNotPersisted, mergeWithDataFrom, removeAttribute, removeAttribute, setAttribute, setForeignSystemId, setLock, setSerialVersion, setSystemId, xpathGet, xpathGet, xpathIterate, xpathSet
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LATEST

public static final Version LATEST
Constructor Detail

Version

public Version()
Method Detail

setVersion

public void setVersion(java.lang.String version)
Setter to change the version number. Typically version numbers are derived from CVS, so the string may contain other characters (e.g. "$revision: 2.1$").

Parameters:
version - The version number to use.

getVersion

public java.lang.String getVersion()
Getter to fetch the version number.

Returns:
A version number.

setSource

public void setSource(java.lang.String source)
Setter to change the source. The "source" is the name of the versioned artifact. For source code artifacts this would be the path of the source file within CVS. For other artifacts it is simply a name that helps them to be identified.

Parameters:
source - The source name.

getSource

public java.lang.String getSource()
Getter to fetch this artifacts source.

Returns:
The source name

setDate

public void setDate(java.lang.String date)
Setter for the artifacts change date. This is the data when the artifacts was last changed - i.e. when this version became active. For a source file artifact this is the CVS value $date: $.

Parameters:
date - Change date

getDate

public java.lang.String getDate()
Getter to fetch the version's date.

Returns:
A string containing the version's date.

setAuthor

public void setAuthor(java.lang.String author)
Setter to change this version's author. For a source code artifact this is CVSs "$author:$" tag. For other artifacts it would probably represent the name of user responsible.

Parameters:
author - Authors name

getAuthor

public java.lang.String getAuthor()
Getter to fetch the version's author.

Returns:
Author's name

setCopyright

public void setCopyright(java.lang.String copyright)
Setter to set the version's copyright message.

Parameters:
copyright - The copyright string.

getCopyright

public java.lang.String getCopyright()
Getter to fetch the copyright message

Returns:
copyright message.

setState

public void setState(java.lang.String state)
Setter to set this version's state. This described the state that the author considers this version of the artifact to be in. For a source code artifact this would be tied to CVS's "$state: $" tag, which indicates the release state of the source artifact. For a dynamic runtime artifact it might be "Live", or "Development" for example.

Parameters:
state - The new state.

getState

public java.lang.String getState()
Getter to fetch this version's state.

Returns:
State string

getComment

public java.lang.String getComment()
Getter to getch the comment associated with this version. The comment returned was supplied by the individual/system when the new version was created.

Returns:
Comment string

setComment

public void setComment(java.lang.String comment)
Setter to set the comment associated with this version.

Parameters:
comment - The comment string.