org.drupal.project.async_command
Class AbstractDrupalApp

java.lang.Object
  extended by org.drupal.project.async_command.AbstractDrupalAppDeprecated
Direct Known Subclasses:
DefaultDrupalApp, JythonDrupalApp

Deprecated.

@Deprecated
public abstract class AbstractDrupalApp
extends java.lang.Object

all external program/script should extends this class for easier access. If using SQL queries, please follow SQL-92 standard to allow maximum compatibility.


Nested Class Summary
static class AbstractDrupalApp.EncryptionMethod
          Deprecated. 
static class AbstractDrupalApp.RunningMode
          Deprecated.  
 
Field Summary
protected  java.util.Properties config
          Deprecated.  
protected  javax.sql.DataSource dataSource
          Deprecated.  
protected  DrupalConnection drupalConnection
          Deprecated.  
protected  java.util.logging.Logger logger
          Deprecated.  
protected  int maxBatchSize
          Deprecated.  
protected  AbstractDrupalApp.RunningMode runningMode
          Deprecated.  
 
Constructor Summary
AbstractDrupalApp()
          Deprecated.  
 
Method Summary
protected  int[] batch(java.lang.String sql, java.lang.Object[][] params)
          Deprecated. 
protected  java.lang.String convertBlobValueToString(java.lang.Object blobValue)
          Deprecated. 
protected  java.lang.String d(java.lang.String sql)
          Deprecated. 
protected  java.lang.Object drupalVariableGet(java.lang.String varName)
          Deprecated. 
protected  void drupalVariableSet(java.lang.String varName, java.lang.String varValue)
          Deprecated. 
protected  java.lang.String evalPhp(java.lang.String phpCode)
          Deprecated. 
protected  java.lang.String evalPhp(java.lang.String pattern, java.lang.Object... params)
          Deprecated. 
protected  java.io.File getDefaultSettingsPhpFile()
          Deprecated. 
protected  java.lang.String getReaderContent(java.io.Reader input)
          Deprecated. 
 void handleCLI(java.lang.String[] args)
          Deprecated. this function handles CLI; users of the class should call this function.
abstract  java.lang.String identifier()
          Deprecated.  
 void initConfig(java.lang.String configString)
          Deprecated. 
 void initDrupalConnection()
          Deprecated. 
protected  void loadSettingsPhp(java.io.File settingsPhp)
          Deprecated. 
 Result pingMe()
          Deprecated.  
protected  void prepareApp()
          Deprecated. Subclass can choose to run some code in order to prepare for the DrupalApp.
protected  void prepareCommand(int uid, int eid, int created, java.lang.String command)
          Deprecated.  
protected  java.util.List<java.util.Map<java.lang.String,java.lang.Object>> query(java.lang.String sql, java.lang.Object... params)
          Deprecated. 
protected  java.lang.Object queryValue(java.lang.String sql, java.lang.Object... params)
          Deprecated. 
protected  java.util.Properties readEncryptedSettingsField(java.lang.String value)
          Deprecated. 
protected  java.util.Properties readEncryptedSettingsField(java.lang.String value, AbstractDrupalApp.EncryptionMethod encryptionMethod)
          Deprecated. 
 java.util.List<Command> retrievePendingCommand(java.lang.String app)
          Deprecated.  
 void run(java.lang.String[] args)
          Deprecated. This is the same as handleCLI()
 void runApp()
          Deprecated. run the Drupal application using the default settings
protected  Result runCommand(java.lang.String command)
          Deprecated. Run the async command.
 void testConnection()
          Deprecated. 
protected  java.util.Map<java.lang.String,java.lang.Object> unserializePhpArray(java.lang.String serialized)
          Deprecated. 
protected  int update(java.lang.String sql, java.lang.Object... params)
          Deprecated. 
protected  void updateRecord(int id, boolean status, java.lang.String message)
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dataSource

protected javax.sql.DataSource dataSource
Deprecated. 

logger

protected java.util.logging.Logger logger
Deprecated. 

drupalConnection

protected DrupalConnection drupalConnection
Deprecated. 

runningMode

protected AbstractDrupalApp.RunningMode runningMode
Deprecated. 

config

protected java.util.Properties config
Deprecated. 

maxBatchSize

protected int maxBatchSize
Deprecated. 
Constructor Detail

