|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.starteam.StatusMethod
public final class StatusMethod
This class provides information about how file status is managed for the client. Prior to StarTeam 5.2 all file status information was stored on the StarTeam Server. In 5.2 this status information moved to the client. There are two ways in which that status information can be stored. These are referred to as "Per folder" and "Central"
"Per folder" status information is stored as close to the source file as possible. Assuming a file under revision control is stored in C:/project/foo.txt then the status information for that file will be stored in C:/project/.sbas/SyncDB. In fact, the status information for all files under C:/project will be stored in the file. There are a number of advantages of storing it in this location. For example, whole local folder structures may be moved or copied to new locations and all the status information will go along with it. The down side to this scheme is that in some cases users will not want the .sbas folders mixed in with the source files they are managing with StarTeam.
"Central" status information is all stored under a single user specified directory on the client's machine. This keeps the status information away from the user's source files. The down side to this approach is that you cannot easily move or copy source directories and have status information go along with it.
Users may specify which of these two methods to use by default along with the location of the central status information. Additionally, users may override this on a per-View basis.
View.getStatusMethodOverride(),
View.setStatusMethodOverride(com.starteam.StatusMethod)| Nested Class Summary | |
|---|---|
static class |
StatusMethod.FileStatus
A FileStatus represents a combination of a file name and its status information from the status database (syncdb) on disk. |
| Field Summary | |
|---|---|
static StatusMethod |
CENTRAL
Identifies the "Central" status management method. |
static StatusMethod |
DEFAULT
Used for specifying a View's status method. |
static StatusMethod |
PER_FOLDER
Identifies the "Per folder" status management method. |
static StatusMethod |
WORKSPACE
Identifies a "Custom" central status management method. |
| Method Summary | |
|---|---|
static void |
deleteSyncDB(java.io.File syncDirRoot,
java.lang.String key)
Deletes all the status information for the specified directory path. |
static java.lang.String |
getCentralStatusDirectory()
Returns the location of the central status repository. |
static FileBasedStatusManager |
getCentralStatusManager()
Gets a FileBasedStatusManager for managing status in the central location for this workstation. |
static FileBasedStatusManager |
getDefaultStatusManager()
Gets the default FileBasedStatusManager for this workstation. |
static StatusMethod |
getDefaultStatusMethod()
Returns the client's default method for storing status information. |
java.lang.String |
getDisplayName()
Gets the display name for this StatusMethod. |
java.lang.String |
getName()
Gets the internal name for this StatusMethod. |
static FileBasedStatusManager |
getPerFolderStatusManager()
Gets a FileBasedStatusManager for managing status on a per-folder basis. |
static java.lang.String[] |
getSourceDirs(java.io.File syncDirRoot)
Given a root directory which contains centrally managed status data, this method will return an enumeration of all the local directory paths for which there is status data. |
static int |
getSourceDirsCount(java.io.File syncDirRoot)
Returns the number of local directories that the specified centrally managed status directory is maintaining. |
static StatusMethod.FileStatus[] |
getStatusInformation(java.lang.String path)
Given a directory path for which there is centrally managed status data, return the collection of all FileStatuses representing cached status data for files in this path |
static FileBasedStatusManager |
getStatusManager(View view)
Gets the FileBasedStatusManager that manages file status information for the given View. |
static FileBasedStatusManager |
getStatusManager(View view,
GUID serverGUID)
Gets the FileBasedStatusManager that manages file status information for the given View and Server ID. |
static FileBasedStatusManager |
getWorkspaceStatusManager(java.lang.String path)
Gets a FileBasedStatusManager for managing status on a workspace basis. |
static void |
setCentralStatusDirectory(java.lang.String path)
Change the location of the central status directory. |
static void |
setDefaultStatusMethod(StatusMethod method)
Sets the client's default method for storing status information. |
java.lang.String |
toString()
Returns the string representation for this status method |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final StatusMethod DEFAULT
public static final StatusMethod CENTRAL
public static final StatusMethod PER_FOLDER
public static final StatusMethod WORKSPACE
| Method Detail |
|---|
public java.lang.String getDisplayName()
public java.lang.String getName()
public java.lang.String toString()
toString in class java.lang.Objectpublic static StatusMethod getDefaultStatusMethod()
public static void setDefaultStatusMethod(StatusMethod method)
method - the status method to use. Only possible values are PER_FOLDER
and CENTRAL. May not be null.
public static void setCentralStatusDirectory(java.lang.String path)
throws java.io.IOException
path - the new directory path for central storage of status data
java.io.IOExceptionpublic static java.lang.String getCentralStatusDirectory()
public static FileBasedStatusManager getDefaultStatusManager()
StatusMethod.DEFAULT,
FileBasedStatusManagerpublic static FileBasedStatusManager getCentralStatusManager()
StatusMethod.CENTRAL,
FileBasedStatusManagerpublic static FileBasedStatusManager getPerFolderStatusManager()
StatusMethod.PER_FOLDER,
FileBasedStatusManagerpublic static FileBasedStatusManager getWorkspaceStatusManager(java.lang.String path)
path - the fully qualified path to the workspace
StatusMethod.WORKSPACE,
FileBasedStatusManagerpublic static FileBasedStatusManager getStatusManager(View view)
view - the view whose status manager is requested
View.getFileStatusManager(),
FileBasedStatusManager
public static FileBasedStatusManager getStatusManager(View view,
GUID serverGUID)
throws java.io.IOException
view - the given viewserverGUID - server's repository id (which is a GUID) in string form.
java.io.IOExceptionView.getFileStatusManager(),
FileBasedStatusManager
public static java.lang.String[] getSourceDirs(java.io.File syncDirRoot)
throws java.io.IOException
syncDirRoot - the root of the centrally managed status directory
java.io.IOExceptionStatusMethod.getSourceDirsCount(java.io.File)
public static StatusMethod.FileStatus[] getStatusInformation(java.lang.String path)
throws java.io.IOException
path - a directory path for which there is status data
java.io.IOExceptionStatusMethod.getSourceDirs(java.io.File)
public static void deleteSyncDB(java.io.File syncDirRoot,
java.lang.String key)
syncDirRoot - the root of the centrally managed status directorykey - the platform independent directory path whose status will be
deleted.public static int getSourceDirsCount(java.io.File syncDirRoot)
StatusMethod.getSourceDirs(java.io.File)
syncDirRoot - the root of the centrally managed status directory
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||