org.apache.maven.scm.provider.integrity
Class Member

java.lang.Object
  extended by org.apache.maven.scm.provider.integrity.Member

public class Member
extends Object

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

Since:
1.6
Version:
$Id: Member.java 1.2 2011/08/22 13:06:47EDT Cletus D'Souza (dsouza) Exp $
Author:
Cletus D'Souza

Constructor Summary
Member(com.mks.api.response.WorkItem wi, String configPath, String projectRoot, String workspaceDir)
          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(Object o)
          Uses the name of file for equality check
 String getDescription()
          Returns any check-in comments associated with this revision
 String getMemberName()
          Returns the full server-side member path for this member
 String getName()
          Returns only the file name portion for this full server-side member path
 String getRevision()
          Returns a string representation of this member's revision
 String getTargetFilePath()
          Returns a string representation of this file's full path name, where it will checked out to disk for the build.
 Date getTimestamp()
          Returns the date/time associated with this member revision
 void setLineTerminator(String lineTerminator)
          Optionally, one may set a line terminator, if the default is not desired.
 void setOverwriteExisting(String overwriteExisting)
          Optionally, one may choose not to overwrite existing files, this may speed up the synchronization process.
 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.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Member

public Member(com.mks.api.response.WorkItem wi,
              String configPath,
              String projectRoot,
              String workspaceDir)
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
workspaceDir - Full path to the workspace root directory
Method Detail

getTargetFilePath

public String getTargetFilePath()
Returns a string representation of this file's full path name, where it will checked out to disk for the build.

Returns:

getRevision

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

Returns:

getTimestamp

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

Returns:

getDescription

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

Returns:

getMemberName

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

Returns:

getName

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

Returns:

setLineTerminator

public void setLineTerminator(String lineTerminator)
Optionally, one may set a line terminator, if the default is not desired.

Parameters:
lineTerminator -

setOverwriteExisting

public void setOverwriteExisting(String overwriteExisting)
Optionally, one may choose not to overwrite existing files, this may speed up the synchronization process.

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.

Parameters:
restoreTimestamp -

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(Object o)
Uses the name of file for equality check

Overrides:
equals in class Object


Copyright © 2003-2012 The Apache Software Foundation. All Rights Reserved.