|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.drupal.project.computing.DSite
org.drupal.project.computing.DDrushSite
public class DDrushSite
The Drupal instance that can be accessed locally through drush. Meaning that settings.php is accessible and Drush is executable to execute any drupal script.
Nested Class Summary | |
---|---|
static class |
DDrushSite.UnitTest
|
Field Summary |
---|
Fields inherited from class org.drupal.project.computing.DSite |
---|
logger |
Constructor Summary | |
---|---|
DDrushSite()
|
|
DDrushSite(java.lang.String drushExec)
|
Method Summary | |
---|---|
boolean |
checkConnection()
Check whether connection to Drupal site is established. |
DDatabase |
getDatabase()
each Drush site would be able to return a database connection. |
java.lang.String |
getDrupalVersion()
|
DUtils.Drush |
getDrush()
|
long |
getTimestamp()
|
DRecord |
loadRecord(long id)
Load one record according to its ID. |
java.util.List<DRecord> |
queryActiveRecords(java.lang.String appName)
Active records are those without a "status" code. |
long |
saveRecord(DRecord record)
Save the new record in the database using the data in the parameter. |
void |
updateRecord(DRecord record)
Save the updated record in the database. |
void |
updateRecordField(DRecord record,
java.lang.String fieldName)
Update only the specified field of the record. |
java.lang.Object |
variableGet(java.lang.String name,
java.lang.Object defaultValue)
Execute Drupal API "variable_get()" |
void |
variableSet(java.lang.String name,
java.lang.Object value)
Execute Drupal API "variable_set()" |
Methods inherited from class org.drupal.project.computing.DSite |
---|
getNextRecord |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DDrushSite(java.lang.String drushExec)
public DDrushSite()
Method Detail |
---|
public DDatabase getDatabase() throws DConnectionException
DConnectionException
public DUtils.Drush getDrush()
public java.lang.String getDrupalVersion() throws DConnectionException
getDrupalVersion
in class DSite
DConnectionException
public java.lang.Object variableGet(java.lang.String name, java.lang.Object defaultValue) throws DConnectionException
DSite
variableGet
in class DSite
DConnectionException
public void variableSet(java.lang.String name, java.lang.Object value) throws DConnectionException
DSite
variableSet
in class DSite
DConnectionException
public long getTimestamp() throws DConnectionException
getTimestamp
in class DSite
DConnectionException
public java.util.List<DRecord> queryActiveRecords(java.lang.String appName) throws DConnectionException
DSite
queryActiveRecords
in class DSite
DConnectionException
public void updateRecord(DRecord record) throws DConnectionException
DSite
updateRecord
in class DSite
DConnectionException
public void updateRecordField(DRecord record, java.lang.String fieldName) throws DConnectionException
DSite
updateRecordField
in class DSite
DConnectionException
public long saveRecord(DRecord record) throws DConnectionException
DSite
saveRecord
in class DSite
record
- The newly created record. record.isSave() has too be true.
DConnectionException
public DRecord loadRecord(long id) throws DConnectionException
DSite
loadRecord
in class DSite
DConnectionException
public boolean checkConnection()
DSite
checkConnection
in class DSite
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |