|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drupal.project.async_command.DrupletConfig
public class DrupletConfig
This class encapsulate the config.properties file. It is intended to work with only one Drupal instance and one Drupal database (DrupalConnection). If multiple Drupal instance/database is needed, use a separate DrupletConfig object. It also maps to only one type of Druplet. You can extends this class to map to different types of Druplet.
Field Summary | |
---|---|
protected java.util.Properties |
config
|
protected static java.util.logging.Logger |
logger
|
Constructor Summary | |
---|---|
DrupletConfig(java.io.File configFile)
|
|
DrupletConfig(java.util.Properties config)
Default constructor that construct the config object. |
|
DrupletConfig(java.lang.String configString)
|
Method Summary | |
---|---|
protected java.util.Properties |
generateDefault()
|
Druplet.AccessMode |
getAccessMode()
|
DrupalConnection.DatabaseType |
getDatabaseType()
|
java.lang.String |
getDrupalDbPrefix()
|
java.io.File |
getDrupalHome()
DRUPAL_HOME is valid only when access_mode is local. |
java.net.URL |
getDrupalSiteUrl()
drupal_site_url should be valid when drupal_access_mode is 'remote' so that Druplet can access drupal instance. |
int |
getDrupalVersion()
|
int |
getIntProperty(java.lang.String name,
int defaultValue)
|
int |
getMaxBatchSize()
|
java.util.Properties |
getProperties()
|
static DrupletConfig |
load()
No configuration file. |
protected void |
prepare()
Prepare config properties, e.g. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected java.util.Properties config
protected static java.util.logging.Logger logger
Constructor Detail |
---|
public DrupletConfig(java.util.Properties config)
config
- public DrupletConfig(java.lang.String configString)
public DrupletConfig(java.io.File configFile)
Method Detail |
---|
public static DrupletConfig load()
protected java.util.Properties generateDefault()
protected void prepare()
public int getDrupalVersion()
public DrupalConnection.DatabaseType getDatabaseType()
public java.lang.String getDrupalDbPrefix()
public int getMaxBatchSize()
public java.util.Properties getProperties()
public Druplet.AccessMode getAccessMode()
public java.io.File getDrupalHome()
public java.net.URL getDrupalSiteUrl()
public int getIntProperty(java.lang.String name, int defaultValue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |