restgroupsServer
Class Settings

java.lang.Object
  extended by restgroupsServer.Settings

public class Settings
extends java.lang.Object

This class allows reading RestGroups server settings from XML file. Then it is used for serving those settings to other components of the RestGroups server.

Author:
tkob

Nested Class Summary
static class Settings.Schema
           
 
Constructor Summary
Settings(java.lang.String filename)
          Constructor which takes a path to the settings XML file for the argument.
 
Method Summary
 GcsFactory getFactory()
          Returns concrete GcsFactory object.
 GcsSettings getGcsSettings()
          Returns concrete GcsSettings object.
static Settings getInstance()
          Returns Settings instance.
 java.lang.String getRestgroupsIP()
          Returns the IP address which the RestGroups server is working on.
 int getRestgroupsPort()
          Returns the network port which the RestGroups server is working on.
 java.util.Map<Settings.Schema,java.lang.String> getSchemas()
          Returns hash-map containing schema documents used for verifying clients requests bodies.
static void initialise(java.lang.String filename)
          Initializes the singleton pattern.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Settings

public Settings(java.lang.String filename)
         throws RestGroupsException
Constructor which takes a path to the settings XML file for the argument.

Parameters:
filename - path to the settings file
Throws:
RestGroupsException
Method Detail

initialise

public static void initialise(java.lang.String filename)
                       throws RestGroupsException
Initializes the singleton pattern.

Parameters:
filename - path to the settings file
Throws:
RestGroupsException

getFactory

public GcsFactory getFactory()
Returns concrete GcsFactory object.

Returns:
concrete GcsFactory object

getGcsSettings

public GcsSettings getGcsSettings()
Returns concrete GcsSettings object.

Returns:
concrete GcsSettings object

getInstance

public static Settings getInstance()
Returns Settings instance.

Returns:
Settings instance

getRestgroupsIP

public java.lang.String getRestgroupsIP()
Returns the IP address which the RestGroups server is working on.

Returns:
the IP address which the RestGroups server is working on

getRestgroupsPort

public int getRestgroupsPort()
Returns the network port which the RestGroups server is working on.

Returns:
the network port which the RestGroups server is working on

getSchemas

public java.util.Map<Settings.Schema,java.lang.String> getSchemas()
Returns hash-map containing schema documents used for verifying clients requests bodies.

Returns:
hash-map containing schema documents