Class VssParameterContext

java.lang.Object
org.apache.maven.scm.provider.vss.commands.VssParameterContext

public class VssParameterContext extends Object
  • Field Details

    • vssPath

      private String vssPath
    • autoResponse

      private String autoResponse
    • ssDir

      private String ssDir
    • vssLogin

      private String vssLogin
    • comment

      private String comment
    • user

      private String user
    • fromLabel

      private String fromLabel
    • toLabel

      private String toLabel
    • quiet

      private boolean quiet
    • recursive

      private boolean recursive
    • writable

      private boolean writable
    • label

      private String label
    • style

      private String style
    • version

      private String version
    • date

      private String date
    • localPath

      private String localPath
    • timestamp

      private String timestamp
    • writableFiles

      private String writableFiles
      Behaviour for writable files
    • fromDate

      private String fromDate
      From date
    • toDate

      private String toDate
      To date
    • numDays

      private int numDays
      Number of days offset for History
    • getLocalCopy

      private boolean getLocalCopy
      Get local copy for checkout defaults to true
    • dateFormat

      private DateFormat dateFormat
      Date format for History
    • outputFileName

      private String outputFileName
  • Constructor Details

  • Method Details

    • getInstance

      public static VssParameterContext getInstance(Object obj)
    • getGetLocalCopy

      public String getGetLocalCopy()
      Builds and returns the -G- flag if required.
      Returns:
      An empty string if get local copy is true.
    • calcDate

      private String calcDate(String startDate, int daysToAdd) throws ParseException
      Calculate the start date for version comparison.

      Calculate the date numDay days earlier than startdate.

      Parameters:
      startDate - The start date.
      daysToAdd - The number of days to add.
      Returns:
      The calculated date.
      Throws:
      ParseException
    • getFileTimeStamp

      public String getFileTimeStamp()
      Gets the value set for the FileTimeStamp. if it equals "current" then we return -GTC if it equals "modified" then we return -GTM if it equals "updated" then we return -GTU otherwise we return -GTC
      Returns:
      The default file time flag, if not set.
    • getLocalpath

      public String getLocalpath() throws ScmException
      Gets the localpath string. "-GLc:\source"

      The localpath is created if it didn't exist.

      Returns:
      An empty string if localpath is not set.
      Throws:
      ScmException
    • getLabel

      public String getLabel()
      Gets the label string. "-Lbuild1" Max label length is 32 chars
      Returns:
      An empty string if label is not set.
    • getVersionDateLabel

      public String getVersionDateLabel()
      Gets the version string. Returns the first specified of version "-V1.0", date "-Vd01.01.01", label "-Vlbuild1".
      Returns:
      An empty string if a version, date and label are not set.
    • getVersion

      public String getVersion()
      Gets the version string.
      Returns:
      An empty string if a version is not set.
    • getShortLabel

      private String getShortLabel()
      Return at most the 30 first chars of the label, logging a warning message about the truncation
      Returns:
      at most the 30 first chars of the label
    • getStyle

      public String getStyle()
      Gets the style string. "-Lbuild1"
      Returns:
      An empty string if label is not set.
    • getRecursive

      public String getRecursive()
      Gets the recursive string. "-R"
      Returns:
      An empty string if recursive is not set or is false.
    • getWritable

      public String getWritable()
      Gets the writable string. "-W"
      Returns:
      An empty string if writable is not set or is false.
    • getQuiet

      public String getQuiet()
      Gets the quiet string. -O-
      Returns:
      An empty string if quiet is not set or is false.
    • getVersionLabel

      public String getVersionLabel()
    • getUser

      public String getUser()
      Gets the user string. "-Uusername"
      Returns:
      An empty string if user is not set.
    • getComment

      public String getComment()
      Gets the comment string. "-Ccomment text"
      Returns:
      A comment of "-" if comment is not set.
    • getLogin

      public String getLogin()
      Gets the login string. This can be user and password, "-Yuser,password" or just user "-Yuser".
      Returns:
      An empty string if login is not set.
    • getAutoresponse

      public String getAutoresponse()
      Gets the auto response string. This can be Y "-I-Y" or N "-I-N".
      Returns:
      The default value "-I-" if autoresponse is not set.
    • getSSCommand

      public String getSSCommand()
      Gets the sscommand string. "ss" or "c:\path\to\ss"
      Returns:
      The path to ss.exe or just ss if sscommand is not set.
    • getVssPath

      public String getVssPath()
    • getVersionDate

      public String getVersionDate() throws ScmException
      Gets the Version date string.
      Returns:
      An empty string if neither Todate or from date are set.
      Throws:
      ScmException
    • getOutput

      public String getOutput()
      Gets the output file string. "-Ooutput.file"
      Returns:
      An empty string if user is not set.
    • getWritableFiles

      public String getWritableFiles()
      Gets the value to determine the behaviour when encountering writable files.
      Returns:
      An empty String, if not set.