|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ice.cvsc.CVSProject
The CVSProject class implements the concept of a local CVS project directory. A local project directory can be thought of as a local source code working directory that contains a CVS directory containing CVS administration files. Combined with CVSClient, this class provides everything you need to communicate with a CVS Server and maintain local working directories for CVS repositories.
CVSClient
Field Summary | |
static boolean |
debugEntryIO
|
static boolean |
deepDebug
|
static boolean |
overTraceProcessing
|
static boolean |
overTraceRequest
|
static boolean |
overTraceResponse
|
static boolean |
overTraceTCP
|
static java.lang.String |
RCS_ID
|
static java.lang.String |
RCS_REV
|
Constructor Summary | |
CVSProject()
Constructs a new CVSProject object. |
|
CVSProject(CVSClient client)
Constructs a new CVSProject object, setting the project's client to the one provided. |
Method Summary | |
void |
addEntryNotify(CVSEntryVector entries,
java.lang.String type,
java.lang.String options)
|
void |
addNewEntry(CVSEntry entry)
|
static java.lang.String |
adminPathToRootPath(java.lang.String dirName)
Parses a valid CVS Administration Directory path and returns the pathname of the working directory that the administration directory belongs to. |
boolean |
allowsGzipFileMode()
|
boolean |
checkOverwrite(CVSEntry entry,
java.io.File file)
|
boolean |
checkReleaseStatus(CVSIgnore ignore,
java.util.Vector mods,
java.util.Vector adds,
java.util.Vector rems,
java.util.Vector unks)
This is used for the 'release' command to determine if the project has any modifications the user might not want to lose. |
boolean |
copyFile(java.io.File from,
java.io.File to,
int translation,
boolean isGZIPed)
|
boolean |
copyFileAscii(java.io.File from,
java.io.File to,
boolean isGZIPed)
|
boolean |
copyFileRaw(java.io.File from,
java.io.File to,
boolean isGZIPed)
|
CVSEntry |
createItemEntry(CVSResponseItem item)
|
java.lang.StringBuffer |
dumpCVSProject(java.lang.StringBuffer buf,
java.lang.String description)
|
java.lang.StringBuffer |
dumpEntry(java.lang.StringBuffer buf,
java.lang.String prefix,
CVSEntry dirEntry)
|
boolean |
ensureEntryHierarchy(java.lang.String localDirectory,
java.lang.String repository)
|
boolean |
ensureLocalTree(java.io.File localFile,
boolean ensureAdmin)
|
boolean |
ensureProperWorkingDirectory(java.lang.String localRoot,
java.lang.String subPath,
boolean ensureAdmin)
|
CVSResponse |
ensureRepositoryPath(CVSUserInterface ui,
java.lang.String localDirectory,
CVSResponse resultResp)
Guarentees that the repository contains the path specified. |
static java.lang.String |
entriesPathToAdminPath(java.lang.String entriesPath)
Parses a valid CVS Entries File pathname and returns the pathname of the admin directory that the entries files belongs to. |
CVSEntry |
entryLineToEntry(java.lang.String entryLine)
|
void |
establishNewDirSticky(CVSRequest request,
CVSEntry entry)
This methods deal with adding a new directory which is not yet in the repository, and yet, whose parent directory has a sticky tag set. |
void |
establishRootEntry(java.lang.String repository)
|
void |
establishStatics(CVSRequest request)
|
void |
establishStickys(CVSRequest request)
|
static java.lang.String |
getAdminEntriesPath(java.lang.String adminDirPath)
Given the administrative directory pathname, return the full pathname of the 'Entries' file. |
static java.lang.String |
getAdminNotifyPath(java.lang.String adminDirPath)
Given the administrative directory pathname, return the full pathname of the 'Notify' file. |
static java.lang.String |
getAdminPrefsPath(java.lang.String adminDirPath)
Given the administrative directory pathname, return the full pathname of the project preferences file. |
static java.lang.String |
getAdminRepositoryPath(java.lang.String adminDirPath)
Given the administrative directory pathname, return the full pathname of the 'Repository' file. |
static java.lang.String |
getAdminRootPath(java.lang.String adminDirPath)
Given the administrative directory pathname, return the full pathname of the 'Root' file. |
CVSClient |
getClient()
Returns the client this project is set to use. |
int |
getConnectionMethod()
|
int |
getConnectionPort()
|
CVSEntry |
getDirEntryForLocalDir(java.lang.String localDir)
Given a 'local directory' (in the protocol sense), get the corresponding directory CVSEntry. |
java.io.File |
getEntryFile(CVSEntry entry)
|
int |
getGzipStreamLevel()
|
java.io.File |
getLocalEntryFile(CVSEntry entry)
|
java.lang.String |
getLocalRootDirectory()
|
java.lang.String |
getLocalRootPath()
Returns the full local pathname for the root directory of this project. |
java.lang.String |
getPassword()
|
CVSProjectDef |
getProjectDef()
|
java.lang.String |
getRepository()
|
java.lang.String |
getRootDirectory()
|
CVSEntry |
getRootEntry()
|
java.lang.String |
getRshProcess()
|
java.lang.String |
getServerCommand()
|
java.lang.String[] |
getSetVariables()
Returns the project's user set variables. |
java.lang.String |
getTempDirectory()
|
java.lang.String |
getUserName()
|
boolean |
handleResponseItem(CVSRequest request,
CVSResponse response,
CVSResponseItem item)
|
boolean |
hasValidLogin(java.lang.String userName)
|
void |
includeNotifies(CVSRequest request)
|
boolean |
isLocalFileModified(CVSEntry entry)
|
boolean |
isPServer()
|
boolean |
isSSHServer()
|
static boolean |
isValidAdminPath(java.lang.String dirName)
Determines if a pathname, provided by the dirName parameter, is a valid CVS administration directory (i.e., is a directory named 'CVS'). |
CVSEntry |
locateEntry(java.lang.String fullPath)
|
void |
moveLocalFile(java.io.File localFile,
java.lang.String versionStr)
|
java.lang.String |
normalizeLocalDirectory(java.lang.String pathName,
java.lang.String repository)
Given a local-directory returned from the server, make sure the local-directory is in a format that jCVS can make use of (i.e., via the pathTable). |
void |
openProject(java.io.File localRootFile)
|
CVSNotifyItem |
parseNotifyLine(java.lang.String notifyLine)
|
boolean |
performCopyFile(CVSResponseItem item)
|
boolean |
performCVSRequest(CVSRequest request)
|
boolean |
performCVSRequest(CVSRequest request,
CVSResponse response)
|
boolean |
processCVSResponse(CVSRequest request,
CVSResponse response)
|
protected boolean |
processNotified(CVSResponseItem item)
|
void |
pruneEmptySubDirs(boolean saveAdminFiles)
|
void |
pruneEmptySubDirs(CVSEntry parent)
|
boolean |
readEntries()
|
CVSEntryVector |
readEntriesFile(CVSEntry dirEntry,
java.io.File workingDirectory)
|
java.lang.String |
readRepository(java.io.File reposFile)
|
java.lang.String |
readRootDirectory(java.io.File rootFile)
|
void |
releaseProject()
|
void |
removeAllEntries()
|
boolean |
removeEntriesItem(CVSResponseItem item)
|
java.lang.String |
reposNameToFileName(java.lang.String fullRepos)
|
java.lang.String |
reposNameToRepository(java.lang.String fullRepos)
|
static java.lang.String |
rootPathToAdminPath(java.lang.String dirName)
Given a root path, returns the administration directory path corresponding to root's project. |
void |
setAllowsGzipFileMode(boolean allow)
|
void |
setClient(CVSClient client)
|
void |
setConnectionMethod(int method)
|
void |
setConnectionPort(int port)
|
void |
setGzipStreamLevel(int level)
|
void |
setLocalRootDirectory(java.lang.String dirName)
|
void |
setPassword(java.lang.String password)
|
void |
setProjectDef(CVSProjectDef projectDef)
|
void |
setPServer(boolean isPServer)
|
void |
setRepository(java.lang.String repository)
|
void |
setRootDirectory(java.lang.String rootDirectory)
|
void |
setRshProcess(java.lang.String rshProcess)
|
void |
setServerCommand(java.lang.String command)
|
void |
setSetVariables(java.lang.String[] vars)
Sets the project's user set variables. |
boolean |
setStaticDirectory(CVSResponseItem item,
boolean isSet,
boolean writeFile)
|
boolean |
setSticky(CVSResponseItem item,
boolean isSet,
boolean writeFile)
|
void |
setTempDirectory(java.lang.String dirName)
|
void |
setUserName(java.lang.String name)
|
java.lang.String |
toString()
|
void |
uiDisplayProgramError(java.lang.String error)
|
void |
uiDisplayProgressMsg(java.lang.String message)
|
void |
uiDisplayResponse(CVSResponse response)
|
void |
updateEntriesItem(CVSEntry newEntry)
Given an entry, update the entry in our project. |
boolean |
updateLocalFile(CVSResponseItem item,
CVSEntry entry,
java.io.File localFile)
|
static boolean |
verifyAdminDirectory(java.lang.String dirName)
Verifies that a directory path is a valid CVS administration directory. |
boolean |
verifyPassword(CVSUserInterface ui,
java.lang.String userName,
java.lang.String password,
boolean trace)
|
boolean |
writeAdminEntriesFile(java.io.File entriesFile,
CVSEntryVector entries)
|
boolean |
writeAdminFiles()
|
boolean |
writeAdminRepositoryFile(java.io.File repFile,
java.lang.String repository)
|
boolean |
writeAdminRootFile(java.io.File rootFile,
java.lang.String rootDirectoryStr)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String RCS_ID
public static final java.lang.String RCS_REV
public static boolean overTraceRequest
public static boolean overTraceResponse
public static boolean overTraceProcessing
public static boolean overTraceTCP
public static boolean deepDebug
public static boolean debugEntryIO
Constructor Detail |
public CVSProject()
public CVSProject(CVSClient client)
client
- A CVSClient object to be used by this
project for all CVS server requests.Method Detail |
public static boolean isValidAdminPath(java.lang.String dirName)
dirName
- the pathname of the directory in questionpublic static java.lang.String rootPathToAdminPath(java.lang.String dirName)
dirName
- the pathname of the root directorypublic static java.lang.String adminPathToRootPath(java.lang.String dirName)
dirName
- the pathname of the admin directorypublic static java.lang.String entriesPathToAdminPath(java.lang.String entriesPath)
entriesPath
- The pathname of the Entries file.public static boolean verifyAdminDirectory(java.lang.String dirName)
dirName
- the pathname of the admin directory
public static java.lang.String getAdminEntriesPath(java.lang.String adminDirPath)
adminDirPath
- The pathname of the admin ('CVS') directory.public static java.lang.String getAdminRepositoryPath(java.lang.String adminDirPath)
adminDirPath
- The pathname of the admin ('CVS') directory.public static java.lang.String getAdminRootPath(java.lang.String adminDirPath)
adminDirPath
- The pathname of the admin ('CVS') directory.public static java.lang.String getAdminNotifyPath(java.lang.String adminDirPath)
adminDirPath
- The pathname of the admin ('CVS') directory.public static java.lang.String getAdminPrefsPath(java.lang.String adminDirPath)
adminDirPath
- The pathname of the admin ('CVS') directory.public CVSClient getClient()
CVSClient
public void setClient(CVSClient client)
public java.lang.String getRepository()
public void setRepository(java.lang.String repository)
public boolean isPServer()
public void setPServer(boolean isPServer)
public boolean allowsGzipFileMode()
public void setAllowsGzipFileMode(boolean allow)
public int getGzipStreamLevel()
public void setGzipStreamLevel(int level)
public java.lang.String getUserName()
public void setUserName(java.lang.String name)
public java.lang.String getPassword()
public void setPassword(java.lang.String password)
public java.lang.String getRootDirectory()
public void setRootDirectory(java.lang.String rootDirectory)
public java.lang.String getLocalRootPath()
public java.lang.String getLocalRootDirectory()
public void setLocalRootDirectory(java.lang.String dirName)
public java.lang.String getTempDirectory()
public void setTempDirectory(java.lang.String dirName)
public int getConnectionPort()
public void setConnectionPort(int port)
public int getConnectionMethod()
public void setConnectionMethod(int method)
public boolean isSSHServer()
public java.lang.String getServerCommand()
public void setServerCommand(java.lang.String command)
public java.lang.String getRshProcess()
public void setRshProcess(java.lang.String rshProcess)
public java.lang.String[] getSetVariables()
public void setSetVariables(java.lang.String[] vars)
vars
- The new user set variables.public CVSEntry getRootEntry()
public CVSProjectDef getProjectDef()
public void setProjectDef(CVSProjectDef projectDef)
public java.io.File getEntryFile(CVSEntry entry)
public boolean hasValidLogin(java.lang.String userName)
public void addEntryNotify(CVSEntryVector entries, java.lang.String type, java.lang.String options)
public void includeNotifies(CVSRequest request)
public boolean verifyPassword(CVSUserInterface ui, java.lang.String userName, java.lang.String password, boolean trace)
public CVSEntry getDirEntryForLocalDir(java.lang.String localDir)
localDir
- The directory's 'local directory' name.public CVSResponse ensureRepositoryPath(CVSUserInterface ui, java.lang.String localDirectory, CVSResponse resultResp)
ui
- The CVS User Interface to display the progress.localDirectory
- The relative path to ensure.
public void establishNewDirSticky(CVSRequest request, CVSEntry entry)
public void establishStickys(CVSRequest request)
public void establishStatics(CVSRequest request)
public boolean performCVSRequest(CVSRequest request)
public boolean performCVSRequest(CVSRequest request, CVSResponse response)
public CVSEntry entryLineToEntry(java.lang.String entryLine)
public java.io.File getLocalEntryFile(CVSEntry entry)
public java.lang.String normalizeLocalDirectory(java.lang.String pathName, java.lang.String repository)
pathName
- The local-directory from the server.repository
- The repository the server sent with this local-directory.
public CVSEntry createItemEntry(CVSResponseItem item)
public boolean handleResponseItem(CVSRequest request, CVSResponse response, CVSResponseItem item)
handleResponseItem
in interface CVSResponseHandler
public boolean processCVSResponse(CVSRequest request, CVSResponse response)
public boolean performCopyFile(CVSResponseItem item)
public boolean setSticky(CVSResponseItem item, boolean isSet, boolean writeFile)
public boolean setStaticDirectory(CVSResponseItem item, boolean isSet, boolean writeFile)
public CVSNotifyItem parseNotifyLine(java.lang.String notifyLine)
protected boolean processNotified(CVSResponseItem item)
public java.lang.String readRootDirectory(java.io.File rootFile)
public java.lang.String readRepository(java.io.File reposFile)
public void establishRootEntry(java.lang.String repository)
repository
- The server's repository pathname for the root.public void openProject(java.io.File localRootFile) throws java.io.IOException
java.io.IOException
public void removeAllEntries()
public void addNewEntry(CVSEntry entry)
public java.lang.String reposNameToRepository(java.lang.String fullRepos)
public java.lang.String reposNameToFileName(java.lang.String fullRepos)
public boolean removeEntriesItem(CVSResponseItem item)
public void updateEntriesItem(CVSEntry newEntry)
newEntry
- The entry to update.public boolean readEntries()
public CVSEntryVector readEntriesFile(CVSEntry dirEntry, java.io.File workingDirectory)
dirEntry
- The entry of the directory being loaded.workingDirectory
- The local file system directory of dirEntry.public boolean writeAdminFiles()
public boolean writeAdminEntriesFile(java.io.File entriesFile, CVSEntryVector entries)
public boolean writeAdminRootFile(java.io.File rootFile, java.lang.String rootDirectoryStr)
public boolean writeAdminRepositoryFile(java.io.File repFile, java.lang.String repository)
public boolean isLocalFileModified(CVSEntry entry)
public boolean checkReleaseStatus(CVSIgnore ignore, java.util.Vector mods, java.util.Vector adds, java.util.Vector rems, java.util.Vector unks)
public void pruneEmptySubDirs(boolean saveAdminFiles)
public void pruneEmptySubDirs(CVSEntry parent)
public void releaseProject()
public boolean checkOverwrite(CVSEntry entry, java.io.File file)
public CVSEntry locateEntry(java.lang.String fullPath)
public boolean ensureEntryHierarchy(java.lang.String localDirectory, java.lang.String repository)
public boolean ensureProperWorkingDirectory(java.lang.String localRoot, java.lang.String subPath, boolean ensureAdmin)
public boolean ensureLocalTree(java.io.File localFile, boolean ensureAdmin)
public void moveLocalFile(java.io.File localFile, java.lang.String versionStr) throws CVSFileException
CVSFileException
public boolean updateLocalFile(CVSResponseItem item, CVSEntry entry, java.io.File localFile)
public boolean copyFile(java.io.File from, java.io.File to, int translation, boolean isGZIPed)
public boolean copyFileAscii(java.io.File from, java.io.File to, boolean isGZIPed)
public boolean copyFileRaw(java.io.File from, java.io.File to, boolean isGZIPed)
public void uiDisplayProgressMsg(java.lang.String message)
public void uiDisplayProgramError(java.lang.String error)
public void uiDisplayResponse(CVSResponse response)
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.StringBuffer dumpCVSProject(java.lang.StringBuffer buf, java.lang.String description)
public java.lang.StringBuffer dumpEntry(java.lang.StringBuffer buf, java.lang.String prefix, CVSEntry dirEntry)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |