org.eclipse.emf.emfstore.internal.server
Class ServerConfiguration

java.lang.Object
  extended by org.eclipse.emf.emfstore.internal.server.ServerConfiguration

public final class ServerConfiguration
extends Object

Represents the current server configuration.

Author:
koegel, wesendon, jfaltermeier

Field Summary
static String ACCEPTED_VERSIONS
          Property name of accepted client versions.
static String ACCEPTED_VERSIONS_ANY
          Allow any client version.
static String AUTHENTICATION_LDAP_AUTHPASS
          LDAP password authentication key.
static String AUTHENTICATION_LDAP_AUTHUSER
          LDAP user authentication key.
static String AUTHENTICATION_LDAP_BASE
          Ldap base.
static String AUTHENTICATION_LDAP_PREFIX
          Beginning tag of every LDAP property.
static String AUTHENTICATION_LDAP_SEARCHDN
          Searchdn for ldap.
static String AUTHENTICATION_LDAP_URL
          Ldap url.
static String AUTHENTICATION_MATCH_USERS_IGNORE_CASE
          Whether user names should be matched case insensitively.
static String AUTHENTICATION_POLICY
          Property for authentication policy used by server.
static AuthenticationControlType AUTHENTICATION_POLICY_DEFAULT
          Default authentication policy is simple property file aut.
static String AUTHENTICATION_SPFV_FILEPATH
          Path to property file for SPFV authentication.
static String EMFSTORE_HOME
          Prefix for EMFStore Home Startup Argument.
static String ES_PROPERTIES
          Name of EMFStore properties file.
static String KEYSTORE_ALIAS
          Alias for certificate in keystore.
static String KEYSTORE_ALIAS_DEFAULT
          Default alias, intentioned for developers.
static String KEYSTORE_CERTIFICATE_TYPE
          Type of server certificate used for encryption.
static String KEYSTORE_CERTIFICATE_TYPE_DEFAULT
          Default certificate.
static String KEYSTORE_CIPHER_ALGORITHM
          Type of cipher algorithm used for encryption.
static String KEYSTORE_CIPHER_ALGORITHM_DEFAULT
          Default cipher algorithm.
static String KEYSTORE_PASSWORD
          Password of keystore, in which the certificate for rmi encryption and password decryption is saved.
static String KEYSTORE_PASSWORD_DEFAULT
          Default keystore password.
static String LOAD_POST_STARTUP_LISTENER
          Property for loading post startup listeners from extension point.
static String LOAD_STARTUP_LISTENER
          Property for loading startup listeners from extension point.
static String LOAD_STARTUP_LISTENER_DEFAULT
          Default value for LOAD_STARTUP_LISTENER.
static String MULTI_PROPERTY_SEPERATOR
          Seperator for multiple properties.
static String PROJECT_ADMIN_PRIVILEGES_KEY
          Project admin privilege property key.
static String PROJECTSPACE_VERSION_PERSISTENCE_DEFAULT
          Default value for projectstate persistence policy in versions.
static String PROJECTSTATE_VERSION_PERSISTENCE
          Property for projectstate persistence policy in versions.
static String PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS
          The projectstate of every x versions will be stored.
static String PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS_X
          Property for the count of versions, needed by the everyXVersion policy.
static String PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS_X_DEFAULT
          Default value for the everyXVersion policy.
static String PROJECTSTATE_VERSION_PERSISTENCE_FIRSTANDLASTVERSIONONLY
          Only the project state from the first and last version is stored, the other states are calculated by the changes.
static String RESOURCE_STORAGE
          Constant for the name of the Resource Storage Property.
static String RESOURCE_STORAGE_DEFAULT
          Constant for the Default Resource Storage.
static String RMI_ENCRYPTION
          RMI encryption property, possible values are true and false.
static String RMI_ENCRYPTION_DEFAULT
          Default RMI encryption property value.
static String SERVER_KEYSTORE_FILE
          Default name of server keystore file.
static String SESSION_TIMEOUT
          Property for timeout time of a user session.
static String SESSION_TIMEOUT_DEFAULT
          Default timeout (= 30 minutes).
static String SSL_CIPHERS
          Key for valid ciphers to be used with SSL.
static String SUPER_USER
          Property for the super user.
static String SUPER_USER_DEFAULT
          Default super user name.
static String SUPER_USER_PASSWORD
          Property for the super user's password.
static String SUPER_USER_PASSWORD_DEFAULT
          Default super user password.
static String VALIDATION_PROJECT_EXCLUDE_DEFAULT
          Property to validate server on start up.
static String XML_RPC_PORT
          Option for defining port of XML RPC.
static String XML_RPC_PORT_DEFAULT
          Default port for XML RPC.
 
Method Summary
static void addPostStartupListener(PostStartupListener listener)
          Adds a PostStartupListener to the list of PostStartupListener which gets notified on start of the EMFStore.
static void addStartupListener(StartupListener listener)
          Adds a StartupListener to the list of StartupListener which gets notified on start of the EMFStore.
static String getConfDirectory()
          Return the configuration directory location.
static String getConfFile()
          Return the configuration file location.
static String getDefaultSPFVFilePath()
          Default filepath for spfv authentication.
static ESLocationProvider getLocationProvider()
          Returns the registered ESLocationProvider or if not existent, the DefaultServerWorkspaceLocationProvider.
static List<PostStartupListener> getPostStartupListeners()
          Returns the list of all PostStartupListeners.
static Properties getProperties()
          Gets the server's properties.
static String getServerHome()
          Return the server home directory location.
static String getServerKeyStorePath()
          Returns the path to the server's keystore.
static String getServerVersion()
          Get the server version as in the org.eclipse.emf.emfstore.internal.server manifest file.
static String[] getSplittedProperty(String property)
          This method calls Properties.getProperty(String) and splits the resulting string, using MULTI_PROPERTY_SEPERATOR.
static String[] getSplittedProperty(String property, String defaultValue)
          This method calls Properties.getProperty(String, String) and splits the resulting string, using MULTI_PROPERTY_SEPERATOR.
static String getStartArgument(String parameter)
          Gets startup parameter from Platform.getApplicationArgs() which are in the form of -[parameterkey]=[parametervalue].
static List<StartupListener> getStartupListeners()
          Returns the list of all StartupListeners.
static boolean isComputeChecksumOnCommitActive()
          Whether the server should compute a checksum for the project state when a commit has happened.
static boolean isInternalReleaseVersion()
          Determines if this is an internal release or not.
static boolean isProjectAdminPrivileg(PAPrivileges requestedPrivileg)
          Whether the ProjectAdminRole has the requested privilege.
static boolean isReleaseVersion()
          Determine if this is a release version or not.
static boolean isStartArgSet(String parameter)
          Checks whether a parameter is set.
static boolean isTesting()
           
static void setProperties(Properties prop)
          Sets the server's properties.
static void setProperties(Properties prop, boolean keepExisting)
          Sets the servers properties.
static void setTesting(boolean testing)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ES_PROPERTIES

public static final String ES_PROPERTIES
Name of EMFStore properties file.

See Also:
Constant Field Values

RESOURCE_STORAGE

public static final String RESOURCE_STORAGE
Constant for the name of the Resource Storage Property.

See Also:
Constant Field Values

RESOURCE_STORAGE_DEFAULT

public static final String RESOURCE_STORAGE_DEFAULT
Constant for the Default Resource Storage.

See Also:
Constant Field Values

RMI_ENCRYPTION

public static final String RMI_ENCRYPTION
RMI encryption property, possible values are true and false.

See Also:
Constant Field Values

RMI_ENCRYPTION_DEFAULT

public static final String RMI_ENCRYPTION_DEFAULT
Default RMI encryption property value.

See Also:
Constant Field Values

XML_RPC_PORT

public static final String XML_RPC_PORT
Option for defining port of XML RPC.

See Also:
Constant Field Values

XML_RPC_PORT_DEFAULT

