com.epam.cmemdp.marketdata.cfg
Class ConfigHelper

java.lang.Object
  extended by com.epam.cmemdp.marketdata.cfg.ConfigHelper

public class ConfigHelper
extends java.lang.Object


Constructor Summary
ConfigHelper()
           
 
Method Summary
static Configuration loadConfiguration(java.net.URL src)
          Load Configuration instance from URL
static Configuration.Subscription newOverwriteSubscription(java.lang.String id)
          Creates new Subscription instance with a given Id and overwrite attribute=true
static Configuration.Subscription newSubscription(java.lang.String id)
          Creates new Subscription instance with a given Id
static Configuration.Subscription newSubscription(java.lang.String id, java.lang.Long[] secIdArray, boolean overwriteFlag, Configuration.SubscriptionOption[] options)
          Creates new Subscription instance by a given list of Security Ids and Subscription Options.
static Configuration.Subscription newSubscription(java.lang.String id, java.lang.Long[] secIdArray, Configuration.SubscriptionOption[] options)
          Creates new Subscription instance by a given list of Security Ids and Subscription Options
static Configuration.Subscription newSubscriptionByGroup(java.lang.String id, java.lang.String[] secGroupArray, boolean overwriteFlag, Configuration.SubscriptionOption[] options)
          Creates new Subscription instance by a given list of Security Group Names and Subscription Options.
static Configuration.Subscription newSubscriptionByGroup(java.lang.String id, java.lang.String[] secGroupArray, Configuration.SubscriptionOption[] options)
          Creates new Subscription instance by a given list of Security Group Names and Subscription Options
static Configuration.Subscription newSubscriptionBySecDesc(java.lang.String id, java.lang.String[] secDescArray, boolean overwriteFlag, Configuration.SubscriptionOption[] options)
          Creates new Subscription instance by a given list of Security Ids and Subscription Options.
static Configuration.Subscription newSubscriptionBySecDesc(java.lang.String id, java.lang.String[] secDescArray, Configuration.SubscriptionOption[] options)
          Creates new Subscription instance by a given list of Security Descriptions and Subscription Options
static Configuration.Subscription newSubscriptionBySymbol(java.lang.String id, java.lang.String[] secSymbArray, boolean overwriteFlag, Configuration.SubscriptionOption[] options)
          Creates new Subscription instance by a given list of Security Symbols and Subscription Options.
static Configuration.Subscription newSubscriptionBySymbol(java.lang.String id, java.lang.String[] secSymbArray, Configuration.SubscriptionOption[] options)
          Creates new Subscription instance by a given list of Security Symbols and Subscription Options
static boolean validate(Configuration cfg)
          Validate a given Configuration instance.
static boolean validateNewSubscription(Configuration cfg, Configuration.Subscription subscription)
          Validate a given Subscription instance in scope if a given Configuration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConfigHelper

public ConfigHelper()
Method Detail

loadConfiguration

public static Configuration loadConfiguration(java.net.URL src)
                                       throws ConfigurationException
Load Configuration instance from URL

Parameters:
src - URL to Configuration
Returns:
Configuration
Throws:
ConfigurationException

validate

public static boolean validate(Configuration cfg)
                        throws ConfigurationException
Validate a given Configuration instance. Check uniqueness of IDs

Parameters:
cfg - a Configuration instance
Returns:
true or false
Throws:
ConfigurationException

validateNewSubscription

public static boolean validateNewSubscription(Configuration cfg,
                                              Configuration.Subscription subscription)
                                       throws ConfigurationException
Validate a given Subscription instance in scope if a given Configuration. Check uniqueness of IDs

Parameters:
cfg - a Configuration instance
subscription - a Subscription instance
Returns:
true or false
Throws:
ConfigurationException

newSubscription

public static Configuration.Subscription newSubscription(java.lang.String id)
Creates new Subscription instance with a given Id

Parameters:
id - id of a new Subscription
Returns:
Configuration.Subscription

newOverwriteSubscription

public static Configuration.Subscription newOverwriteSubscription(java.lang.String id)
Creates new Subscription instance with a given Id and overwrite attribute=true

