com.starbase.starteam
Class ServerAdministration

java.lang.Object
  |
  +--com.starbase.starteam.ServerAdministration

public class ServerAdministration
extends java.lang.Object

The ServerAdministration class provides a conventient interface to perform various server level administration commands. The current set of operations are for field customization. Ultimately these methods should hang off of the core Type and Property objects but the refresh issues are too complex to deal with at this time. After calling any of the customization methods one should do a FULL refresh by discarding everything including the Server object itself and start over.


Field Summary
static int LOG_ALL
          Server log mode - get the entire log file.
static int LOG_ASSERTIONS
          Server log mode - get assertions.
static int LOG_EXCEPTIONS
          Server log mode - get exceptions.
static int LOG_MESSAGES
          Server log mode - get messages.
static int LOG_MODE_ALL
          Deprecated.  
static int LOG_MODE_ERRORS
          Deprecated.  
static int LOG_TYPE_SERVER
          Server log type (other types to be defined.)
static int LOG_WARNINGS
          Server log mode - get warnings.
static int SERVER_LOCKED
          Server is locked.
static int SERVER_LOCKED_EXCLUSIVELY
          Server is locked exclusively -- only the locker may execute commmands.
static int SERVER_UNLOCKED
          Server is unlocked.
static int UNKNOWN
          Unknown (uninitialized value).
 
