de.cau.cs.kieler.kwebs.client
Class ServerConfigData

java.lang.Object
  extended by de.cau.cs.kieler.kwebs.client.ServerConfigData

public final class ServerConfigData
extends Object

This utility class resembles a server configuration as the user can edit it on the preference page for remote layout. It can also be used for non KIELER clients to easily manage server configurations.

Rating proposed yellow
(2011-08-02) reviewed by ckru, mri, msp

Constructor Summary
ServerConfigData(String thename, URI theaddress)
          Constructs a new server configuration.
ServerConfigData(String thename, URI theaddress, String thetruststore, String thetruststorePass)
          Constructs a new server configuration.
ServerConfigData(String thename, URI theaddress, String thetruststore, String thetruststorePass, boolean theisFixed, boolean theisActive, boolean theisStandard)
          Constructs a new server configuration.
 
Method Summary
 boolean equals(Object obj)
          
 URI getAddress()
          Returns the address where the service is located.
 String getName()
          Returns the name of this server configuration.
 String getTruststore()
          Returns the path to the trust store required to access a HTTPS based service.
 String getTruststorePass()
          Returns the password required to access the HTTPS trust store associated with this server configuration.
 int hashCode()
          
 boolean isActive()
          Returns whether this server configuration shall be the currently active server configuration for doing remote layout.
 boolean isDirty()
          Returns whether this server configuration has been changed.
 boolean isFixed()
          Returns whether this server configuration can be changed or deleted from the server configuration list.
 boolean isStandard()
          Returns whether this server configuration shall be the standard server configuration for doing remote layout.
 void setActive(boolean theisActive)
          Sets whether this server configuration is currently used for doing remote layout.
 void setAddress(URI theaddress)
          Sets the address where the service is located.
 void setDirty(boolean theisDirty)
          Sets whether this server configuration has been altered.
 void setFixed(boolean theisFixed)
          Sets whether this server configuration can be changed or deleted from the server configuration list.
 void setName(String thename)
          Sets the name of this server configuration.
 void setStandard(boolean theisStandard)
          Sets whether this server configuration is the default configuration for doing layout.
 void setTruststore(String thetruststore)
          Sets the path to the trust store required to access a HTTPS based service.
 void setTruststorePass(String thetruststorePass)
          Sets the password required to access the HTTPS trust store associated with this server configuration.
 String toString()
          
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServerConfigData

public ServerConfigData(String thename,
                        URI theaddress)
Constructs a new server configuration.

Parameters:
thename - the name of the server configuration
theaddress - the address of the layout service

ServerConfigData

public ServerConfigData(String thename,
                        URI theaddress,
                        String thetruststore,
                        String thetruststorePass)
Constructs a new server configuration.

Parameters:
thename - the name of the server configuration
theaddress - the address of the layout service
thetruststore - path to the trust store when using HTTPS
thetruststorePass - password for the trust store

ServerConfigData

public ServerConfigData(String thename,
                        URI theaddress,
                        String thetruststore,
                        String thetruststorePass,
                        boolean theisFixed,
                        boolean theisActive,
                        boolean theisStandard)
Constructs a new server configuration.

Parameters:
thename - the name of the server configuration
theaddress - the address of the layout service
thetruststore - path to the trust store when using HTTPS
thetruststorePass - password for the trust store
theisFixed - whether this server configuration can be altered or deleted from the server configuration list
theisActive - whether this server configuration shall be the currently active server configuration for doing remote layout
theisStandard - whether this server configuration shall be the standard server configuration for doing remote layout
Method Detail

isFixed

public boolean isFixed()
Returns whether this server configuration can be changed or deleted from the server configuration list.

Returns:
whether this server configuration can be changed or deleted from the server configuration list

setFixed

public void setFixed(boolean theisFixed)
Sets whether this server configuration can be changed or deleted from the server configuration list.

Parameters:
theisFixed - whether this server configuration can be changed or deleted from the server configuration list.

isDirty

public boolean isDirty()
Returns whether this server configuration has been changed.

Returns:
whether this server configuration has been changed

setDirty

public void setDirty(boolean theisDirty)
Sets whether this server configuration has been altered.

Parameters:
theisDirty - whether this server configuration has been altered

isActive

public boolean isActive()
Returns whether this server configuration shall be the currently active server configuration for doing remote layout.

Returns:
whether this server configuration shall be the currently active server configuration for doing remote layout

setActive

public void setActive(boolean theisActive)
Sets whether this server configuration is currently used for doing remote layout.

Parameters:
theisActive - whether this server configuration is currently used for doing remote layout

isStandard

public boolean isStandard()
Returns whether this server configuration shall be the standard server configuration for doing remote layout.

Returns:
whether this server configuration shall be the standard server configuration for doing remote layout

setStandard

public void setStandard(boolean theisStandard)
Sets whether this server configuration is the default configuration for doing layout.

Parameters:
theisStandard - whether this server configuration is the default configuration for doing layout

getName

public String getName()
Returns the name of this server configuration.

Returns:
the name of this server configuration

setName

public void setName(String thename)
Sets the name of this server configuration.

Parameters:
thename - the name of this server configuration

getAddress

public URI getAddress()
Returns the address where the service is located.

Returns:
the address where the service is located

setAddress

public void setAddress(URI theaddress)
Sets the address where the service is located.

Parameters:
theaddress - the address where the service is located

getTruststore

public String getTruststore()
Returns the path to the trust store required to access a HTTPS based service.

Returns:
the path to the trust store

setTruststore

public void setTruststore(String thetruststore)
Sets the path to the trust store required to access a HTTPS based service.

Parameters:
thetruststore - the path to the trust store

getTruststorePass

public String getTruststorePass()
Returns the password required to access the HTTPS trust store associated with this server configuration.

Returns:
the password for the trust store

setTruststorePass

public void setTruststorePass(String thetruststorePass)
Sets the password required to access the HTTPS trust store associated with this server configuration.

Parameters:
thetruststorePass - the password for the trust store

toString

public String toString()

Overrides:
toString in class Object

equals

public boolean equals(Object obj)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object