Class MSVSS
- java.lang.Object
- 
- org.apache.tools.ant.ProjectComponent
- 
- org.apache.tools.ant.Task
- 
- org.apache.tools.ant.taskdefs.optional.vss.MSVSS
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- MSVSSConstants
 - Direct Known Subclasses:
- MSVSSADD,- MSVSSCHECKIN,- MSVSSCHECKOUT,- MSVSSCP,- MSVSSCREATE,- MSVSSGET,- MSVSSHISTORY,- MSVSSLABEL
 
 public abstract class MSVSS extends Task implements MSVSSConstants A base class for creating tasks for executing commands on Visual SourceSafe.The class extends the 'exec' task as it operates by executing the ss.exe program supplied with SourceSafe. By default the task expects ss.exe to be in the path, you can override this be specifying the ssdir attribute. This class provides set and get methods for 'login' and 'vsspath' attributes. It also contains constants for the flags that can be passed to SS. 
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description static classMSVSS.CurrentModUpdatedExtension of EnumeratedAttribute to hold the values for file time stamp.static classMSVSS.WritableFilesExtension of EnumeratedAttribute to hold the values for writable filess.
 - 
Field Summary- 
Fields inherited from class org.apache.tools.ant.ProjectComponentdescription, location, project
 - 
Fields inherited from interface org.apache.tools.ant.taskdefs.optional.vss.MSVSSConstantsCOMMAND_ADD, COMMAND_CHECKIN, COMMAND_CHECKOUT, COMMAND_CP, COMMAND_CREATE, COMMAND_GET, COMMAND_HISTORY, COMMAND_LABEL, FLAG_AUTORESPONSE_DEF, FLAG_AUTORESPONSE_NO, FLAG_AUTORESPONSE_YES, FLAG_BRIEF, FLAG_CODEDIFF, FLAG_COMMENT, FLAG_FILETIME_DEF, FLAG_FILETIME_MODIFIED, FLAG_FILETIME_UPDATED, FLAG_LABEL, FLAG_LOGIN, FLAG_NO_FILE, FLAG_NO_GET, FLAG_OUTPUT, FLAG_OVERRIDE_WORKING_DIR, FLAG_QUIET, FLAG_RECURSION, FLAG_REPLACE_WRITABLE, FLAG_SKIP_WRITABLE, FLAG_USER, FLAG_VERSION, FLAG_VERSION_DATE, FLAG_VERSION_LABEL, FLAG_WRITABLE, PROJECT_PREFIX, SS_EXE, STYLE_BRIEF, STYLE_CODEDIFF, STYLE_DEFAULT, STYLE_NOFILE, TIME_CURRENT, TIME_MODIFIED, TIME_UPDATED, VALUE_FROMDATE, VALUE_FROMLABEL, VALUE_NO, VALUE_YES, WRITABLE_FAIL, WRITABLE_REPLACE, WRITABLE_SKIP
 
- 
 - 
Constructor SummaryConstructors Constructor Description MSVSS()
 - 