Method Summary
 void addDoubleField(Type type, java.lang.String sqlname, java.lang.String displayName, double defaultValue)
          Adds a new floating point double field to the specified Type.
 void addDoubleFieldEx(Type type, java.lang.String sqlname, Translations displayNames, double defaultValue)
          Adds a new floating point double field to the specified Type.
 void addEnumeratedField(Type type, java.lang.String sqlname, java.lang.String displayName, EnumeratedValue[] enums, int defaultCode)
          Adds a new Enumerated field to the specified Type.
 void addEnumeratedFieldEx(Type type, java.lang.String sqlname, Translations displayNames, EnumeratedValue[] enums, int defaultCode)
          Adds a new Enumerated field to the specified Type.
 void addIntegerField(Type type, java.lang.String sqlname, java.lang.String displayName, int defaultValue)
          Adds a new Integer field to the specified Type.
 void addIntegerFieldEx(Type type, java.lang.String sqlname, Translations displayNames, int defaultValue)
          Adds a new Integer field to the specified Type.
 void addRequiredTextField(Type type, java.lang.String sqlname, java.lang.String displayName, int maxLength)
          Adds a new required Text field to the specified Type.
 void addRequiredTextFieldEx(Type type, java.lang.String sqlname, Translations displayNames, int maxLength)
          Adds a new required Text field to the specified Type.
 void addRequiredUserField(Type type, java.lang.String sqlname, java.lang.String displayName)
          Adds a new required User field to the specified Type.
 void addRequiredUserFieldEx(Type type, java.lang.String sqlname, Translations displayNames)
          Adds a new required User field to the specified Type.
 void addTextField(Type type, java.lang.String sqlname, java.lang.String displayName, int maxLength)
          Adds a new Text field to the specified Type.
 void addTextFieldEx(Type type, java.lang.String sqlname, Translations displayNames, int maxLength)
          Adds a new Text field to the specified Type.
 void addTimeField(Type type, java.lang.String sqlname, java.lang.String displayName, OLEDate defaultTime)
          Adds a new Date/Time field to the specified Type.
 void addTimeFieldEx(Type type, java.lang.String sqlname, Translations displayNames, OLEDate defaultTime)
          Adds a new Date/Time field to the specified Type.
 void addUserField(Type type, java.lang.String sqlname, java.lang.String displayName)
          Adds a new User field to the specified Type.
 void addUserFieldEx(Type type, java.lang.String sqlname, Translations displayNames)
          Adds a new User field to the specified Type.
 void discardAccounts()
          Discards all cached UserAccount and GroupAccount information.
 void enableProperty(Property prop, boolean enabled)
          Set the specified property to enabled or disabled.
 boolean equals(java.lang.Object source)
          returns true if this object instance is equal to the source
 GroupAccount findGroupAccount(int groupID)
          Returns the GroupAccount object for the given ID.
 UserAccount findUserAccount(int userID)
          Returns the User object for the given ID.
 java.lang.String generateDiagnosticDump(int minidumptype)
          Creates a diagnostic file and places it in the server configurations' log path.
 AclEntry[] getACL()
          Returns the Access control list for this server.
 ServerConfiguration getConfiguration()
          Gets the current server configuration options.
 GroupAccount[] getGroupAccounts()
          Returns all of the active group accounts on the server.
 HiveManager getHiveManager()
          Gets the HiveManager that manages new vault format hives.
 ServerLicenseInfo getLicenseInformation()
          Gets information about the licenses registered on this server.
 LicenseUsage getLicenseUsage()
          Deprecated.  
 java.lang.String getLog()
          Return the server log for this server.
 java.lang.String[] getNamedConfigOptions(java.lang.String[] names)
          Return a String array of values that matches the input String array of option names.
 SystemPolicy getPolicy()
          Gets the current system policy options.
 SecurityLogEntry[] getSecurityLog(int eventType)
          Returns an array of SecurityLogEntry objects for this server, for the specified security event type.
 Server getServer()
          returns an instance of the Server
 void getServerCommandStats(java.io.OutputStream out)
          Retrieves the server's command statistics and writes it to the specified output stream.
 int getServerLockStatus()
          Returns the "locked", "locked exclusively" or "unlocked" status of the server.
 UserAccount[] getUserAccounts()
          Returns all of the active user accounts on the server.
 int hashCode()
          returns a unique hash for all instances of this type
 boolean hasPermission(int permissions)
          Returns true if desired permissions are granted
 boolean isRefreshAccountsRequired()
          Returns true if a refreshAccounts() operation might have resulting in UserAccount or GroupAccount information being updated; returns false if and only if it is known that the UserAccount and GroupAccount information had not been changed since the last refresh.
 void lockServer()
          Puts the server in "Locked" mode.
 void lockServerExclusively()
          Puts the server in "LockedExclusively" mode: only the locker can perform operations.
 void modifyDoubleField(Type type, Property prop, boolean enabled, java.lang.String name, double defaultValue)
          Modify a floating point double property for the specified Type.
 void modifyDoubleFieldEx(Type type, Property prop, boolean enabled, Translations names, double defaultValue)
          Modify a floating point double property for the specified Type.
 void modifyEnumeratedField(Type type, Property prop, boolean enabled, java.lang.String name, EnumeratedValue[] enums, int defaultCode)
          Modify an Enumerated property for the specified Type.
 void modifyEnumeratedFieldEx(Type type, Property prop, boolean enabled, Translations names, EnumeratedValue[] enums, int defaultCode)
          Deprecated. This method does not change the sort order of any existing EnumeratedValues. Use updateEnumeratedField() instead.
 void modifyIntegerField(Type type, Property prop, boolean enabled, java.lang.String name, int defaultValue)
          Modify an Integer property for the specified Type.
 void modifyIntegerFieldEx(Type type, Property prop, boolean enabled, Translations names, int defaultValue)
          Modify an Integer property for the specified Type.
 void modifyTextField(Type type, Property prop, boolean enabled, java.lang.String name)
          Modify a Text property for the specified Type.
 void modifyTextFieldEx(Type type, Property prop, boolean enabled, Translations names)
          Modify a Text property for the specified Type.
 void modifyTimeField(Type type, Property prop, boolean enabled, java.lang.String name, OLEDate defaultValue)
          Modify a Time property for the specified Type.
 void modifyTimeFieldEx(Type type, Property prop, boolean enabled, Translations names, OLEDate defaultValue)
          Modify a Time property for the specified Type.
 void modifyUserField(Type type, Property prop, boolean enabled, java.lang.String name)
          Modify a User property for the specified Type.
 void modifyUserFieldEx(Type type, Property prop, boolean enabled, Translations names)
          Modify a User property for the specified Type.
 void populateAccounts()
          Deprecated.  
 void refreshAccounts()
          Updates cached UserAccount and GroupAccount information to reflect recent changes to the repository.
 void restartServer()
          Shuts down and restarts the server.
 void setACL(AclEntry[] acl)
          Modify the access control list for this server.
 void setConfiguration(ServerConfiguration config)
          Saves the given server configuration options.
 void setFieldRequired(Property prop, boolean bRequired)
          Change the required/non-required status of a custom-defined User or Text property.
 void setNamedConfigOptions(java.util.Hashtable options)
          Set a group of named configuration options.
 void setNamedConfigOptions(java.lang.String[] names, java.lang.String[] values)
          Set a group of named configuration options.
 void setPolicy(SystemPolicy policy)
          Saves the given system policy options.
 void shutdownServer()
          Shuts down the server.
 boolean testDirectoryServiceSettings(java.lang.String URL, int port, boolean bUseSecureDirectoryService)
          Tests this set of Directory Service parameters.
 void unlockServer()
          Unlocks a server in "Locked" mode.
 void updateEnumeratedField(Property prop, boolean enabled, Translations names, EnumeratedValue[] enums, int defaultCode)
          Modifies an existing Enumerated property.
 void updateLicenseUsage(java.lang.String keys, ServerInfo[] servers)
          Deprecated.  
 void writeLogFile(java.io.File out, int logType, int logMode)
          Retrieves the server log and writes it to the specified file.
 void writeServerCommandStats(java.io.File file)
          Retrieves the server's command statistics and writes it to the specified file.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

