|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.drupal.project.computing.DUtils
public class DUtils
Singleton of the utilities class.
| Nested Class Summary | |
|---|---|
static class |
DUtils.Drush
This is the utility class to run drush command. |
static class |
DUtils.Php
Utility class to run PHP snippet |
static class |
DUtils.UnitTest
|
| Field Summary | |
|---|---|
java.lang.String |
VERSION
|
| Method Summary | |
|---|---|
boolean |
checkJavaVersion()
Check to make sure Java is > 1.6 |
java.lang.String |
executeShell(org.apache.commons.exec.CommandLine commandLine,
java.io.File workingDir,
java.lang.String input)
Execute a command in the working dir, and return the output as a String. |
java.lang.String |
executeShell(java.util.List<java.lang.String> command,
java.io.File workingDir)
Deprecated. |
java.lang.String |
executeShell(java.lang.String command)
|
com.google.gson.Gson |
getDefaultGson()
|
java.lang.String |
getIdentifier(java.lang.Class<?> classObject)
Get either the identifier if presented, or the class name. |
static DUtils |
getInstance()
|
java.lang.Long |
getLong(java.lang.Object value)
Get the long value from any Object, if possible. |
java.util.logging.Logger |
getPackageLogger()
|
java.util.Properties |
loadProperties(java.lang.String configString)
|
java.lang.String |
readContent(java.io.Reader input)
From the input reader and get all its content. |
java.lang.String |
toJson(java.lang.Object obj)
Encapsulate json object. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public final java.lang.String VERSION
| Method Detail |
|---|
public static DUtils getInstance()
public final java.util.logging.Logger getPackageLogger()
@Deprecated
public java.lang.String executeShell(java.util.List<java.lang.String> command,
java.io.File workingDir)
command - The list of command and parameters.workingDir - The working directory. Could be null. The it's default user.dir.
public java.lang.String executeShell(org.apache.commons.exec.CommandLine commandLine,
java.io.File workingDir,
java.lang.String input)
throws DSystemExecutionException
commandLine - The command line objectworkingDir - The working directory. Could be null. The it's default user.dir.input - Input string
DSystemExecutionException
public java.lang.String executeShell(java.lang.String command)
throws DSystemExecutionException
DSystemExecutionException
public java.lang.String readContent(java.io.Reader input)
throws java.io.IOException
input - input reader
java.io.IOExceptionpublic boolean checkJavaVersion()
public java.lang.String getIdentifier(java.lang.Class<?> classObject)
classObject -
public java.lang.Long getLong(java.lang.Object value)
value - The object that could either be null, or int, or string.
public java.lang.String toJson(java.lang.Object obj)
obj -
public com.google.gson.Gson getDefaultGson()
public java.util.Properties loadProperties(java.lang.String configString)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||