org.chorem.pollen
Enum PollenConfigurationOption

java.lang.Object
  extended by java.lang.Enum<PollenConfigurationOption>
      extended by org.chorem.pollen.PollenConfigurationOption
All Implemented Interfaces:
Serializable, Comparable<PollenConfigurationOption>, org.nuiton.util.ApplicationConfig.OptionDef

public enum PollenConfigurationOption
extends Enum<PollenConfigurationOption>
implements org.nuiton.util.ApplicationConfig.OptionDef

All Pollen configuration options.

Since:
1.3
Author:
tchemit

Enum Constant Summary
ADMIN_EMAIL
          email for default admin.
ADMIN_LOGIN
          login for default admin.
ADMIN_PASSWORD
          password for default admin.
APPLICATION_URL
          login for default admin.
CHARSET
          Charset of Pollen.
CONTACT_EMAIL
          email for contact link.
DATA_DIR
          login for default admin.
DB_DIALECT
          db dialect.
DB_DRIVER
          db driver.
DB_LOGIN
          login to db.
DB_PASSWORD
          passowrd to db.
DB_URL
          db url.
DEFAULT_CHOICE_TYPE
          Default choice type to use at a new poll creation.
DEFAULT_POLL_TYPE
          Default poll type to use at a new poll creation.
DEFAULT_VOTE_COUNTING_TYPE
          Default vote counting type to use at a new poll creation.
EMAIL_DIR
          directory to store emails before sending them.
EMAIL_FROM
          from for email sending configuration.
EMAIL_HOST
          host for email sending configuration.
EMAIL_PORT
          port for email sending configuration.
FEED_DIR
          path for feed directory.
IMG_DIR
          path for uploaded images directory.
NB_VOTES_PER_PAGE
          nb votes to display per page.
 
Field Summary
protected  String defaultValue
          Default value of option.
protected  String description
          I18n key of option description
protected  String key
          Configuration key.
protected  Class<?> type
          Type of option
 
Method Summary
 String getDefaultValue()
           
 String getDescription()
           
 String getKey()
           
 Class<?> getType()
           
 boolean isFinal()
           
 boolean isTransient()
           
 void setDefaultValue(String defaultValue)
           
 void setFinal(boolean newValue)
           
 void setTransient(boolean newValue)
           
static PollenConfigurationOption valueOf(String name)
          Returns the enum constant of this type with the specified name.
static PollenConfigurationOption[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

APPLICATION_URL

public static final PollenConfigurationOption APPLICATION_URL
login for default admin.


DATA_DIR

public static final PollenConfigurationOption DATA_DIR
login for default admin.


ADMIN_LOGIN

public static final PollenConfigurationOption ADMIN_LOGIN
login for default admin.


ADMIN_PASSWORD

public static final PollenConfigurationOption ADMIN_PASSWORD
password for default admin.


ADMIN_EMAIL

public static final PollenConfigurationOption ADMIN_EMAIL
email for default admin.


CONTACT_EMAIL

public static final PollenConfigurationOption CONTACT_EMAIL
email for contact link.


EMAIL_HOST

public static final PollenConfigurationOption EMAIL_HOST
host for email sending configuration.


EMAIL_PORT

public static final PollenConfigurationOption EMAIL_PORT
port for email sending configuration.


EMAIL_FROM

public static final PollenConfigurationOption EMAIL_FROM
from for email sending configuration.


EMAIL_DIR

public static final PollenConfigurationOption EMAIL_DIR
directory to store emails before sending them.


FEED_DIR

public static final PollenConfigurationOption FEED_DIR
path for feed directory.


IMG_DIR

public static final PollenConfigurationOption IMG_DIR
path for uploaded images directory.


NB_VOTES_PER_PAGE

public static final PollenConfigurationOption NB_VOTES_PER_PAGE
nb votes to display per page.


CHARSET

public static final PollenConfigurationOption CHARSET
Charset of Pollen.


DEFAULT_POLL_TYPE

public static final PollenConfigurationOption DEFAULT_POLL_TYPE
Default poll type to use at a new poll creation.


DEFAULT_VOTE_COUNTING_TYPE

public static final PollenConfigurationOption DEFAULT_VOTE_COUNTING_TYPE
Default vote counting type to use at a new poll creation.


DEFAULT_CHOICE_TYPE

public static final PollenConfigurationOption DEFAULT_CHOICE_TYPE
Default choice type to use at a new poll creation.


DB_DRIVER

public static final PollenConfigurationOption DB_DRIVER
db driver.


DB_DIALECT

public static final PollenConfigurationOption DB_DIALECT
db dialect.


DB_URL

public static final PollenConfigurationOption DB_URL
db url.


DB_LOGIN

public static final PollenConfigurationOption DB_LOGIN
login to db.


DB_PASSWORD

public static final PollenConfigurationOption DB_PASSWORD
passowrd to db.

Field Detail

key

protected final String key
Configuration key.


description

protected final String description
I18n key of option description


type

protected final Class<?> type
Type of option


defaultValue

protected String defaultValue
Default value of option.

Method Detail

values

public static PollenConfigurationOption[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (PollenConfigurationOption c : PollenConfigurationOption.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static PollenConfigurationOption valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

Parameters:
name - the name of the enum constant to be returned.
Returns:
the enum constant with the specified name
Throws:
IllegalArgumentException - if this enum type has no constant with the specified name
NullPointerException - if the argument is null

getKey

public String getKey()
Specified by:
getKey in interface org.nuiton.util.ApplicationConfig.OptionDef

getType

public Class<?> getType()
Specified by:
getType in interface org.nuiton.util.ApplicationConfig.OptionDef

getDescription

public String getDescription()
Specified by:
getDescription in interface org.nuiton.util.ApplicationConfig.OptionDef

getDefaultValue

public String getDefaultValue()
Specified by:
getDefaultValue in interface org.nuiton.util.ApplicationConfig.OptionDef

isTransient

public boolean isTransient()
Specified by:
isTransient in interface org.nuiton.util.ApplicationConfig.OptionDef

isFinal

public boolean isFinal()
Specified by:
isFinal in interface org.nuiton.util.ApplicationConfig.OptionDef

setDefaultValue

public void setDefaultValue(String defaultValue)
Specified by:
setDefaultValue in interface org.nuiton.util.ApplicationConfig.OptionDef

setTransient

public void setTransient(boolean newValue)
Specified by:
setTransient in interface org.nuiton.util.ApplicationConfig.OptionDef

setFinal

public void setFinal(boolean newValue)
Specified by:
setFinal in interface org.nuiton.util.ApplicationConfig.OptionDef


Copyright © 2009-2012 CodeLutin. All Rights Reserved.