UNKNOWN

public static final int UNKNOWN
Unknown (uninitialized value).

See Also:
Constant Field Values

SERVER_LOCKED

public static final int SERVER_LOCKED
Server is locked.

See Also:
Constant Field Values

SERVER_UNLOCKED

public static final int SERVER_UNLOCKED
Server is unlocked.

See Also:
Constant Field Values

SERVER_LOCKED_EXCLUSIVELY

public static final int SERVER_LOCKED_EXCLUSIVELY
Server is locked exclusively -- only the locker may execute commmands.

See Also:
Constant Field Values

LOG_TYPE_SERVER

public static final int LOG_TYPE_SERVER
Server log type (other types to be defined.)

See Also:
Constant Field Values

LOG_MODE_ERRORS

public static final int LOG_MODE_ERRORS
Deprecated.  

Deprecated. Server log mode - get errors only.

See Also:
Constant Field Values

LOG_MODE_ALL

public static final int LOG_MODE_ALL
Deprecated.  

Deprecated. Server log mode - get the entire log file.

See Also:
Constant Field Values

LOG_ALL

public static final int LOG_ALL
Server log mode - get the entire log file.

See Also:
ServerAdministration.writeLogFile(java.io.File, int, int), Constant Field Values

LOG_MESSAGES

public static final int LOG_MESSAGES
Server log mode - get messages.

See Also:
ServerAdministration.writeLogFile(java.io.File, int, int), Constant Field Values

LOG_WARNINGS

public static final int LOG_WARNINGS
Server log mode - get warnings.

See Also:
ServerAdministration.writeLogFile(java.io.File, int, int), Constant Field Values

LOG_EXCEPTIONS

public static final int LOG_EXCEPTIONS
Server log mode - get exceptions.

See Also:
ServerAdministration.writeLogFile(java.io.File, int, int), Constant Field Values

LOG_ASSERTIONS

public static final int LOG_ASSERTIONS
Server log mode - get assertions.

See Also:
ServerAdministration.writeLogFile(java.io.File, int, int), Constant Field Values
Method Detail

getServer

public Server getServer()
returns an instance of the Server

Returns:
Server

addTextField

public void addTextField(Type type,
                         java.lang.String sqlname,
                         java.lang.String displayName,
                         int maxLength)
Adds a new Text field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayName - The String that will be used when GUIs display the field
maxLength - The maximum length of Strings that can be stored in this field

addTextFieldEx

