Package hudson.scm

Class IntegrityCMMember

java.lang.Object
hudson.scm.IntegrityCMMember

public final class IntegrityCMMember extends Object
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.
  • Constructor Details

    • IntegrityCMMember

      public IntegrityCMMember()
  • Method Details

    • getName

      public static final String getName(String memberID)
      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/subproject
      memberID - Full server side path for this Integrity member
      memberRev - 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/subproject
      memberID - Full server side path for this Integrity member
      memberRev - Member revision string for this Integrity member
      oldMemberRev - Revision string representing the previous or next revision
      Returns:
      Throws:
      UnsupportedEncodingException
    • getViewCP

      public static String getViewCP(String cpid)
      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 Session
      configPath - Full server side path for this Integrity member's project/subproject
      memberID - Full server side path for this Integrity member
      memberRev - Member revision string for this Integrity member
      targetFile - File object representing the target location for this file
      restoreTimestamp - Toggles whether or not the original timestamp should be used
      lineTerminator - 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

      public static final String getMD5Checksum(File targetFile) throws IOException
      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 Session
      configPath - Full project configuration path
      member - Member name for this file
      relativePath - Workspace relative file path
      cpid - Change Package ID
      desc - Checkin description
      Throws:
      hudson.AbortException
      com.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.AbortException
      com.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 ID
      desc - Change Package Description
      Integrity - API Session
      Returns:
      Throws:
      com.mks.api.response.APIException
      hudson.AbortException
      com.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 Session
      cpid - Change Package ID
      Throws:
      hudson.AbortException
      com.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, SQLException
      View the change package
      Parameters:
      ciSettings - Integrity API Session
      projectCPIDs - List of Change Package ID
      cpCacheTable -
      membersInCP -
      Throws:
      hudson.AbortException
      com.mks.api.response.APIException
      SQLException