Parameters:
id - id of a new Subscription
Returns:
Configuration.Subscription

newSubscription

public static Configuration.Subscription newSubscription(java.lang.String id,
                                                         java.lang.Long[] secIdArray,
                                                         Configuration.SubscriptionOption[] options)
Creates new Subscription instance by a given list of Security Ids and Subscription Options

Parameters:
id - id of a new Subscription
secIdArray - a set of Security Ids
options - a set of Subscription Options
Returns:
Configuration.Subscription

newSubscription

public static Configuration.Subscription newSubscription(java.lang.String id,
                                                         java.lang.Long[] secIdArray,
                                                         boolean overwriteFlag,
                                                         Configuration.SubscriptionOption[] options)
Creates new Subscription instance by a given list of Security Ids and Subscription Options. Additionaly specified a state of overwrite attribute

Parameters:
id - id of a new Subscription
secIdArray - a set of Security Ids
overwriteFlag - a state of overwrite attribute
options - a set of Subscription Options
Returns:
Configuration.Subscription

newSubscriptionBySecDesc

public static Configuration.Subscription newSubscriptionBySecDesc(java.lang.String id,
                                                                  java.lang.String[] secDescArray,
                                                                  Configuration.SubscriptionOption[] options)
Creates new Subscription instance by a given list of Security Descriptions and Subscription Options

Parameters:
id - id of a new Subscription
secDescArray - a set of Security Descriptions
options - a set of Subscription Options
Returns:
Configuration.Subscription

newSubscriptionBySecDesc

public static Configuration.Subscription newSubscriptionBySecDesc(java.lang.String id,
                                                                  java.lang.String[] secDescArray,
                                                                  boolean overwriteFlag,
                                                                  Configuration.SubscriptionOption[] options)
Creates new Subscription instance by a given list of Security Ids and Subscription Options. Additionaly specified a state of overwrite attribute

Parameters:
id - id of a new Subscription
secDescArray - a set of Security Descriptions
overwriteFlag - a state of overwrite attribute
options - a set of Subscription Options
Returns:
Configuration.Subscription

newSubscriptionBySymbol

public static Configuration.Subscription newSubscriptionBySymbol(java.lang.String id,
                                                                 java.lang.String[] secSymbArray,
                                                                 Configuration.SubscriptionOption[] options)
Creates new Subscription instance by a given list of Security Symbols and Subscription Options

Parameters:
id - id of a new Subscription
secSymbArray - a set of Security Symbols
options - a set of Subscription Options
Returns:
Configuration.Subscription

newSubscriptionBySymbol

public static Configuration.Subscription newSubscriptionBySymbol(java.lang.String id,
                                                                 java.lang.String[] secSymbArray,
                                                                 boolean overwriteFlag,
                                                                 Configuration.SubscriptionOption[] options)
Creates new Subscription instance by a given list of Security Symbols and Subscription Options. Additionaly specified a state of overwrite attribute

Parameters:
id - id of a new Subscription
secSymbArray - a set of Security Symbols
overwriteFlag - a state of overwrite attribute
options - a set of Subscription Options
Returns:
Configuration.Subscription

newSubscriptionByGroup

public static Configuration.Subscription newSubscriptionByGroup(java.lang.String id,
                                                                java.lang.String[] secGroupArray,
                                                                Configuration.SubscriptionOption[] options)
Creates new Subscription instance by a given list of Security Group Names and Subscription Options

Parameters:
id - id of a new Subscription
secGroupArray - a set of Security Group Names
options - a set of Subscription Options
Returns:
Configuration.Subscription

newSubscriptionByGroup

public static Configuration.Subscription newSubscriptionByGroup(java.lang.String id,
                                                                java.lang.String[] secGroupArray,
                                                                boolean overwriteFlag,
                                                                Configuration.SubscriptionOption[] options)
Creates new Subscription instance by a given list of Security Group Names and Subscription Options. Additionaly specified a state of overwrite attribute

Parameters:
id - id of a new Subscription
secGroupArray - a set of Security Group Names
overwriteFlag - a state of overwrite attribute
options - a set of Subscription Options
Returns:
Configuration.Subscription


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.