public void addTextFieldEx(Type type,
                           java.lang.String sqlname,
                           Translations displayNames,
                           int maxLength)
Adds a new Text field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayNames - The translations to use for the property display name
maxLength - The maximum length of Strings that can be stored in this field

addRequiredTextField

public void addRequiredTextField(Type type,
                                 java.lang.String sqlname,
                                 java.lang.String displayName,
                                 int maxLength)
Adds a new required Text field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayName - The String that will be used when GUIs display the field
maxLength - The maximum length of Strings that can be stored in this field

addRequiredTextFieldEx

public void addRequiredTextFieldEx(Type type,
                                   java.lang.String sqlname,
                                   Translations displayNames,
                                   int maxLength)
Adds a new required Text field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayNames - The translations to use for the property display name
maxLength - The maximum length of Strings that can be stored in this field

addTimeField

public void addTimeField(Type type,
                         java.lang.String sqlname,
                         java.lang.String displayName,
                         OLEDate defaultTime)
Adds a new Date/Time field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayName - The String that will be used when GUIs display the field
defaultTime - The default time to use when creating a new item.

addTimeFieldEx

public void addTimeFieldEx(Type type,
                           java.lang.String sqlname,
                           Translations displayNames,
                           OLEDate defaultTime)
Adds a new Date/Time field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayNames - The translations to use for the property display name
defaultTime - The default time to use when creating a new item.

addIntegerField

public void addIntegerField(Type type,
                            java.lang.String sqlname,
                            java.lang.String displayName,
                            int defaultValue)
Adds a new Integer field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayName - The String that will be used when GUIs display the field
defaultValue - The default value to use when creating a new item.

addIntegerFieldEx

public void addIntegerFieldEx(Type type,
                              java.lang.String sqlname,
                              Translations displayNames,
                              int defaultValue)
Adds a new Integer field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayNames - The translations to use for the property display name
defaultValue - The default value to use when creating a new item.

addDoubleField

public void addDoubleField(Type type,
                           java.lang.String sqlname,
                           java.lang.String displayName,
                           double defaultValue)
Adds a new floating point double field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayName - The String that will be used when GUIs display the field
defaultValue - The default value to use when creating a new item.

addDoubleFieldEx

public void addDoubleFieldEx(Type type,
                             java.lang.String sqlname,
                             Translations displayNames,
                             double defaultValue)
Adds a new floating point double field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayNames - The translations to use for the property display name
defaultValue - The default value to use when creating a new item.

addUserField

public void addUserField(Type type,
                         java.lang.String sqlname,
                         java.lang.String displayName)
Adds a new User field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayName - The String that will be used when GUIs display the field

addUserFieldEx

public void addUserFieldEx(Type type,
                           java.lang.String sqlname,
                           Translations displayNames)
Adds a new User field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayNames - The translations to use for the property display name

addRequiredUserField

public void addRequiredUserField(Type type,
                                 java.lang.String sqlname,
                                 java.lang.String displayName)
Adds a new required User field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayName - The String that will be used when GUIs display the field

addRequiredUserFieldEx

public void addRequiredUserFieldEx(Type type,
                                   java.lang.String sqlname,
                                   Translations displayNames)
Adds a new required User field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayNames - The translations to use for the property display name

addEnumeratedField

public void addEnumeratedField(Type type,
                               java.lang.String sqlname,
                               java.lang.String displayName,
                               EnumeratedValue[] enums,
                               int defaultCode)
Adds a new Enumerated field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayName - The String that will be used when GUIs display the field
enums - An array of the EnumeratedValues this field will support.
defaultCode - The code value of the default EnumeratedValue to use when creating new items of this type

addEnumeratedFieldEx

public void addEnumeratedFieldEx(Type type,
                                 java.lang.String sqlname,
                                 Translations displayNames,
                                 EnumeratedValue[] enums,
                                 int defaultCode)
Adds a new Enumerated field to the specified Type. Note that when you later want to use the new field you must access it with the sqlname you provided prefixed with "Usr_".