public static final String XML_RPC_PORT_DEFAULT
Default port for XML RPC.

See Also:
Constant Field Values

SERVER_KEYSTORE_FILE

public static final String SERVER_KEYSTORE_FILE
Default name of server keystore file.

See Also:
Constant Field Values

KEYSTORE_PASSWORD

public static final String KEYSTORE_PASSWORD
Password of keystore, in which the certificate for rmi encryption and password decryption is saved.

See Also:
KEYSTORE_ALIAS, Constant Field Values

KEYSTORE_PASSWORD_DEFAULT

public static final String KEYSTORE_PASSWORD_DEFAULT
Default keystore password.

See Also:
Constant Field Values

KEYSTORE_ALIAS

public static final String KEYSTORE_ALIAS
Alias for certificate in keystore.

See Also:
KEYSTORE_PASSWORD, Constant Field Values

KEYSTORE_ALIAS_DEFAULT

public static final String KEYSTORE_ALIAS_DEFAULT
Default alias, intentioned for developers.

See Also:
Constant Field Values

KEYSTORE_CERTIFICATE_TYPE

public static final String KEYSTORE_CERTIFICATE_TYPE
Type of server certificate used for encryption.

See Also:
Constant Field Values

KEYSTORE_CERTIFICATE_TYPE_DEFAULT

public static final String KEYSTORE_CERTIFICATE_TYPE_DEFAULT
Default certificate.

See Also:
Constant Field Values

KEYSTORE_CIPHER_ALGORITHM

public static final String KEYSTORE_CIPHER_ALGORITHM
Type of cipher algorithm used for encryption.

See Also:
Constant Field Values

KEYSTORE_CIPHER_ALGORITHM_DEFAULT

public static final String KEYSTORE_CIPHER_ALGORITHM_DEFAULT
Default cipher algorithm.

See Also:
Constant Field Values

PROJECTSTATE_VERSION_PERSISTENCE

public static final String PROJECTSTATE_VERSION_PERSISTENCE
Property for projectstate persistence policy in versions. Possible values are lastVersionOnly and everyVersion. If you don't have every project state the server has to recalulate certain revisions if requested. On the other side saving every project state is quite redundant.

See Also:
Constant Field Values

PROJECTSTATE_VERSION_PERSISTENCE_FIRSTANDLASTVERSIONONLY

public static final String PROJECTSTATE_VERSION_PERSISTENCE_FIRSTANDLASTVERSIONONLY
Only the project state from the first and last version is stored, the other states are calculated by the changes.

See Also:
Constant Field Values

PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS

public static final String PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS
The projectstate of every x versions will be stored. This is used to save memory. Use x=1 to save every version.

See Also:
Constant Field Values

PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS_X

public static final String PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS_X
Property for the count of versions, needed by the everyXVersion policy.

See Also:
Constant Field Values

PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS_X_DEFAULT

public static final String PROJECTSTATE_VERSION_PERSISTENCE_EVERYXVERSIONS_X_DEFAULT
Default value for the everyXVersion policy.

See Also:
Constant Field Values

PROJECTSPACE_VERSION_PERSISTENCE_DEFAULT

public static final String PROJECTSPACE_VERSION_PERSISTENCE_DEFAULT
Default value for projectstate persistence policy in versions.

See Also:
Constant Field Values

SESSION_TIMEOUT

public static final String SESSION_TIMEOUT
Property for timeout time of a user session.

See Also:
Constant Field Values

SESSION_TIMEOUT_DEFAULT

public static final String SESSION_TIMEOUT_DEFAULT
Default timeout (= 30 minutes).

See Also:
Constant Field Values

SUPER_USER

public static final String SUPER_USER
Property for the super user.

See Also:
Constant Field Values

SUPER_USER_DEFAULT

public static final String SUPER_USER_DEFAULT
Default super user name.

See Also:
Constant Field Values

SUPER_USER_PASSWORD

public static final String SUPER_USER_PASSWORD
Property for the super user's password.

See Also:
Constant Field Values

SUPER_USER_PASSWORD_DEFAULT