Method SummaryModifier and Type Method Description voidexecute()Executes the task.protected java.lang.StringgetAutoresponse()Gets the auto response string.protected java.lang.StringgetComment()Gets the comment string.java.lang.StringgetFileTimeStamp()Gets the value set for the FileTimeStamp.protected java.lang.StringgetGetLocalCopy()Builds and returns the -G- flag if required.protected java.lang.StringgetLabel()Gets the label string.protected java.lang.StringgetLocalpath()Gets the localpath string.protected java.lang.StringgetLogin()Gets the login string.protected java.lang.StringgetOutput()Gets the output file string.protected java.lang.StringgetQuiet()Gets the quiet string.protected java.lang.StringgetRecursive()Gets the recursive string.protected java.lang.StringgetSSCommand()Gets the sscommand string.protected java.lang.StringgetStyle()Gets the style string.protected java.lang.StringgetUser()Gets the user string.protected java.lang.StringgetVersion()Gets the version string.protected java.lang.StringgetVersionDate()Gets the Version date string.protected java.lang.StringgetVersionDateLabel()Gets the version string.protected java.lang.StringgetVersionLabel()Gets the version string.protected java.lang.StringgetVsspath()Gets the vssserverpath string.protected java.lang.StringgetWritable()Gets the writable string.java.lang.StringgetWritableFiles()Gets the value to determine the behaviour when encountering writable files.voidsetFailOnError(boolean failOnError)Indicates if the build should fail if the Sourcesafe command does.protected voidsetInternalAutoResponse(java.lang.String autoResponse)Set the auto response attribute.protected voidsetInternalComment(java.lang.String comment)Set the internal comment attribute.protected voidsetInternalDate(java.lang.String date)Set the date attribute.protected voidsetInternalDateFormat(java.text.DateFormat dateFormat)Set the date format attribute.protected voidsetInternalFailOnError(boolean failOnError)Set the failOnError attribute.protected voidsetInternalFileTimeStamp(MSVSS.CurrentModUpdated timestamp)Set the timestamp attribute.protected voidsetInternalFromDate(java.lang.String fromDate)Set the from date attribute.protected voidsetInternalFromLabel(java.lang.String fromLabel)Set the from label attribute.protected voidsetInternalGetLocalCopy(boolean getLocalCopy)Set the getLocalCopy attribute.protected voidsetInternalLabel(java.lang.String label)Set the label attribute.protected voidsetInternalLocalPath(java.lang.String localPath)Set the local path comment attribute.protected voidsetInternalNumDays(int numDays)Set the num days attribute.protected voidsetInternalOutputFilename(java.lang.String outputFileName)Set the outputFileName comment attribute.protected voidsetInternalQuiet(boolean quiet)Set the quiet attribute.protected voidsetInternalRecursive(boolean recursive)Set the recursive attribute.protected voidsetInternalStyle(java.lang.String style)Set the style attribute.protected voidsetInternalToDate(java.lang.String toDate)Set the to date attribute.protected voidsetInternalToLabel(java.lang.String toLabel)Set the to label attribute.protected voidsetInternalUser(java.lang.String user)Set the user attribute.protected voidsetInternalVersion(java.lang.String version)Set the version attribute.protected voidsetInternalWritable(boolean writable)Set the writable attribute.protected voidsetInternalWritableFiles(MSVSS.WritableFiles writableFiles)Set the writableFiles attribute.voidsetLogin(java.lang.String vssLogin)Login to use when accessing VSS, formatted as "username,password".voidsetServerpath(java.lang.String serverPath)Directory wheresrssafe.iniresides.voidsetSsdir(java.lang.String dir)Directory wheress.exeresides.voidsetVsspath(java.lang.String vssPath)SourceSafe path which specifies the project/file(s) you wish to perform the action on.- 
Methods inherited from class org.apache.tools.ant.TaskbindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 - 
Methods inherited from class org.apache.tools.ant.ProjectComponentclone, getDescription, getLocation, getProject, setDescription, setLocation, setProject
 
- 
 
- 
- 
- 
Method Detail- 
setSsdirpublic final void setSsdir(java.lang.String dir) Directory wheress.exeresides. By default the task expects it to be in the PATH.- Parameters:
- dir- The directory containing ss.exe.
 
 - 
setLoginpublic final void setLogin(java.lang.String vssLogin) Login to use when accessing VSS, formatted as "username,password".You can omit the password if your database is not password protected. If you have a password and omit it, Ant will hang. - Parameters:
- vssLogin- The login string to use.
 
 - 
setVsspathpublic final void setVsspath(java.lang.String vssPath) SourceSafe path which specifies the project/file(s) you wish to perform the action on.A prefix of 'vss://' will be removed if specified. - Parameters:
- vssPath- The VSS project path.
 
 - 
setServerpathpublic final void setServerpath(java.lang.String serverPath) Directory wheresrssafe.iniresides.- Parameters:
- serverPath- The path to the VSS server.
 
 - 
setFailOnErrorpublic final void setFailOnError(boolean failOnError) Indicates if the build should fail if the Sourcesafe command does. Defaults to true.- Parameters:
- failOnError- True if task should fail on any error.
 
 - 
executepublic void execute() throws BuildExceptionExecutes the task.Builds a command line to execute ss.exe and then calls Exec's run method to execute the command line. - Overrides:
- executein class- Task
- Throws:
- BuildException- if the command cannot execute.
 
 - 
setInternalCommentprotected void setInternalComment(java.lang.String comment) Set the internal comment attribute.- Parameters:
- comment- the value to use.
 
 - 
setInternalAutoResponseprotected void setInternalAutoResponse(java.lang.String autoResponse) Set the auto response attribute.- Parameters:
- autoResponse- the value to use.
 
 - 
setInternalDateprotected void setInternalDate(java.lang.String date) Set the date attribute.- Parameters:
- date- the value to use.
 
 - 
setInternalDateFormatprotected void setInternalDateFormat(java.text.DateFormat dateFormat) Set the date format attribute.- Parameters:
- dateFormat- the value to use.
 
 - 
setInternalFailOnErrorprotected void setInternalFailOnError(boolean failOnError) Set the failOnError attribute.- Parameters:
- failOnError- the value to use.
 
 - 
setInternalFromDateprotected void setInternalFromDate(java.lang.String fromDate) Set the from date attribute.- Parameters:
- fromDate- the value to use.
 
 - 
setInternalFromLabelprotected void setInternalFromLabel(java.lang.String fromLabel) Set the from label attribute.- Parameters:
- fromLabel- the value to use.
 
 - 
setInternalLabelprotected void setInternalLabel(java.lang.String label) Set the label attribute.- Parameters:
- label- the value to use.
 
 - 
setInternalLocalPathprotected void setInternalLocalPath(java.lang.String localPath) Set the local path comment attribute.- Parameters:
- localPath- the value to use.
 
 - 