Parameters:
type - The Type object being modified
sqlname - The database field name for this type
displayNames - The translations to use for the property display name
enums - An array of the EnumeratedValues this field will support.
defaultCode - The code value of the default EnumeratedValue to use when creating new items of this type

modifyTextField

public void modifyTextField(Type type,
                            Property prop,
                            boolean enabled,
                            java.lang.String name)
Modify a Text property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
name - The String that will be used when GUIs display the field

modifyTextFieldEx

public void modifyTextFieldEx(Type type,
                              Property prop,
                              boolean enabled,
                              Translations names)
Modify a Text property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
names - The display name translations to use for this property.

modifyIntegerField

public void modifyIntegerField(Type type,
                               Property prop,
                               boolean enabled,
                               java.lang.String name,
                               int defaultValue)
Modify an Integer property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
name - The new display name for this field.
defaultValue - The new default value for this field.

modifyIntegerFieldEx

public void modifyIntegerFieldEx(Type type,
                                 Property prop,
                                 boolean enabled,
                                 Translations names,
                                 int defaultValue)
Modify an Integer property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
names - The display name translations to use for this property.
defaultValue - The new default value for this field.

modifyDoubleField

public void modifyDoubleField(Type type,
                              Property prop,
                              boolean enabled,
                              java.lang.String name,
                              double defaultValue)
Modify a floating point double property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
name - The new display name for this field.
defaultValue - The new default value for this field.

modifyDoubleFieldEx

public void modifyDoubleFieldEx(Type type,
                                Property prop,
                                boolean enabled,
                                Translations names,
                                double defaultValue)
Modify a floating point double property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
names - The display name translations to use for this property.
defaultValue - The new default value for this field.

modifyTimeField

public void modifyTimeField(Type type,
                            Property prop,
                            boolean enabled,
                            java.lang.String name,
                            OLEDate defaultValue)
Modify a Time property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
name - The new display name for this field.
defaultValue - The new default value for this field.

modifyTimeFieldEx

public void modifyTimeFieldEx(Type type,
                              Property prop,
                              boolean enabled,
                              Translations names,
                              OLEDate defaultValue)
Modify a Time property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
names - The display name translations to use for this property.
defaultValue - The new default value for this field.

modifyUserField

public void modifyUserField(Type type,
                            Property prop,
                            boolean enabled,
                            java.lang.String name)
Modify a User property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
name - The new display name for this field.

modifyUserFieldEx

public void modifyUserFieldEx(Type type,
                              Property prop,
                              boolean enabled,
                              Translations names)
Modify a User property for the specified Type.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
names - The display name translations to use for this property.

modifyEnumeratedField

public void modifyEnumeratedField(Type type,
                                  Property prop,
                                  boolean enabled,
                                  java.lang.String name,
                                  EnumeratedValue[] enums,
                                  int defaultCode)
Modify an Enumerated property for the specified Type. If an existing Enum is not present in the enums argument then that enum will be disabled. If it is listed and the name has changed then the display name of the enumerated value will be changed. If an Enum appears in the enums argument that is not already a valid enum for this field then the new enum value will be added.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
name - The new display name for this field.
enums - The list of enabled Enum objects for this field.
defaultCode - The code for the new default Enum.

modifyEnumeratedFieldEx

public void modifyEnumeratedFieldEx(Type type,
                                    Property prop,
                                    boolean enabled,
                                    Translations names,
                                    EnumeratedValue[] enums,
                                    int defaultCode)
Deprecated. This method does not change the sort order of any existing EnumeratedValues. Use updateEnumeratedField() instead.

Modify an Enumerated property for the specified Type.

Any EnumeratedValues passed in the enums argument that are already legal values for this property are automatically enabled, if necessary. Any existing EnumeratedValues passed that are not passed in the enums argument are automatically disabled, if necessary. Any changes to any of the display names are saved in the property definition. The sort order of existing EnumeratedValues is unchanged.

Any new EnumeratedValues passed in the enum argument are added to the property definition at the end of the list.