public static final String SUPER_USER_PASSWORD_DEFAULT
Default super user password.

See Also:
Constant Field Values

AUTHENTICATION_POLICY

public static final String AUTHENTICATION_POLICY
Property for authentication policy used by server. E.g. ldap or property file.

See Also:
Constant Field Values

AUTHENTICATION_LDAP_PREFIX

public static final String AUTHENTICATION_LDAP_PREFIX
Beginning tag of every LDAP property.

See Also:
Constant Field Values

AUTHENTICATION_LDAP_URL

public static final String AUTHENTICATION_LDAP_URL
Ldap url.

See Also:
Constant Field Values

AUTHENTICATION_LDAP_AUTHUSER

public static final String AUTHENTICATION_LDAP_AUTHUSER
LDAP user authentication key.

See Also:
Constant Field Values

AUTHENTICATION_LDAP_AUTHPASS

public static final String AUTHENTICATION_LDAP_AUTHPASS
LDAP password authentication key.

See Also:
Constant Field Values

AUTHENTICATION_LDAP_BASE

public static final String AUTHENTICATION_LDAP_BASE
Ldap base.

See Also:
Constant Field Values

AUTHENTICATION_LDAP_SEARCHDN

public static final String AUTHENTICATION_LDAP_SEARCHDN
Searchdn for ldap.

See Also:
Constant Field Values

AUTHENTICATION_POLICY_DEFAULT

public static final AuthenticationControlType AUTHENTICATION_POLICY_DEFAULT
Default authentication policy is simple property file aut.


AUTHENTICATION_SPFV_FILEPATH

public static final String AUTHENTICATION_SPFV_FILEPATH
Path to property file for SPFV authentication.

See Also:
Constant Field Values

SSL_CIPHERS

public static final String SSL_CIPHERS
Key for valid ciphers to be used with SSL.

See Also:
Constant Field Values

VALIDATION_PROJECT_EXCLUDE_DEFAULT

public static final String VALIDATION_PROJECT_EXCLUDE_DEFAULT
Property to validate server on start up.

See Also:
Constant Field Values

LOAD_STARTUP_LISTENER

public static final String LOAD_STARTUP_LISTENER
Property for loading startup listeners from extension point.

See Also:
Constant Field Values

LOAD_POST_STARTUP_LISTENER

public static final String LOAD_POST_STARTUP_LISTENER
Property for loading post startup listeners from extension point.

See Also:
Constant Field Values

LOAD_STARTUP_LISTENER_DEFAULT

public static final String LOAD_STARTUP_LISTENER_DEFAULT
Default value for LOAD_STARTUP_LISTENER.


ACCEPTED_VERSIONS

public static final String ACCEPTED_VERSIONS
Property name of accepted client versions. Enter the version's names or any, seperate multiple entries with MULTI_PROPERTY_SEPERATOR.

See Also:
Constant Field Values

ACCEPTED_VERSIONS_ANY

public static final String ACCEPTED_VERSIONS_ANY
Allow any client version.

See Also:
Constant Field Values

MULTI_PROPERTY_SEPERATOR

public static final String MULTI_PROPERTY_SEPERATOR
Seperator for multiple properties. E.g. acceptedversions = 0.1,0.2

See Also:
Constant Field Values

EMFSTORE_HOME

public static final String EMFSTORE_HOME
Prefix for EMFStore Home Startup Argument.

See Also:
Constant Field Values

AUTHENTICATION_MATCH_USERS_IGNORE_CASE

public static final String AUTHENTICATION_MATCH_USERS_IGNORE_CASE
Whether user names should be matched case insensitively.

See Also:
Constant Field Values

PROJECT_ADMIN_PRIVILEGES_KEY

public static final String PROJECT_ADMIN_PRIVILEGES_KEY
Project admin privilege property key.

See Also:
Constant Field Values
Method Detail

getConfDirectory

public static String getConfDirectory()
Return the configuration directory location.

Returns:
the dir path string

isProjectAdminPrivileg

