Package hudson.scm
Class IntegrityCMMember
java.lang.Object
hudson.scm.IntegrityCMMember
This class is intended to represent an Integrity CM Member However, due to scalability
constraints, the bulk of the member metadata will be stored in an embedded database. The purpose
of this class is to statically assist with various Integrity member operations, like co.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classstatic class -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic final booleancheckout(ISession api, String configPath, String memberID, String memberRev, Timestamp memberTimestamp, File targetFile, boolean restoreTimestamp, String lineTerminator) Performs a checkout of this Integrity Source File to a working file location on the build server represented by targetFilestatic final StringcreateCP(IntegrityConfigurable ciSettings, String itemID, String desc) Creates a Change Package for updating Integrity SCM projectsstatic final StringgetAnnotatedLink(String configPath, String memberID, String memberRev) Returns an URL encoded string representation for invoking this Integrity member's annotated viewstatic final StringgetDifferencesLink(String configPath, String memberID, String memberRev, String oldMemberRev) Returns an URL encoded string representation for invoking this Integrity member's differences view This assumes that IntegrityCMProject.compareBaseline() was invoked!static final StringgetMD5Checksum(File targetFile) Returns the MD5 checksum hash for a filestatic final StringReturns only the file name portion for this full server-side member pathstatic StringReturns an URL encoded string representation for invoking this Integrity CP view This assumes that IntegrityCMProject.compareBaseline() was invoked!static final voidsubmitCP(IntegrityConfigurable ciSettings, String cpid) Submits the change package used for updating the Integrity SCM projectstatic final voidunlockMembers(IntegrityConfigurable integrityConfig, String configPath) Performs a recursive unlock on all current user's locked membersstatic final voidupdateMember(IntegrityConfigurable ciSettings, String configPath, hudson.FilePath member, String relativePath, String cpid, String desc) Performs a lock and subsequent project checkin for the specified memberstatic final Map<IntegrityCMMember.CPInfo, List<IntegrityCMMember.CPMember>> viewCP(IntegrityConfigurable ciSettings, Set<String> projectCPIDs, String cpCacheTable, Map<IntegrityCMMember.CPInfo, List<IntegrityCMMember.CPMember>> membersInCP) View the change package
-
Constructor Details
-
IntegrityCMMember
public IntegrityCMMember()
-
-
Method Details
-
getName
Returns only the file name portion for this full server-side member path- Parameters:
memberID- The full server side path for the Integrity member- Returns:
-
getAnnotatedLink
public static final String getAnnotatedLink(String configPath, String memberID, String memberRev) throws UnsupportedEncodingException Returns an URL encoded string representation for invoking this Integrity member's annotated view- Parameters:
configPath- Full server side path for this Integrity member's project/subprojectmemberID- Full server side path for this Integrity membermemberRev- Member revision string for this Integrity member- Returns:
- Throws:
UnsupportedEncodingException
-
getDifferencesLink
public static final String getDifferencesLink(String configPath, String memberID, String memberRev, String oldMemberRev) throws UnsupportedEncodingException Returns an URL encoded string representation for invoking this Integrity member's differences view This assumes that IntegrityCMProject.compareBaseline() was invoked!- Parameters:
configPath- Full server side path for this Integrity member's project/subprojectmemberID- Full server side path for this Integrity membermemberRev- Member revision string for this Integrity memberoldMemberRev- Revision string representing the previous or next revision- Returns:
- Throws:
UnsupportedEncodingException
-
getViewCP
Returns an URL encoded string representation for invoking this Integrity CP view This assumes that IntegrityCMProject.compareBaseline() was invoked!- Parameters:
cpid-- Returns:
-
checkout
public static final boolean checkout(ISession api, String configPath, String memberID, String memberRev, Timestamp memberTimestamp, File targetFile, boolean restoreTimestamp, String lineTerminator) throws com.mks.api.response.APIException Performs a checkout of this Integrity Source File to a working file location on the build server represented by targetFile- Parameters:
api- Integrity API SessionconfigPath- Full server side path for this Integrity member's project/subprojectmemberID- Full server side path for this Integrity membermemberRev- Member revision string for this Integrity membertargetFile- File object representing the target location for this filerestoreTimestamp- Toggles whether or not the original timestamp should be usedlineTerminator- Sets the line terminator for this file (native, crlf, or lf)- Returns:
- true if the operation succeeded or false if failed
- Throws:
com.mks.api.response.APIException
-
getMD5Checksum
Returns the MD5 checksum hash for a file- Parameters:
targetFile- File object representing the target file- Returns:
- Throws:
IOException
-
updateMember
public static final void updateMember(IntegrityConfigurable ciSettings, String configPath, hudson.FilePath member, String relativePath, String cpid, String desc) throws hudson.AbortException, com.mks.api.response.APIException Performs a lock and subsequent project checkin for the specified member- Parameters:
ciSettings- Integrity API SessionconfigPath- Full project configuration pathmember- Member name for this filerelativePath- Workspace relative file pathcpid- Change Package IDdesc- Checkin description- Throws:
hudson.AbortExceptioncom.mks.api.response.APIException
-
unlockMembers
public static final void unlockMembers(IntegrityConfigurable integrityConfig, String configPath) throws hudson.AbortException, com.mks.api.response.APIException Performs a recursive unlock on all current user's locked members- Parameters:
integrityConfig-configPath- Full project configuration path- Throws:
hudson.AbortExceptioncom.mks.api.response.APIException
-
createCP
public static final String createCP(IntegrityConfigurable ciSettings, String itemID, String desc) throws com.mks.api.response.APIException, hudson.AbortException, com.mks.api.response.InterruptedException Creates a Change Package for updating Integrity SCM projects- Parameters:
itemID- Integrity Lifecycle Manager Item IDdesc- Change Package DescriptionIntegrity- API Session- Returns:
- Throws:
com.mks.api.response.APIExceptionhudson.AbortExceptioncom.mks.api.response.InterruptedException
-
submitCP
public static final void submitCP(IntegrityConfigurable ciSettings, String cpid) throws com.mks.api.response.APIException, hudson.AbortException Submits the change package used for updating the Integrity SCM project- Parameters:
ciSettings- Integrity API Sessioncpid- Change Package ID- Throws:
hudson.AbortExceptioncom.mks.api.response.APIException
-
viewCP
public static final Map<IntegrityCMMember.CPInfo,List<IntegrityCMMember.CPMember>> viewCP(IntegrityConfigurable ciSettings, Set<String> projectCPIDs, String cpCacheTable, Map<IntegrityCMMember.CPInfo, List<IntegrityCMMember.CPMember>> membersInCP) throws com.mks.api.response.APIException, hudson.AbortException, SQLExceptionView the change package- Parameters:
ciSettings- Integrity API SessionprojectCPIDs- List of Change Package IDcpCacheTable-membersInCP-- Throws:
hudson.AbortExceptioncom.mks.api.response.APIExceptionSQLException
-