Parameters:
type - The Type object being modified
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
names - The display name translations to use for this property.
enums - The list of enabled Enum objects for this field.
defaultCode - The code for the new default Enum.

updateEnumeratedField

public void updateEnumeratedField(Property prop,
                                  boolean enabled,
                                  Translations names,
                                  EnumeratedValue[] enums,
                                  int defaultCode)
Modifies an existing Enumerated property.

The EnumeratedValues for this property must be completely specified; that is, the list must include all existing enumerated values for this property, including both enabled and disabled ones. The list may also include new enumerated values that were not previously valid.

The sort order of the EnumeratedValues in the property definition is updated to reflect the order as specified here.

updateEnumeratedField() does not automatically change the enabled/disabled state of any of the EnumeratedValues provided. You can change the state by calling EnumeratedValue.setEnabled() prior to calling updateEnumeratedField().

Any changes to any of the display names are saved in the property definition.

Parameters:
prop - The Property object being modified.
enabled - Specify if the field is not be enabled or disabled.
names - The display name translations to use for this property.
enums - The list of enabled Enum objects for this field.
defaultCode - The code for the new default Enum.

setFieldRequired

public void setFieldRequired(Property prop,
                             boolean bRequired)
Change the required/non-required status of a custom-defined User or Text property.

Parameters:
prop - The Property object being modified.
bRequired - Specify if the field is to be required or not.

enableProperty

public void enableProperty(Property prop,
                           boolean enabled)
Set the specified property to enabled or disabled.

Parameters:
prop - the property being modified
enabled - true if the property is to be enabled and false otherwise

getLog

public java.lang.String getLog()
Return the server log for this server.

Returns:
the server log.
See Also:
ServerAdministration.writeLogFile(java.io.File, int, int)

writeLogFile

public void writeLogFile(java.io.File out,
                         int logType,
                         int logMode)
                  throws java.io.IOException
Retrieves the server log and writes it to the specified file.

Parameters:
out - The log file location.
logType - Log type (LOG_TYPE_SERVER, other types to be defined.)
logMode - Log mode. Valid values are: 1. LOG_ALL, LOG_ASSERTIONS, LOG_EXCEPTIONS, LOG_MESSAGES, LOG_WARNINGS or a combination of them. 2. LOG_MODE_ALL or LOG_MODE_ERRORS (note these are deprecated.)
java.io.IOException
See Also:
ServerAdministration.getLog(), ServerAdministration.LOG_ALL, ServerAdministration.LOG_ASSERTIONS, ServerAdministration.LOG_EXCEPTIONS, ServerAdministration.LOG_MESSAGES, ServerAdministration.LOG_WARNINGS

getSecurityLog

public SecurityLogEntry[] getSecurityLog(int eventType)
Returns an array of SecurityLogEntry objects for this server, for the specified security event type.

Parameters:
eventType - an integer value that specifies the desired security event type. Must be one of the values defined in SecurityLogEntry.SecurityEventType.
Returns:
An array of SecurityLogEntry objects for this server, for the specified security event type.
See Also:
SecurityLogEntry.SecurityEventType

getLicenseInformation

public ServerLicenseInfo getLicenseInformation()
Gets information about the licenses registered on this server.

Returns:
Information about the licenses registered on this server, or null if the license information is not available.
See Also:
ServerLicenseInfo, SystemRevisionNumbers#REV_SERVER_LICENSE_INFO_SUPPORTED

getHiveManager

public HiveManager getHiveManager()
Gets the HiveManager that manages new vault format hives.

Returns:
the HiveManager.

testDirectoryServiceSettings

public boolean testDirectoryServiceSettings(java.lang.String URL,
                                            int port,
                                            boolean bUseSecureDirectoryService)
Tests this set of Directory Service parameters. Returns true if the test succeeds, otherwise false. Only meaningful for servers 7.0 and later; always returns false for earlier releases.

Parameters:
URL -
port -
bUseSecureDirectoryService -
Returns:
true if the test succeeds, otherwise false.

getConfiguration