public static boolean isProjectAdminPrivileg(PAPrivileges requestedPrivileg)
Whether the ProjectAdminRole has the requested privilege.

Parameters:
requestedPrivileg - the privilege that is requested
Returns:
true, if the ProjectAdminRole has the right to perform the requested privilege, false otherwise

getConfFile

public static String getConfFile()
Return the configuration file location.

Returns:
the file path string

getServerHome

public static String getServerHome()
Return the server home directory location.

Returns:
the dir path string

getLocationProvider

public static ESLocationProvider getLocationProvider()
Returns the registered ESLocationProvider or if not existent, the DefaultServerWorkspaceLocationProvider.

Returns:
workspace location provider

getStartArgument

public static String getStartArgument(String parameter)
Gets startup parameter from Platform.getApplicationArgs() which are in the form of -[parameterkey]=[parametervalue].

Parameters:
parameter - name of parameter key
Returns:
parameter as string or null

isStartArgSet

public static boolean isStartArgSet(String parameter)
Checks whether a parameter is set.

Parameters:
parameter - checks existence of parameter
Returns:
boolean

getDefaultSPFVFilePath

public static String getDefaultSPFVFilePath()
Default filepath for spfv authentication.

Returns:
path as string

getProperties

public static Properties getProperties()
Gets the server's properties.

Returns:
properties

getSplittedProperty

public static String[] getSplittedProperty(String property)
This method calls Properties.getProperty(String) and splits the resulting string, using MULTI_PROPERTY_SEPERATOR.

Parameters:
property - property key
Returns:
String array or null

getSplittedProperty

public static String[] getSplittedProperty(String property,
                                           String defaultValue)
This method calls Properties.getProperty(String, String) and splits the resulting string, using MULTI_PROPERTY_SEPERATOR.

Parameters:
property - property key
defaultValue - default value
Returns:
String array or null

setProperties

public static void setProperties(Properties prop)
Sets the server's properties. All already contained properties will be set to the values before.

Parameters:
prop - properties

setProperties

public static void setProperties(Properties prop,
                                 boolean keepExisting)
Sets the servers properties.

Parameters:
prop - The properties to set.
keepExisting - Keep already contained properties?

getServerKeyStorePath

public static String getServerKeyStorePath()
Returns the path to the server's keystore.

Returns:
path to keystore

getServerVersion

public static String getServerVersion()
Get the server version as in the org.eclipse.emf.emfstore.internal.server manifest file.

Returns:
the server version number

isReleaseVersion

public static boolean isReleaseVersion()
Determine if this is a release version or not.

Returns:
true if it is a release version

isInternalReleaseVersion

public static boolean isInternalReleaseVersion()
Determines if this is an internal release or not.

Returns:
true if it an internal release

setTesting

public static void setTesting(boolean testing)
Parameters:
testing - if server is running for testing

isTesting

public static boolean isTesting()
Returns:
if server is running for testing

isComputeChecksumOnCommitActive

public static boolean isComputeChecksumOnCommitActive()
Whether the server should compute a checksum for the project state when a commit has happened. If the server does compute a checksum it will be sent back to the client who then can check whether there are any differences between his and the server's project state.

Returns:
true, if the server does compute a checksum in case a commit has happened, false otherwise

getStartupListeners

public static List<StartupListener> getStartupListeners()
Returns the list of all StartupListeners.

Returns:
the List of all registered StartupListener.

addStartupListener

public static void addStartupListener(StartupListener listener)
Adds a StartupListener to the list of StartupListener which gets notified on start of the EMFStore.

Parameters:
listener - the StartupListener to add

getPostStartupListeners

public static List<PostStartupListener> getPostStartupListeners()
Returns the list of all PostStartupListeners.

Returns:
the List of all registered PostStartupListener.

addPostStartupListener

public static void addPostStartupListener(PostStartupListener listener)
Adds a PostStartupListener to the list of PostStartupListener which gets notified on start of the EMFStore.

Parameters:
listener - the PostStartupListener to add


Copyright © 2015. All Rights Reserved.