|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.sourcejammer.client.simpletools.SimpleInterface
Title: $FileName: SimpleInterface.java$
setConfDirectory()
method to set the configuration, call the connect()
method to
connect to an archive, and then call the provided methods as needed.Field Summary | |
private static SimpleInterface |
instance
|
Constructor Summary | |
private |
SimpleInterface()
|
Method Summary | |
void |
addFile(long projectID,
java.lang.String fileName,
java.io.File localPath,
int historyType,
int fileType,
java.lang.String description)
Add specified file to specified project in SourceJammer archive. |
void |
addFile(long projectID,
java.lang.String fileName,
java.io.File localPath,
int historyType,
int fileType,
java.lang.String description,
java.lang.String afterAddAction)
Add specified file to specified project in SourceJammer archive. |
void |
addFile(long projectID,
java.lang.String fileName,
java.io.File localPath,
java.lang.String description)
Add specified file to specified project in SourceJammer archive. |
void |
addFile(long projectID,
java.lang.String fileName,
java.io.File localPath,
java.lang.String description,
java.lang.String afterAddAction)
Add specified file to specified project in SourceJammer archive. |
void |
addProject(long parentProjectID,
java.lang.String projectName)
Add a new project to the archive. |
void |
checkInFile(long fileID,
java.lang.String fileName,
java.io.File targetDir,
java.lang.String comment)
Check in the file. |
void |
checkInFile(long fileID,
java.lang.String fileName,
java.io.File targetDir,
java.lang.String comment,
java.lang.String afterCheckInAction)
Check in the file. |
void |
checkOutFile(long fileID,
java.lang.String fileName,
java.io.File targetDir,
int eolType)
Check out the file. |
void |
checkOutFileToStream(long fileID,
int eolType,
java.io.OutputStream stmOut)
Check out the file and stream file to the passed in OutputStream. |
org.sourcejammer.project.view.Project |
connect(java.lang.String archiveName,
java.lang.String url,
java.lang.String userName,
java.lang.String password)
Connects the SimpleInterface to the specified archive. |
void |
copyFile(long fileID,
long fromProjectID,
long toProjectID)
Copy a file from one project to another within the SourceJammer archive. |
void |
copyProject(long projectID,
long toProjectID,
java.lang.String newProjectName)
Copy a project and all of its contents to a new location within a SourceJammer archive. |
void |
disconnect()
Disconnect. |
void |
getFile(long fileID,
java.lang.String fileName,
java.io.File targetDir,
int eolType,
boolean printMessages,
boolean setReadOnly)
Get the file to the specified target directory without checking it out. |
org.sourcejammer.project.view.File |
getFileObj(long fileID)
Get File object for the specified file. |
void |
getFileToStream(long fileID,
int eolType,
java.io.OutputStream stmOut)
Streams the requested file into the passed in OutputStream. |
long |
getFileUniqueID(java.lang.String sjPath)
Returns unique id of File based on full sourcejammer path. |
GuiConf |
getGuiConf()
Return GuiConf object for current archive/user. |
static SimpleInterface |
getInstance()
Returns the singleton instance. |
void |
getLabel(long labelID,
java.io.File targetDir)
Gets the specified label to the content directory. |
void |
getLabel(long labelID,
int verNumber,
java.io.File targetDir,
boolean buildSubDirs,
int eolType)
Gets the specified label to the content directory. |
void |
getLabel(long labelID,
int verNumber,
java.io.File targetDir,
boolean buildSubDirs,
int eolType,
boolean setReadOnly)
|
void |
getProject(java.io.File targetDir,
org.sourcejammer.project.view.Project proj,
boolean bRecursive,
boolean bBuildSubDirs,
int iEOLType,
boolean makeReadOnly,
boolean verifyCheckIn)
Retrieves all files in the specified Project to the specified targetDirectory. |
org.sourcejammer.project.view.Project |
getProjectObj(long projectID)
Returns the Project object for the specified project. |
long |
getProjectUniqueID(java.lang.String sjPath)
Returns unique id of Project based on full sourcejammer path. |
private boolean |
isDefaultReadOnlyOnGet()
|
void |
moveFile(long fileID,
long fromProjectID,
long toProjectID)
Move a file from one project to another within the SourceJammer archive. |
void |
moveProject(long projectID,
long toProjectID,
java.lang.String newProjectName)
Move a project and all of its contents to a new location within a SourceJammer archive. |
void |
setConfDirectory(java.io.File confDir)
Sets the configuration directory. |
void |
setConfDirectory(java.lang.String confDir)
Sets the configuration directory. |
void |
setOut(java.io.PrintStream out)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static SimpleInterface instance
Constructor Detail |
private SimpleInterface()
Method Detail |
public static SimpleInterface getInstance()
public void setConfDirectory(java.io.File confDir) throws java.io.IOException
java.io.IOException
public void setConfDirectory(java.lang.String confDir) throws java.io.IOException
java.io.IOException
public org.sourcejammer.project.view.Project connect(java.lang.String archiveName, java.lang.String url, java.lang.String userName, java.lang.String password) throws java.net.MalformedURLException, java.io.IOException, org.sourcejammer.util.SourceJammerConnectionException, GUICommandException, NoSessionException
archiveName
- -- Name of archive to connect to.url
- -- URL of SourceJammer server.userName
- -- name of user to use when connecting.password
- -- user's password.
java.net.MalformedURLException
java.io.IOException
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
NoSessionException
public org.sourcejammer.project.view.Project getProjectObj(long projectID) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public org.sourcejammer.project.view.File getFileObj(long fileID) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void checkInFile(long fileID, java.lang.String fileName, java.io.File targetDir, java.lang.String comment) throws java.io.IOException, org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
java.io.IOException
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void checkInFile(long fileID, java.lang.String fileName, java.io.File targetDir, java.lang.String comment, java.lang.String afterCheckInAction) throws java.io.IOException, org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
java.io.IOException
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void getFile(long fileID, java.lang.String fileName, java.io.File targetDir, int eolType, boolean printMessages, boolean setReadOnly) throws java.io.IOException, org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
fileID
- -- unique id of the file.fileName
- -- name of the file (File.java, for example).targetDir
- -- directory whe the file will be "got" to.eolType
- -- the eol type to apply to all text files. This value must be
in AppConfig.EndOfLineType.setReadOnly
- -- if true
, file will be set to read-only after it's been downloaded.
java.io.IOException
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void getFileToStream(long fileID, int eolType, java.io.OutputStream stmOut) throws GUICommandException, java.io.IOException, org.sourcejammer.util.SourceJammerConnectionException
fileID
- -- unique id of the file.eolType
- -- the eol type to apply to all text files. This value must be
in AppConfig.EndOfLineType.stmOut
- -- an OutputStream to receive the file.
GUICommandException
java.io.IOException
org.sourcejammer.util.SourceJammerConnectionException
public void checkOutFile(long fileID, java.lang.String fileName, java.io.File targetDir, int eolType) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException, java.io.IOException
fileID
- -- unique id of the file.fileName
- -- name of the file (File.java, for example).targetDir
- -- directory whe the file will be "got" to.eolType
- -- the eol type to apply to all text files. This value must be
in AppConfig.EndOfLineType.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
java.io.IOException
public void checkOutFileToStream(long fileID, int eolType, java.io.OutputStream stmOut) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException, java.io.IOException
fileID
- -- unique id of the file.eolType
- -- the eol type to apply to all text files. This value must be
in AppConfig.EndOfLineType.stmOut
- -- an OutputStream to receive the file.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
java.io.IOException
public void addFile(long projectID, java.lang.String fileName, java.io.File localPath, int historyType, int fileType, java.lang.String description) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException, java.io.IOException
projectID
- -- id of parent project for file being added.fileName
- -- full name of file.localPath
- -- java.io.File object pointing file to be added.historyType
- -- History type. Must be a value in AppConfig.FileHistoryStorageTypes.fileType
- -- File type. Must be a value in AppConfig.FileTypes, but not LABEL.description
- -- a description of the file.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
java.io.IOException
public void addFile(long projectID, java.lang.String fileName, java.io.File localPath, int historyType, int fileType, java.lang.String description, java.lang.String afterAddAction) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException, java.io.IOException
projectID
- -- id of parent project for file being added.fileName
- -- full name of file.localPath
- -- java.io.File object pointing file to be added.historyType
- -- History type. Must be a value in AppConfig.FileHistoryStorageTypes.fileType
- -- File type. Must be a value in AppConfig.FileTypes, but not LABEL.description
- -- a description of the file.afterAddAction
- -- Action to take on local file after it has been added.
Choices are in SourceJammerClient--lfa_DELETE, lfa_NO_SPECIAL_ACTION, and lfa_SET_READ_ONLY.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
java.io.IOException
public void moveFile(long fileID, long fromProjectID, long toProjectID) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
fileID
- -- unique ID of the file to be moved.fromProjectID
- -- unique ID of current parent project of file to be moved.toProjectID
- -- uniquie ID of new parent project of file to be moved.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void copyFile(long fileID, long fromProjectID, long toProjectID) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
fileID
- -- unique ID of the file to be copied.fromProjectID
- -- unique ID of current parent project of file to be copied.toProjectID
- -- uniquie ID of new parent project of file to be copied.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void copyProject(long projectID, long toProjectID, java.lang.String newProjectName) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
projectID
- -- unique id of project to be copied.toProjectID
- -- unique id of new parent project of project to be copied.newProjectName
- -- new name to use for new project that is created by this copy action.
If null, current name of project to be copied will be used.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void moveProject(long projectID, long toProjectID, java.lang.String newProjectName) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
projectID
- -- unique id of project to be moved.toProjectID
- -- unique id of new parent project of project to be moved.newProjectName
- -- new name to use for new project that is created by this move action.
If null, current name of project to be moved will be used.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void addFile(long projectID, java.lang.String fileName, java.io.File localPath, java.lang.String description) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException, java.io.IOException
projectID
- -- id of parent project for file being added.fileName
- -- full name of file.localPath
- -- java.io.File object pointing file to be added.description
- -- a description of the file.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
java.io.IOException
public void addFile(long projectID, java.lang.String fileName, java.io.File localPath, java.lang.String description, java.lang.String afterAddAction) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException, java.io.IOException
projectID
- -- id of parent project for file being added.fileName
- -- full name of file.localPath
- -- java.io.File object pointing file to be added.description
- -- a description of the file.afterAddAction
- -- Action to take on local file after it has been added.
Choices are in SourceJammerClient--lfa_DELETE, lfa_NO_SPECIAL_ACTION, and lfa_SET_READ_ONLY.
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
java.io.IOException
public void addProject(long parentProjectID, java.lang.String projectName) throws org.sourcejammer.util.SourceJammerConnectionException, GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
public void getLabel(long labelID, int verNumber, java.io.File targetDir, boolean buildSubDirs, int eolType) throws GUICommandException, org.sourcejammer.util.SourceJammerConnectionException, java.io.IOException
labelID
- -- id of the label.verNumber
- -- version number of the label that you want to get. Use
-1
to use the latest version of the label.targetDir
- -- directory where the files will be downloaded to.eolType
- -- the eol type to apply to all text files. This value must be
in AppConfig.EndOfLineType.
GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
java.io.IOException
private boolean isDefaultReadOnlyOnGet()
public void getLabel(long labelID, int verNumber, java.io.File targetDir, boolean buildSubDirs, int eolType, boolean setReadOnly) throws GUICommandException, org.sourcejammer.util.SourceJammerConnectionException, java.io.IOException
GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
java.io.IOException
public void getLabel(long labelID, java.io.File targetDir) throws GUICommandException, org.sourcejammer.util.SourceJammerConnectionException, java.io.IOException
GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
java.io.IOException
public long getFileUniqueID(java.lang.String sjPath) throws GUICommandException, org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
public long getProjectUniqueID(java.lang.String sjPath) throws GUICommandException, org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
public void disconnect() throws GUICommandException, org.sourcejammer.util.SourceJammerConnectionException
GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
public void setOut(java.io.PrintStream out)
public void getProject(java.io.File targetDir, org.sourcejammer.project.view.Project proj, boolean bRecursive, boolean bBuildSubDirs, int iEOLType, boolean makeReadOnly, boolean verifyCheckIn) throws GUICommandException, org.sourcejammer.util.SourceJammerConnectionException, java.io.IOException
GUICommandException
org.sourcejammer.util.SourceJammerConnectionException
java.io.IOException
public GuiConf getGuiConf()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |