public final class ServerAdministration
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ServerAdministration.License
Information about the licenses registered on a StarTeam Server.
|
static class |
ServerAdministration.LockStatus
Information about the lock status of the server.
|
static class |
ServerAdministration.SecurityLogEntry
Information about the security log entries on a StarTeam Server.
|
static class |
ServerAdministration.ServerLogMode
Information about the log mode of the server.
|
static class |
ServerAdministration.ServerLogType
Information about the log type of the server.
|
Modifier and Type | Method and Description |
---|---|
void |
discard()
Discards all cached UserAccount and GroupAccount information.
|
Group |
findGroup(int groupID)
Returns the
Group object for the given ID. |
Group |
findGroup(java.lang.String groupName)
Returns the
Group object with the given name. |
User |
findUser(int userID)
Returns the
User object for the given ID. |
User |
findUser(java.lang.String logonName)
Returns the
User object with the given logonName. |
java.lang.String |
generateDiagnosticDump(int minidumpType)
Creates a diagnostic file and places it in the server configurations' log
path.
|
ServerConfiguration |
getConfiguration()
Gets the current server configuration options.
|
Group[] |
getGroups()
Returns all of the active groups accounts on the server along with their
complete account information.
|
HiveManager |
getHiveManager()
Gets the HiveManager that manages new vault format hives.
|
ServerAdministration.License |
getLicenseInformation()
Gets information about the licenses registered on this server.
|
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.
|
PurgeController |
getPurgeController()
Provides control of the Online Purge service.
|
ACE[] |
getRights()
Returns the Access control list for this server.
|
ServerAdministration.SecurityLogEntry[] |
getSecurityLog(ServerAdministration.SecurityLogEntry.EventType eventType)
Returns an array of SecurityLogEntry objects for this server, for the
specified security event type.
|
Server |
getServer()
returns a reference to the Server
|
void |
getServerCommandStats(java.io.OutputStream out)
Retrieves the server's command statistics and writes it to the specified
output stream.
|
ServerAdministration.LockStatus |
getServerLockStatus()
Returns the "locked", "locked exclusively" or "unlocked" status of the
server.
|
User[] |
getUsers()
Returns all of the active users on the server along with their complete
account information.
|
boolean |
hasPermissions(PermissionCollection permissions)
Returns true if desired permissions are granted
|
boolean |
isRefreshRequired()
Returns true if a refresh() operation might have resulted 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 |
populateGroupMembershipForAllUsers()
A single server command to populate the group membership for all active
users on this server.
|
void |
refresh()
Updates cached Users and Groups account information to reflect recent
changes to the repository.
|
void |
restartServer()
Shuts down and restarts the server.
|
void |
setConfiguration(ServerConfiguration config)
Saves the given server 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 |
setRights(ACE[] acl)
Modify the access control list for this server.
|
void |
shutdownServer()
Shuts down the server.
|
boolean |
testDirectoryServiceSettings(java.lang.String URL,
int port,
ServerConfiguration.DirectoryServiceSecurityType securityType)
Tests this set of Directory Service parameters.
|
boolean |
testOauth2ProviderSettings(java.lang.String oauth2IssuerURL)
Tests is the given Oauth2 issuer URL is valid.
|
boolean |
testSMTPSettings(java.lang.String address,
int port,
ServerConfiguration.DirectoryServiceSecurityType secTyp,
java.lang.String hostName,
java.lang.String certificateName,
java.lang.String loginName,
java.lang.String password) |
java.lang.Boolean |
treatMixedEOLFileContentAsBinary()
True if MixedEOL content should be treated as BINARY files This is a CAE
use case and has associated rules which require all EOL computation to be
contained entirely within the SDK.
|
void |
unlockServer()
Unlocks a server in "Locked" mode.
|
void |
writeLogFile(java.io.File out,
ServerAdministration.ServerLogType logType,
ServerAdministration.ServerLogMode[] logModes)
Retrieves the server log and writes it to the specified file.
|
long |
writeLogFile(java.io.OutputStream out,
ServerAdministration.ServerLogType logType,
ServerAdministration.ServerLogMode[] logModes,
int lastNLog)
Retrieves the server log and writes it to the specified output stream.
|
long |
writeLogFile(java.io.OutputStream out,
ServerAdministration.ServerLogType logType,
ServerAdministration.ServerLogMode[] logModes,
int lastNLog,
int locale)
Retrieves the server log in the given locale and writes it to the specified output stream.
|
void |
writeServerCommandStats(java.io.File file)
Retrieves the server's command statistics and writes it to the specified
file.
|
public Server getServer()
public PurgeController getPurgeController()
public java.lang.String getLog()
public void writeLogFile(java.io.File out, ServerAdministration.ServerLogType logType, ServerAdministration.ServerLogMode[] logModes) throws java.io.IOException
out
- The log file location.logType
- Log type (LOG_TYPE_SERVER, LOG_TYPE_PURGE, other types to be
defined.)logModes
- Log mode. Valid values are: 1. LOG_ALL, LOG_ASSERTIONS,
LOG_EXCEPTIONS, LOG_MESSAGES, LOG_WARNINGS or a combination of
them.java.io.IOException
ServerAdministration.getLog()
,
ServerAdministration.ServerLogMode.LOG_ALL
,
ServerAdministration.ServerLogMode.LOG_ASSERTIONS
,
ServerAdministration.ServerLogMode.LOG_EXCEPTIONS
,
ServerAdministration.ServerLogMode.LOG_MESSAGES
,
ServerAdministration.ServerLogMode.LOG_WARNINGS
public long writeLogFile(java.io.OutputStream out, ServerAdministration.ServerLogType logType, ServerAdministration.ServerLogMode[] logModes, int lastNLog) throws java.io.IOException
out
- Output streamlogType
- Log type (LOG_TYPE_SERVER, LOG_TYPE_PURGE, other types to be
defined.)logModes
- Log mode. Valid values are: 1. LOG_ALL, LOG_ASSERTIONS,
LOG_EXCEPTIONS, LOG_MESSAGES, LOG_WARNINGS or a combination of
them.lastNLog
- Last number of log.java.io.IOException
ServerAdministration.getLog()
,
ServerAdministration.ServerLogMode.LOG_ALL
,
ServerAdministration.ServerLogMode.LOG_ASSERTIONS
,
ServerAdministration.ServerLogMode.LOG_EXCEPTIONS
,
ServerAdministration.ServerLogMode.LOG_MESSAGES
,
ServerAdministration.ServerLogMode.LOG_WARNINGS
public long writeLogFile(java.io.OutputStream out, ServerAdministration.ServerLogType logType, ServerAdministration.ServerLogMode[] logModes, int lastNLog, int locale) throws java.io.IOException
out
- Output streamlogType
- Log type (LOG_TYPE_SERVER, LOG_TYPE_PURGE, other types to be
defined.)logModes
- Log mode. Valid values are: 1. LOG_ALL, LOG_ASSERTIONS,
LOG_EXCEPTIONS, LOG_MESSAGES, LOG_WARNINGS or a combination of
them.lastNLog
- Last number of log.locale
- - 0 for default locale on server 1 for English logsjava.io.IOException
ServerAdministration.getLog()
,
ServerAdministration.ServerLogMode.LOG_ALL
,
ServerAdministration.ServerLogMode.LOG_ASSERTIONS
,
ServerAdministration.ServerLogMode.LOG_EXCEPTIONS
,
ServerAdministration.ServerLogMode.LOG_MESSAGES
,
ServerAdministration.ServerLogMode.LOG_WARNINGS
public ServerAdministration.SecurityLogEntry[] getSecurityLog(ServerAdministration.SecurityLogEntry.EventType eventType)
eventType
- an integer value that specifies the desired security event
type. Must be one of the values defined in
SecurityLogEntry.EventType.ServerAdministration.SecurityLogEntry.EventType
public ServerAdministration.License getLicenseInformation()
ServerAdministration.License
public HiveManager getHiveManager()
public boolean testOauth2ProviderSettings(java.lang.String oauth2IssuerURL)
URL
- port
- bUseSecureDirectoryService
- public boolean testDirectoryServiceSettings(java.lang.String URL, int port, ServerConfiguration.DirectoryServiceSecurityType securityType)
URL
- port
- bUseSecureDirectoryService
- public boolean testSMTPSettings(java.lang.String address, int port, ServerConfiguration.DirectoryServiceSecurityType secTyp, java.lang.String hostName, java.lang.String certificateName, java.lang.String loginName, java.lang.String password)
public ServerConfiguration getConfiguration()
public java.lang.Boolean treatMixedEOLFileContentAsBinary()
public void setConfiguration(ServerConfiguration config)
config
- The current server configuration options.ServerConfiguration
public SystemPolicy getPolicy()
SystemPolicy
public void setPolicy(SystemPolicy policy)
policy
- The current system policy options.SystemPolicy
public void getServerCommandStats(java.io.OutputStream out) throws java.io.IOException
out
- the output stream to which the commands statistics will be
written.java.io.IOException
public void writeServerCommandStats(java.io.File file) throws java.io.IOException
file
- the file to which the commands statistics will be written.java.io.IOException
public ServerAdministration.LockStatus getServerLockStatus()
ServerAdministration.lockServer()
,
ServerAdministration.lockServerExclusively()
,
ServerAdministration.unlockServer()
public void lockServer()
public void lockServerExclusively()
public void unlockServer()
public void shutdownServer()
Server
instance rather useless, as the StarTeam
Server it was connected to will be shut down.public void restartServer()
Server
instance rather useless as the
StarTeam Server it was connected to will be shut down and restarted.public boolean hasPermissions(PermissionCollection permissions)
permissions
- the desired permissionsPermission
,
PermissionCollection
public ACE[] getRights()
public void setRights(ACE[] acl)
acl
- the new access control list or null if to be droppedpublic void discard()
public void refresh()
ServerAdministration.discard()
public User findUser(java.lang.String logonName)
User
object with the given logonName. The user
returned will contain all the account information. Returns null if
logonName is not found.logonName
- the logonName in questionUser
object with the given name. Will return
null if not found.ServerAdministration.getUsers()
public boolean isRefreshRequired()
ServerAdministration.refresh()
,
Server.enableMPX()
public User[] getUsers()
ServerException
- when the logged in user does not have permission
Permission.SERVER_ADMIN_USER_ACCOUNTS
granted.Server.getActiveUsers()
public Group[] getGroups()
ServerException
- when the logged in user does not have the permission
Permission.SERVER_ADMIN_USER_ACCOUNTS
granted.Server.getActiveGroups()
public User findUser(int userID)
User
object for the given ID.userID
- the user ID in questionUserAccount
object with the given ID. Will
return null if not found.ServerException
- when the logged in user does not have the permission
Permission.SERVER_ADMIN_USER_ACCOUNTS
granted.ServerAdministration.getUsers()
public Group findGroup(int groupID)
Group
object for the given ID.groupID
- the Group ID in questionGroup
object with the given ID. Will return null
if not found.ServerAdministration.getGroups()
public Group findGroup(java.lang.String groupName)
Group
object with the given name. The group
returned will contain all the account information. Returns null if the
group is not found.groupName
- the group name in questionGroup
object with the given name. Will return
null if not found.ServerAdministration.getUsers()
public void populateGroupMembershipForAllUsers()
ServerException
- when logged in user does not have administrator privilegesServerAdministration.getGroups()
public java.lang.String[] getNamedConfigOptions(java.lang.String[] names)
names
- the key values of the options to retrieve.public void setNamedConfigOptions(java.lang.String[] names, java.lang.String[] values)
names
- names of the options whose values are set.values
- values of the options to be set, in same sequence a names.public java.lang.String generateDiagnosticDump(int minidumpType)
minidumpType
- A mini-dump typeStarTeam SDK 17.0, Build 34
Copyright © 2019 Micro Focus or one of its affiliates. All rights reserved.