hudson.scm
Class IntegrityCMMember

java.lang.Object
  extended by hudson.scm.IntegrityCMMember
All Implemented Interfaces:
java.io.Serializable

public class IntegrityCMMember
extends java.lang.Object
implements java.io.Serializable

This class represents an Integrity CM Member It contains all the necessary metadata to check this file out individually

See Also:
Serialized Form

Constructor Summary
IntegrityCMMember(com.mks.api.response.WorkItem wi, java.lang.String configPath, java.lang.String projectRoot)
          This class represents an MKS Integrity Source File It needs the Member Name (relative path to pj), Full Member Path, Project Configuration Path, Revision, Project's Root Path, and the current Workspace directory (to compute the working file path) for its instantiation.
 
Method Summary
 boolean checkout(APISession api)
          Performs a checkout of this MKS Integrity Source File to a working file location on the build server represented by targetFile
 boolean equals(java.lang.Object o)
           
 java.lang.String getAnnotatedLink()
          Returns an URL encoded string representation for invoking this Integrity member's annotated view
 java.lang.String getAuthor()
          Returns the author for this member revision
 java.lang.String getDescription()
          Returns any check-in comments associated with this revision
 java.lang.String getDifferencesLink()
          Returns an URL encoded string representation for invoking this Integrity member's differences view This assumes that IntegrityCMProject.compareBaseline() was invoked!
 java.lang.String getMemberName()
          Returns the full server-side member path for this member
 java.lang.String getName()
          Returns only the file name portion for this full server-side member path
 java.lang.String getRevision()
          Returns a string representation of this member's revision
 java.lang.String getTargetFilePath()
          Returns a string representation of this file's full path name, where it will checked out to disk for the build.
 java.util.Date getTimestamp()
          Returns the date/time associated with this member revision
 void setAuthor(APISession api)
          Initializes the author associated with this member revision Author is set to "unknown", if the APISession is null indicating that the user wishes to skip author information
 void setAuthor(java.lang.String author)
          Initializes the author associated with this member revision This is a convenience function used to avoid another command execution This can be used when the author information is known, perhaps from a previous build.
 void setLineTerminator(java.lang.String lineTerminator)
          Optionally, one may set a line terminator, if the default is not desired.
 void setOverwriteExisting(java.lang.String overwriteExisting)
          Optionally, one may choose not to overwrite existing files, this may speed up the synchronization process if a clear copy is not requested.
 void setPriorRevision(java.lang.String revision)
          Access function to initialize the prior revision, used for differences view This will be invoked from the IntegrityCMProject.compareBaseline() function
 void setRestoreTimestamp(boolean restoreTime)
          Optionally, one might want to restore the timestamp, if the build is smart not to recompile files that were not touched.
 void setWorkspaceDir(java.lang.String workspaceDir)
          Constructs an absolute path for the target file based on the workspace it will be checked out to
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegrityCMMember

public IntegrityCMMember(com.mks.api.response.WorkItem wi,
                         java.lang.String configPath,
                         java.lang.String projectRoot)
                  throws com.mks.api.response.APIException
This class represents an MKS Integrity Source File It needs the Member Name (relative path to pj), Full Member Path, Project Configuration Path, Revision, Project's Root Path, and the current Workspace directory (to compute the working file path) for its instantiation. This helper class will be used to then perform a project checkout from the repository

Parameters:
wi - A MKS API Response Work Item representing metadata related to a Integrity Member
configPath - Configuration Path for this file's project/subproject
projectRoot - Full path to the root location for this file's parent project
Throws:
com.mks.api.response.APIException
Method Detail

setWorkspaceDir

public void setWorkspaceDir(java.lang.String workspaceDir)
Constructs an absolute path for the target file based on the workspace it will be checked out to

Parameters:
workspaceDir - Full path to the root location where this file will be checked out

getTargetFilePath

public java.lang.String getTargetFilePath()
Returns a string representation of this file's full path name, where it will checked out to disk for the build. NOTE: This assumes that setWorkspaceDir() was called prior to making this call!

Returns:

getRevision

public java.lang.String getRevision()
Returns a string representation of this member's revision

Returns:

getTimestamp

public java.util.Date getTimestamp()
Returns the date/time associated with this member revision

Returns:

getDescription

public java.lang.String getDescription()
Returns any check-in comments associated with this revision

Returns:

getAuthor

public java.lang.String getAuthor()
Returns the author for this member revision

Returns:

getMemberName

public java.lang.String getMemberName()
Returns the full server-side member path for this member

Returns:

getName

public java.lang.String getName()
Returns only the file name portion for this full server-side member path

Returns:

getAnnotatedLink

public java.lang.String getAnnotatedLink()
                                  throws java.io.UnsupportedEncodingException
Returns an URL encoded string representation for invoking this Integrity member's annotated view

Returns:
Throws:
java.io.UnsupportedEncodingException

getDifferencesLink

public java.lang.String getDifferencesLink()
                                    throws java.io.UnsupportedEncodingException
Returns an URL encoded string representation for invoking this Integrity member's differences view This assumes that IntegrityCMProject.compareBaseline() was invoked!

Returns:
Throws:
java.io.UnsupportedEncodingException

setPriorRevision

public void setPriorRevision(java.lang.String revision)
Access function to initialize the prior revision, used for differences view This will be invoked from the IntegrityCMProject.compareBaseline() function

Parameters:
revision -

setLineTerminator

public void setLineTerminator(java.lang.String lineTerminator)
Optionally, one may set a line terminator, if the default is not desired. Configured under advanced options for the SCM plugin

Parameters:
lineTerminator -

setOverwriteExisting

public void setOverwriteExisting(java.lang.String overwriteExisting)
Optionally, one may choose not to overwrite existing files, this may speed up the synchronization process if a clear copy is not requested.

Parameters:
overwriteExisting -

setRestoreTimestamp

public void setRestoreTimestamp(boolean restoreTime)
Optionally, one might want to restore the timestamp, if the build is smart not to recompile files that were not touched. This option is configured under advanced options for the SCM plugin

Parameters:
restoreTimestamp -

setAuthor

public void setAuthor(java.lang.String author)
Initializes the author associated with this member revision This is a convenience function used to avoid another command execution This can be used when the author information is known, perhaps from a previous build.

Parameters:
author - The string representation of this author's name/id

setAuthor

public void setAuthor(APISession api)
Initializes the author associated with this member revision Author is set to "unknown", if the APISession is null indicating that the user wishes to skip author information

Parameters:
api - The current MKS API Session to obtain the author information

checkout

public boolean checkout(APISession api)
                 throws com.mks.api.response.APIException
Performs a checkout of this MKS Integrity Source File to a working file location on the build server represented by targetFile

Parameters:
api - MKS API Session
Returns:
true if the operation succeeded or false if failed
Throws:
com.mks.api.response.APIException

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object


Copyright © 2004-2011 Hudson. All Rights Reserved.