public ServerConfiguration getConfiguration()
Gets the current server configuration options.

Returns:
The current server configuration options.

setConfiguration

public void setConfiguration(ServerConfiguration config)
Saves the given server configuration options.

Parameters:
config - The current server configuration options.
See Also:
ServerConfiguration

getPolicy

public SystemPolicy getPolicy()
Gets the current system policy options.

Returns:
The current system policy options.
See Also:
SystemPolicy

setPolicy

public void setPolicy(SystemPolicy policy)
Saves the given system policy options.

Parameters:
policy - The current system policy options.
See Also:
SystemPolicy

getServerCommandStats

public void getServerCommandStats(java.io.OutputStream out)
                           throws java.io.IOException
Retrieves the server's command statistics and writes it to the specified output stream.

Parameters:
out - the output stream to which the commands statistics will be written.
java.io.IOException
See Also:
SupportedFeatures.hasServerCommandStats()

writeServerCommandStats

public void writeServerCommandStats(java.io.File file)
                             throws java.io.IOException
Retrieves the server's command statistics and writes it to the specified file.

Parameters:
file - the file to which the commands statistics will be written.
java.io.IOException

getServerLockStatus

public int getServerLockStatus()
Returns the "locked", "locked exclusively" or "unlocked" status of the server.

Returns:
the "locked", "locked exclusively" or "unlocked" status of the server.
See Also:
ServerAdministration.SERVER_LOCKED, ServerAdministration.SERVER_UNLOCKED, ServerAdministration.SERVER_LOCKED_EXCLUSIVELY, ServerAdministration.lockServer(), ServerAdministration.lockServerExclusively(), ServerAdministration.unlockServer(), SupportedFeatures.hasServerLockStatus()

lockServer

public void lockServer()
Puts the server in "Locked" mode. No one can perform operations. Useful for freezing server for database backups.

See Also:
ServerAdministration.getServerLockStatus(), ServerAdministration.lockServerExclusively(), ServerAdministration.unlockServer()

lockServerExclusively

public void lockServerExclusively()
Puts the server in "LockedExclusively" mode: only the locker can perform operations. Useful for restricting server access during replication operations.

See Also:
ServerAdministration.getServerLockStatus(), ServerAdministration.lockServer(), ServerAdministration.unlockServer(), SupportedFeatures.hasServerExclusiveLock()

unlockServer

public void unlockServer()
Unlocks a server in "Locked" mode.

See Also:
ServerAdministration.getServerLockStatus(), ServerAdministration.lockServer(), ServerAdministration.lockServerExclusively()

shutdownServer

public void shutdownServer()
Shuts down the server. This has the obvious side-effect of making the associated Server instance rather useless, as the StarTeam Server it was connected to will be shut down.

See Also:
SupportedFeatures.hasServerShutdown()

restartServer

public void restartServer()
Shuts down and restarts the server. This has the side-effect of making the associated Server instance rather useless as the StarTeam Server it was connected to will be shut down and restarted.

See Also:
SupportedFeatures.hasServerShutdown()

hasPermission

public boolean hasPermission(int permissions)
Returns true if desired permissions are granted

Parameters:
permissions - the desired permissions
See Also:
Permission

getACL

public AclEntry[] getACL()
Returns the Access control list for this server. This will return null if this server has not access control list.

Returns:
the access control list for this server. May return null.

setACL

public void setACL(AclEntry[] acl)
Modify the access control list for this server. If the input parameter is null then the access control list will be dropped.

Parameters:
acl - the new access control list or null if to be dropped

discardAccounts

public void discardAccounts()
Discards all cached UserAccount and GroupAccount information. It will be re-fetched from the server on demand (even when MPX is enabled).

See Also:
ServerAdministration.getUserAccounts(), ServerAdministration.getGroupAccounts(), ServerAdministration.refreshAccounts()

isRefreshAccountsRequired