AbstractDrupalApp

public AbstractDrupalApp()
Deprecated. 
Method Detail

identifier

public abstract java.lang.String identifier()
Deprecated. 
Returns:
The name of the drupal application.

runApp

public void runApp()
Deprecated. 
run the Drupal application using the default settings


retrievePendingCommand

public java.util.List<Command> retrievePendingCommand(java.lang.String app)
Deprecated. 

prepareApp

protected void prepareApp()
Deprecated. 
Subclass can choose to run some code in order to prepare for the DrupalApp.


runCommand

protected Result runCommand(java.lang.String command)
                     throws EvaluationFailureException
Deprecated. 
Run the async command. Derived classes should handle exceptions.

Throws:
EvaluationFailureException

prepareCommand

protected void prepareCommand(int uid,
                              int eid,
                              int created,
                              java.lang.String command)
Deprecated. 

updateRecord

protected void updateRecord(int id,
                            boolean status,
                            java.lang.String message)
Deprecated. 

pingMe

public Result pingMe()
Deprecated. 

initDrupalConnection

@Deprecated
public void initDrupalConnection()
Deprecated. 


initConfig

@Deprecated
public void initConfig(java.lang.String configString)
Deprecated. 


getDefaultSettingsPhpFile

@Deprecated
protected java.io.File getDefaultSettingsPhpFile()
Deprecated. 


testConnection

@Deprecated
public void testConnection()
Deprecated. 


d

@Deprecated
protected java.lang.String d(java.lang.String sql)
Deprecated. 


query

@Deprecated
protected java.util.List<java.util.Map<java.lang.String,java.lang.Object>> query(java.lang.String sql,
                                                                                            java.lang.Object... params)
                                                                          throws java.sql.SQLException
Deprecated. 

Throws:
java.sql.SQLException

queryValue

@Deprecated
protected java.lang.Object queryValue(java.lang.String sql,
                                                 java.lang.Object... params)
                               throws java.sql.SQLException
Deprecated. 

Throws:
java.sql.SQLException

update

@Deprecated
protected int update(java.lang.String sql,
                                java.lang.Object... params)
              throws java.sql.SQLException
Deprecated. 

Throws:
java.sql.SQLException

batch

@Deprecated
protected int[] batch(java.lang.String sql,
                                 java.lang.Object[][] params)
               throws java.sql.SQLException
Deprecated. 

Throws:
java.sql.SQLException

handleCLI

public void handleCLI(java.lang.String[] args)
Deprecated. 
this function handles CLI; users of the class should call this function.

Parameters:
args - arguments from main()

run

public void run(java.lang.String[] args)
Deprecated. 
This is the same as handleCLI()

Parameters:
args -

readEncryptedSettingsField

@Deprecated
protected java.util.Properties readEncryptedSettingsField(java.lang.String value,
                                                                     AbstractDrupalApp.EncryptionMethod encryptionMethod)
Deprecated. 


readEncryptedSettingsField

@Deprecated
protected java.util.Properties readEncryptedSettingsField(java.lang.String value)
Deprecated. 


loadSettingsPhp

@Deprecated
protected void loadSettingsPhp(java.io.File settingsPhp)
                        throws java.io.IOException
Deprecated. 

Throws:
java.io.IOException

evalPhp

@Deprecated
protected java.lang.String evalPhp(java.lang.String pattern,
                                              java.lang.Object... params)
Deprecated. 


evalPhp

@Deprecated
protected java.lang.String evalPhp(java.lang.String phpCode)
Deprecated. 


getReaderContent

@Deprecated
protected java.lang.String getReaderContent(java.io.Reader input)
                                     throws java.io.IOException
Deprecated. 

Throws:
java.io.IOException

unserializePhpArray

@Deprecated
protected java.util.Map<java.lang.String,java.lang.Object> unserializePhpArray(java.lang.String serialized)
Deprecated. 


convertBlobValueToString

@Deprecated
protected java.lang.String convertBlobValueToString(java.lang.Object blobValue)
Deprecated. 


drupalVariableGet

@Deprecated
protected java.lang.Object drupalVariableGet(java.lang.String varName)
Deprecated. 


drupalVariableSet

@Deprecated
protected void drupalVariableSet(java.lang.String varName,
                                            java.lang.String varValue)
Deprecated.