setInternalNumDaysprotected void setInternalNumDays(int numDays) Set the num days attribute.- Parameters:
- numDays- the value to use.
 
 - 
setInternalOutputFilenameprotected void setInternalOutputFilename(java.lang.String outputFileName) Set the outputFileName comment attribute.- Parameters:
- outputFileName- the value to use.
 
 - 
setInternalQuietprotected void setInternalQuiet(boolean quiet) Set the quiet attribute.- Parameters:
- quiet- the value to use.
 
 - 
setInternalRecursiveprotected void setInternalRecursive(boolean recursive) Set the recursive attribute.- Parameters:
- recursive- the value to use.
 
 - 
setInternalStyleprotected void setInternalStyle(java.lang.String style) Set the style attribute.- Parameters:
- style- the value to use.
 
 - 
setInternalToDateprotected void setInternalToDate(java.lang.String toDate) Set the to date attribute.- Parameters:
- toDate- the value to use.
 
 - 
setInternalToLabelprotected void setInternalToLabel(java.lang.String toLabel) Set the to label attribute.- Parameters:
- toLabel- the value to use.
 
 - 
setInternalUserprotected void setInternalUser(java.lang.String user) Set the user attribute.- Parameters:
- user- the value to use.
 
 - 
setInternalVersionprotected void setInternalVersion(java.lang.String version) Set the version attribute.- Parameters:
- version- the value to use.
 
 - 
setInternalWritableprotected void setInternalWritable(boolean writable) Set the writable attribute.- Parameters:
- writable- the value to use.
 
 - 
setInternalFileTimeStampprotected void setInternalFileTimeStamp(MSVSS.CurrentModUpdated timestamp) Set the timestamp attribute.- Parameters:
- timestamp- the value to use.
 
 - 
setInternalWritableFilesprotected void setInternalWritableFiles(MSVSS.WritableFiles writableFiles) Set the writableFiles attribute.- Parameters:
- writableFiles- the value to use.
 
 - 
setInternalGetLocalCopyprotected void setInternalGetLocalCopy(boolean getLocalCopy) Set the getLocalCopy attribute.- Parameters:
- getLocalCopy- the value to use.
 
 - 
getSSCommandprotected java.lang.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.
 
 - 
getVsspathprotected java.lang.String getVsspath() Gets the vssserverpath string.- Returns:
- null if vssserverpath is not set.
 
 - 
getQuietprotected java.lang.String getQuiet() Gets the quiet string. -O-- Returns:
- An empty string if quiet is not set or is false.
 
 - 
getRecursiveprotected java.lang.String getRecursive() Gets the recursive string. "-R"- Returns:
- An empty string if recursive is not set or is false.
 
 - 
getWritableprotected java.lang.String getWritable() Gets the writable string. "-W"- Returns:
- An empty string if writable is not set or is false.
 
 - 
getLabelprotected java.lang.String getLabel() Gets the label string. "-Lbuild1" Max label length is 32 chars- Returns:
- An empty string if label is not set.
 
 - 
getStyleprotected java.lang.String getStyle() Gets the style string. "-Lbuild1"- Returns:
- An empty string if label is not set.
 
 - 
getVersionDateLabelprotected java.lang.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.
 
 - 
getVersionprotected java.lang.String getVersion() Gets the version string.- Returns:
- An empty string if a version is not set.
 
 - 
getLocalpathprotected java.lang.String getLocalpath() Gets the localpath string. "-GLc:\source"The localpath is created if it didn't exist. - Returns:
- An empty string if localpath is not set.
 
 - 
getCommentprotected java.lang.String getComment() Gets the comment string. "-Ccomment text"- Returns:
- A comment of "-" if comment is not set.
 
 - 
getAutoresponseprotected java.lang.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.
 
 - 
getLoginprotected java.lang.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.
 
 - 
getOutputprotected java.lang.String getOutput() Gets the output file string. "-Ooutput.file"- Returns:
- An empty string if user is not set.
 
 - 
getUserprotected java.lang.String getUser() Gets the user string. "-Uusername"- Returns:
- An empty string if user is not set.
 
 - 
getVersionLabelprotected java.lang.String getVersionLabel() Gets the version string. This can be to-from "-VLbuild2~Lbuild1", from "~Lbuild1" or to "-VLbuild2".- Returns:
- An empty string if neither tolabel or fromlabel are set.
 
 - 
getVersionDateprotected java.lang.String getVersionDate() throws BuildExceptionGets the Version date string.- Returns:
- An empty string if neither Todate or from date are set.
- Throws:
- BuildException- if there is an error.
 
 - 
getGetLocalCopyprotected java.lang.String getGetLocalCopy() Builds and returns the -G- flag if required.- Returns:
- An empty string if get local copy is true.
 
 - 
getFileTimeStamppublic java.lang.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.
 
 - 
getWritableFilespublic java.lang.String getWritableFiles() Gets the value to determine the behaviour when encountering writable files.- Returns:
- An empty String, if not set.
 
 
- 
 
-