public boolean isRefreshAccountsRequired()
Returns true if a refreshAccounts() operation might have resulting in UserAccount or GroupAccount information being updated; returns false if and only if it is known that the UserAccount and GroupAccount information had not been changed since the last refresh. Note that since MPX does not currently broadcast any UserAccount-related or Group-related events, isRefreshAccountsRequired() always returns true, even if MPX is enabled.

Returns:
true if account information may be out of date.
See Also:
ServerAdministration.refreshAccounts(), Server.enableMPX()

populateAccounts

public void populateAccounts()
Deprecated.  

Deprecated. Caches UserAccount and GroupAccount information, if it hasn't already been cached. Account information is cached on demand; use getUserAccounts() or getGroupAccounts().

See Also:
ServerAdministration.getUserAccounts(), ServerAdministration.getGroupAccounts()

refreshAccounts

public void refreshAccounts()
Updates cached UserAccount and GroupAccount information to reflect recent changes to the repository. Existing UserAccount and GroupAccount objects are modified in place whenever possible.

See Also:
ServerAdministration.isRefreshAccountsRequired(), ServerAdministration.populateAccounts(), ServerAdministration.discardAccounts()

getUserAccounts

public UserAccount[] getUserAccounts()
Returns all of the active user accounts on the server. Deleted user accounts are not included.

Returns:
all of the active user accounts on the server.

getGroupAccounts

public GroupAccount[] getGroupAccounts()
Returns all of the active group accounts on the server. Deleted group accounts are not included.

Returns:
all of the active group accounts on the server.

findUserAccount

public UserAccount findUserAccount(int userID)
Returns the User object for the given ID.

Parameters:
userID - the user ID in question
Returns:
the UserAccount object with the given ID. Will return null if not found.
See Also:
ServerAdministration.getUserAccounts()

findGroupAccount

public GroupAccount findGroupAccount(int groupID)
Returns the GroupAccount object for the given ID.

Parameters:
groupID - the Group ID in question
Returns:
the GroupAccount object with the given ID. Will return null if not found.
See Also:
ServerAdministration.getGroupAccounts()

getLicenseUsage

public LicenseUsage getLicenseUsage()
Deprecated.  

Returns a license usage report from the server.

Returns:
a license usage report from the server.

updateLicenseUsage

public void updateLicenseUsage(java.lang.String keys,
                               ServerInfo[] servers)
Deprecated.  

Notify server of client license usage


getNamedConfigOptions

public java.lang.String[] getNamedConfigOptions(java.lang.String[] names)
Return a String array of values that matches the input String array of option names. This method is supported by server release 6.0 and later; ignored for earlier releases.

Parameters:
names - the key values of the options to retrieve.
Returns:
a String array of values that matches the input String array of option names.

setNamedConfigOptions

public void setNamedConfigOptions(java.lang.String[] names,
                                  java.lang.String[] values)
Set a group of named configuration options. This method is supported by server release 6.0 and later; ignored for earlier releases.

Parameters:
names - names of the options whose values are set.
values - values of the options to be set, in same sequence a names.

setNamedConfigOptions

public void setNamedConfigOptions(java.util.Hashtable options)
Set a group of named configuration options. This method is supported by server release 6.0 and later; ignored for earlier releases.

Parameters:
options - Hashtable of name/value pairs.

generateDiagnosticDump

public java.lang.String generateDiagnosticDump(int minidumptype)
Creates a diagnostic file and places it in the server configurations' log path. While creating the file, the server does no other processing This may take several minutes Use only at the direction of Borland Technical Suport Throws an SDKRuntimeException if the call fails

Parameters:
minidumptype - A mini-dump type
Returns:
the result of the dump command being executed

equals

public boolean equals(java.lang.Object source)
returns true if this object instance is equal to the source

Overrides:
equals in class java.lang.Object
Parameters:
source - Object the source to comapre with
Returns:
boolean true if this object is equal to the source

hashCode

public int hashCode()
returns a unique hash for all instances of this type

Overrides:
hashCode in class java.lang.Object
Returns:
int a unique hash for all instances of this type


StarTeam SDK 10.4, Build 36
Copyright © 2003-2008 Borland Software Corporation. All rights reserved.