Neo4j Enterprise

org.neo4j.graphdb.factory
Class GraphDatabaseSetting<T>

java.lang.Object
  extended by org.neo4j.graphdb.factory.GraphDatabaseSetting<T>
Direct Known Subclasses:
GraphDatabaseSetting.BaseOptionsSetting, GraphDatabaseSetting.ListSetting, GraphDatabaseSetting.NumberOfBytesSetting, GraphDatabaseSetting.NumberSetting, GraphDatabaseSetting.StringSetting, GraphDatabaseSetting.TimeSpanSetting, GraphDatabaseSetting.URISetting

public abstract class GraphDatabaseSetting<T>
extends Object

Setting types for Neo4j. Actual settings are in GraphDatabaseSettings


Nested Class Summary
static class GraphDatabaseSetting.AbstractPathSetting
           
static class GraphDatabaseSetting.BaseOptionsSetting<ST>
           
static class GraphDatabaseSetting.BooleanSetting
           
static interface GraphDatabaseSetting.DefaultValue
           
static class GraphDatabaseSetting.DirectorySetting
           
static class GraphDatabaseSetting.DoubleSetting
           
static class GraphDatabaseSetting.EnumerableSetting<ET extends Enum<ET>>
           
static class GraphDatabaseSetting.FileSetting
           
static class GraphDatabaseSetting.FloatSetting
           
static class GraphDatabaseSetting.IntegerSetting
           
static class GraphDatabaseSetting.ListSetting<T>
           
static class GraphDatabaseSetting.LongSetting
           
static class GraphDatabaseSetting.NumberOfBytesSetting
           
static class GraphDatabaseSetting.NumberSetting<T extends Number>
           
static class GraphDatabaseSetting.OptionsSetting
           
static class GraphDatabaseSetting.PortSetting
           
static class GraphDatabaseSetting.StringSetting
           
static class GraphDatabaseSetting.TimeSpanSetting
           
static class GraphDatabaseSetting.URISetting
           
 
Field Summary
static String ANY
           
static String FALSE
           
static String TRUE
           
 
Constructor Summary
protected GraphDatabaseSetting(String name, String validationMessage)
           
 
Method Summary
protected  String getMessage(Locale locale, String defaultMessage)
           
protected  IllegalArgumentException illegalValue(Locale locale, String value, Object... args)
           
protected  IllegalArgumentException illegalValue(Locale locale, String value, String rawMessage, Object[] args)
           
 String name()
           
static boolean osIsMacOS()
           
static boolean osIsWindows()
           
abstract  void validate(Locale locale, String value)
          Validate a raw string value, called when configuration is set.
 void validate(String value)
           
 String validationMessage()
           
abstract  T valueOf(String rawValue, Config config)
          Create a typed value from a raw string value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

TRUE

public static final String TRUE
See Also:
Constant Field Values

FALSE

public static final String FALSE
See Also:
Constant Field Values

ANY

public static final String ANY
See Also:
Constant Field Values
Constructor Detail

GraphDatabaseSetting

protected GraphDatabaseSetting(String name,
                               String validationMessage)
Method Detail

name

public String name()

validationMessage

public String validationMessage()

validate

public void validate(String value)
              throws IllegalArgumentException
Throws:
IllegalArgumentException

validate

public abstract void validate(Locale locale,
                              String value)
Validate a raw string value, called when configuration is set. Throws IllegalArgumentException if the provided value is not valid.

Parameters:
locale -
value -

valueOf

public abstract T valueOf(String rawValue,
                          Config config)
Create a typed value from a raw string value. This is to be called when a value is fetched from configuration.

Parameters:
rawValue - The raw string value stored in configuration
config - The config instance, allows having config values that depend on each other.
Returns:

getMessage

protected String getMessage(Locale locale,
                            String defaultMessage)

illegalValue

protected IllegalArgumentException illegalValue(Locale locale,
                                                String value,
                                                Object... args)
                                         throws IllegalArgumentException
Throws:
IllegalArgumentException

illegalValue

protected IllegalArgumentException illegalValue(Locale locale,
                                                String value,
                                                String rawMessage,
                                                Object[] args)
                                         throws IllegalArgumentException
Throws:
IllegalArgumentException

osIsWindows

public static boolean osIsWindows()

osIsMacOS

public static boolean osIsMacOS()

Neo4j Enterprise

Copyright © 2002-2012 The Neo4j Graph Database Project. All Rights Reserved.