public class Sandbox extends Object
Modifier and Type | Field and Description |
---|---|
static SimpleDateFormat |
RLOG_DATEFORMAT |
Constructor and Description |
---|
Sandbox(APISession api,
Project cmProject,
String dir)
The Sandbox constructor
|
Modifier and Type | Method and Description |
---|---|
List<ScmFile> |
addNonMembers(String exclude,
String include,
String message)
Adds a list of files to the MKS Integrity SCM Project
|
List<ScmFile> |
checkInUpdates(String message)
Wrapper function to check-in all changes and drop members associated with missing working files
|
boolean |
create()
Creates a new Sandbox in the sandboxDir specified
|
com.mks.api.response.Response |
createSubproject(String dirPath)
Creates one subproject per directory, as required.
|
com.mks.api.response.Response |
drop()
Removes the registration for the Sandbox in the user's profile
|
static String |
formatFilePatterns(String pattern)
Fixes the default includes/excludes patterns for compatibility with MKS Integrity's 'si viewnonmembers' command
|
List<com.mks.api.response.WorkItem> |
getChangeList()
Executes a 'si viewsandbox' and parses the output for changed or dropped working files
|
ChangeLogSet |
getChangeLog(Date startDate,
Date endDate)
Executes the 'si rlog' command to generate a list of changed revision found between startDate and endDate
|
List<ScmFile> |
getNewMembers(String exclude,
String include)
Executes a 'si viewnonmembers' command filtering the results using the exclude and include lists
|
boolean |
getOverallAddSuccess()
Returns the overall success of the add operation
|
boolean |
getOverallCheckInSuccess()
Returns the overall success of the check-in operation
|
String |
getSandboxDir()
Returns the full path name to the current Sandbox directory
|
boolean |
hasWorkingFile(com.mks.api.response.Item wfdelta)
Inspects the MKS API Response object's Item field to determine whether or nor a working file exists
|
com.mks.api.response.Response |
lock(File memberFile,
String relativeName)
Executes a 'si lock' command using the relativeName of the file
|
com.mks.api.response.Response |
makeWriteable()
Executes a 'si makewritable' command to allow edits to all files in the Sandbox directory
|
com.mks.api.response.Response |
resync()
Resynchronizes an existing Sandbox
Assumes that the create() call has already been made to validate this sandbox
|
com.mks.api.response.Response |
revertMembers()
Executes a 'si revert' command to roll back changes to all files in the Sandbox directory
|
com.mks.api.response.Response |
unlock(File memberFile,
String relativeName)
Executes a 'si unlock' command using the relativeName of the file
|
public static final SimpleDateFormat RLOG_DATEFORMAT
public Sandbox(APISession api, Project cmProject, String dir)
api
- MKS API Session objectcmProject
- Project objectdir
- Absolute path to the location for the Sandbox directorypublic static String formatFilePatterns(String pattern)
pattern
- String pattern representing the includes/excludes file/directory listpublic String getSandboxDir()
public com.mks.api.response.Response lock(File memberFile, String relativeName) throws com.mks.api.response.APIException
memberFile
- Full path to the member's current sandbox locationrelativeName
- Relative path from the nearest subproject or projectcom.mks.api.response.APIException
public com.mks.api.response.Response unlock(File memberFile, String relativeName) throws com.mks.api.response.APIException
memberFile
- Full path to the member's current sandbox locationrelativeName
- Relative path from the nearest subproject or projectcom.mks.api.response.APIException
public com.mks.api.response.Response drop() throws com.mks.api.response.APIException
com.mks.api.response.APIException
public boolean create() throws com.mks.api.response.APIException
com.mks.api.response.APIException
public com.mks.api.response.Response resync() throws com.mks.api.response.APIException
com.mks.api.response.APIException
public com.mks.api.response.Response makeWriteable() throws com.mks.api.response.APIException
com.mks.api.response.APIException
public com.mks.api.response.Response revertMembers() throws com.mks.api.response.APIException
com.mks.api.response.APIException
public List<ScmFile> getNewMembers(String exclude, String include) throws com.mks.api.response.APIException
exclude
- Pattern containing the exclude file listinclude
- Pattern containing the include file listcom.mks.api.response.APIException
public List<ScmFile> addNonMembers(String exclude, String include, String message)
exclude
- Pattern containing the exclude file listinclude
- Pattern containing the include file listmessage
- Description for the member's archivepublic boolean getOverallAddSuccess()
public boolean hasWorkingFile(com.mks.api.response.Item wfdelta)
wfdelta
- MKS API Response object's Item representing the Working File Deltapublic List<com.mks.api.response.WorkItem> getChangeList() throws com.mks.api.response.APIException
com.mks.api.response.APIException
public List<ScmFile> checkInUpdates(String message)
message
- Description for the changespublic boolean getOverallCheckInSuccess()
public com.mks.api.response.Response createSubproject(String dirPath) throws com.mks.api.response.APIException
dirPath
- A relative path structure of folderscom.mks.api.response.APIException
public ChangeLogSet getChangeLog(Date startDate, Date endDate) throws com.mks.api.response.APIException
startDate
- The date range for the beginning of the operationendDate
- The date range for the end of the operationcom.mks.api.response.APIException
Copyright © 2003–2019 The Apache Software Foundation. All rights reserved.