|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cau.cs.kieler.kwebs.client.ServerConfigs
public final class ServerConfigs
This utility class provides convenient access to the list of server configuration configurable by the user.
Nested Class Summary | |
---|---|
static class |
ServerConfigs.ServerConfigError
Error constants for the validity test on a server configuration. |
Method Summary | |
---|---|
void |
addServerConfig(ServerConfigData serverConfig)
Adds a server configuration to the server configuration list. |
void |
clear()
Clears the server configuration list. |
boolean |
containsServerConfig(ServerConfigData serverConfig)
Returns whether a given server configuration is already contained in the server configuration list. |
int |
countConfigs()
Returns the number of server configurations contained. |
ServerConfigData |
createServerConfig(String name,
URI address)
Creates a new server configuration. |
ServerConfigData |
createServerConfig(String name,
URI address,
String truststore,
String truststorepass)
Creates a new server configuration. |
ServerConfigData |
createServerConfig(String name,
URI address,
String truststore,
String truststorepass,
boolean isFixed,
boolean isActive,
boolean isStandard)
Creates a new server configuration. |
ServerConfigData |
findServerConfig(ServerConfigData serverConfig)
Returns a server configuration equal to the given server configuration. |
ServerConfigData |
getActiveServerConfig()
Returns the currently active server configuration. |
int |
getIndexByServerConfig(ServerConfigData serverConfig)
Returns the index of a given server configuration in the server configuration list. |
static ServerConfigs |
getInstance()
Get the singleton instance. |
ServerConfigData |
getServerConfigByIndex(int index)
Returns a server configuration from the server configuration list by the given index. |
ServerConfigData |
getStandardServerConfig()
Returns the standard server configuration. |
boolean |
isDirty()
Returns whether the list of server configuration or any of the contained server configuration have been changed. |
ServerConfigs.ServerConfigError |
isValidServerConfig(ServerConfigData serverConfig)
Checks whether the given server configuration is valid, e.g. |
void |
read()
This method uses a registered storage manager to read a server configuration list. |
void |
registerStorageManager(IServerConfigsStorageManager manager)
Registers a storage manager. |
void |
removeServerConfig(ServerConfigData serverConfig)
Removes a server configuration from the server configuration list. |
void |
setActiveServerConfig(ServerConfigData activeServerConfig)
Sets the currently active server configuration. |
void |
setDirty(boolean theisDirty)
Sets the dirty state of this server configuration list. |
void |
setStandardServerConfig(ServerConfigData standardServerConfig)
Sets the standard server configuration. |
void |
store()
This method uses a registered storage manager to store a server configuration list. |
Object[] |
toObjectArray()
Returns an object array consisting of the server configuration. |
void |
unregisterStorageManager()
Unregisters the storage manager. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static ServerConfigs getInstance()
public void registerStorageManager(IServerConfigsStorageManager manager)
manager
- the storage manager to be registeredpublic void unregisterStorageManager()
public void clear()
public void read()
public void store()
public ServerConfigs.ServerConfigError isValidServerConfig(ServerConfigData serverConfig)
serverConfig
- the server configuration to be tested
public ServerConfigData createServerConfig(String name, URI address)
name
- the name of the server configurationaddress
- the address of the layout service
null
if the provided data is not validpublic ServerConfigData createServerConfig(String name, URI address, String truststore, String truststorepass)
name
- the name of the server configurationaddress
- the address of the layout servicetruststore
- path to the trust store when using HTTPStruststorepass
- password for the trust store
null
if the provided data is not validpublic ServerConfigData createServerConfig(String name, URI address, String truststore, String truststorepass, boolean isFixed, boolean isActive, boolean isStandard)
name
- the name of the server configurationaddress
- the address of the layout servicetruststore
- path to the trust store when using HTTPStruststorepass
- password for the trust storeisFixed
- whether this server configuration can be altered or deleted from the
server configuration listisActive
- whether this server configuration shall be the currently active
server configuration for doing remote layoutisStandard
- whether this server configuration shall be the standard server configuration for
doing remote layout
null
if the provided data is not validpublic void addServerConfig(ServerConfigData serverConfig)
serverConfig
- the server configuration to be addedpublic void removeServerConfig(ServerConfigData serverConfig)
serverConfig
- the server configuration to be removedpublic ServerConfigData findServerConfig(ServerConfigData serverConfig)
serverConfig
- the server configuration to be compared
null
if no equal server configuration is in the server
configuration listpublic boolean containsServerConfig(ServerConfigData serverConfig)
serverConfig
- the server configuration to be searched for
public int getIndexByServerConfig(ServerConfigData serverConfig)
serverConfig
- the server configuration to determine the index for
-1
if the server configuration is not contained
in the server configuration listpublic ServerConfigData getServerConfigByIndex(int index)
index
- the index of the server configuration
null
if the index is invalidpublic ServerConfigData getActiveServerConfig()
null
if no
server configuration is currently activepublic void setActiveServerConfig(ServerConfigData activeServerConfig)
activeServerConfig
- the server configuration which shall be the actively used server configuration
for remote layoutpublic ServerConfigData getStandardServerConfig()
null
if no server configuration
is currently defined as standardpublic void setStandardServerConfig(ServerConfigData standardServerConfig)
standardServerConfig
- the server configuration which shall be the standard server configuration
for remote layoutpublic boolean isDirty()
public int countConfigs()
public void setDirty(boolean theisDirty)
theisDirty
- the new dirty statepublic Object[] toObjectArray()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |