BrightSide Workbench Full Report + Source Code
org.turro.elephant.impl.abstracts.AbstractAction Class Referenceabstract
Inheritance diagram for org.turro.elephant.impl.abstracts.AbstractAction:
Collaboration diagram for org.turro.elephant.impl.abstracts.AbstractAction:

Public Member Functions

 AbstractAction ()
 
void setConstructor (IConstructor constructor)
 
IConstructor getConstructor ()
 
abstract int execute () throws Exception
 
String getContextParameter ()
 
String getIdelParameter ()
 
String getActionParameter ()
 
String getParameter (String param)
 
String getParameter (String param, boolean encode)
 
String getStringParameter (String param)
 
String getValueParameter (String param)
 
boolean getBooleanParameter (String param)
 
int getIntParameter (String param, int defaultValue)
 
double getDoubleParameter (String param, double defaultValue)
 
Date getDateParameter (String param, Date defaultValue)
 

Static Public Member Functions

static String makeDateParameter (Date date)
 
static String makeDateParameter (Timestamp date)
 
static String getValuePortion (String key, String value)
 

Protected Attributes

IConstructor constructor
 

Additional Inherited Members

- Static Public Attributes inherited from org.turro.elephant.context.IAction
static final int DONE = 0
 
static final int NO_DATA = 1
 
static final int ERROR = 2
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 30 of file elephant/impl/abstracts/AbstractAction.java.

Constructor & Destructor Documentation

◆ AbstractAction()

org.turro.elephant.impl.abstracts.AbstractAction.AbstractAction ( )

Creates a new instance of AbstractAction

Definition at line 34 of file elephant/impl/abstracts/AbstractAction.java.

34  {
35  }

Member Function Documentation

◆ execute()

abstract int org.turro.elephant.impl.abstracts.AbstractAction.execute ( ) throws Exception
abstract

◆ getActionParameter()

String org.turro.elephant.impl.abstracts.AbstractAction.getActionParameter ( )

Definition at line 57 of file elephant/impl/abstracts/AbstractAction.java.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ getBooleanParameter()

boolean org.turro.elephant.impl.abstracts.AbstractAction.getBooleanParameter ( String  param)

Definition at line 80 of file elephant/impl/abstracts/AbstractAction.java.

80  {
81  return "true".equals(getParameter(param));
82  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getConstructor()

IConstructor org.turro.elephant.impl.abstracts.AbstractAction.getConstructor ( )

Definition at line 42 of file elephant/impl/abstracts/AbstractAction.java.

42  {
43  return constructor;
44  }

◆ getContextParameter()

String org.turro.elephant.impl.abstracts.AbstractAction.getContextParameter ( )

Definition at line 49 of file elephant/impl/abstracts/AbstractAction.java.

49  {
51  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getDateParameter()

Date org.turro.elephant.impl.abstracts.AbstractAction.getDateParameter ( String  param,
Date  defaultValue 
)

Definition at line 104 of file elephant/impl/abstracts/AbstractAction.java.

104  {
105  Date d = (Date) ObjectString.parseString(getParameter(param), ObjectString.COMPRESSED_DATE_PATTERN, Date.class, false);
106  if(d == null) {
107  return defaultValue;
108  }
109  else {
110  return d;
111  }
112  }
Here is the call graph for this function:

◆ getDoubleParameter()

double org.turro.elephant.impl.abstracts.AbstractAction.getDoubleParameter ( String  param,
double  defaultValue 
)

Definition at line 94 of file elephant/impl/abstracts/AbstractAction.java.

94  {
95  Double d = (Double) ObjectString.parseNativeString(getParameter(param), Double.class, false);
96  if(d == null) {
97  return defaultValue;
98  }
99  else {
100  return d.doubleValue();
101  }
102  }
Here is the call graph for this function:

◆ getIdelParameter()

String org.turro.elephant.impl.abstracts.AbstractAction.getIdelParameter ( )

Definition at line 53 of file elephant/impl/abstracts/AbstractAction.java.

53  {
55  }
Here is the call graph for this function:

◆ getIntParameter()

int org.turro.elephant.impl.abstracts.AbstractAction.getIntParameter ( String  param,
int  defaultValue 
)

Definition at line 84 of file elephant/impl/abstracts/AbstractAction.java.

84  {
85  Integer i = (Integer) ObjectString.parseNativeString(getParameter(param), Integer.class, false);
86  if(i == null) {
87  return defaultValue;
88  }
89  else {
90  return i.intValue();
91  }
92  }
Here is the call graph for this function:
Here is the caller graph for this function:

◆ getParameter() [1/2]

String org.turro.elephant.impl.abstracts.AbstractAction.getParameter ( String  param)

Implements org.turro.elephant.context.IAction.

Definition at line 62 of file elephant/impl/abstracts/AbstractAction.java.

62  {
63  return getParameter(param, false);
64  }
Here is the caller graph for this function:

◆ getParameter() [2/2]

String org.turro.elephant.impl.abstracts.AbstractAction.getParameter ( String  param,
boolean  encode 
)

Definition at line 66 of file elephant/impl/abstracts/AbstractAction.java.

66  {
67  return constructor.getParameter(param, encode);
68  }
Here is the call graph for this function:

◆ getStringParameter()

String org.turro.elephant.impl.abstracts.AbstractAction.getStringParameter ( String  param)

Definition at line 70 of file elephant/impl/abstracts/AbstractAction.java.

70  {
71  String value = getParameter(param);
72  if(value == null) return "";
73  return value;
74  }
Here is the call graph for this function:

◆ getValueParameter()

String org.turro.elephant.impl.abstracts.AbstractAction.getValueParameter ( String  param)

Definition at line 76 of file elephant/impl/abstracts/AbstractAction.java.

76  {
77  return getValuePortion(null, getParameter(param));
78  }
Here is the call graph for this function:

◆ getValuePortion()

static String org.turro.elephant.impl.abstracts.AbstractAction.getValuePortion ( String  key,
String  value 
)
static

Definition at line 122 of file elephant/impl/abstracts/AbstractAction.java.

122  {
123  if(value != null && value.indexOf(":") > -1) {
124  String parts[] = value.split("\\:");
125  if(key == null || key.equals(parts[0])) {
126  return parts[1];
127  }
128  }
129  return value;
130  }
Here is the caller graph for this function:

◆ makeDateParameter() [1/2]

static String org.turro.elephant.impl.abstracts.AbstractAction.makeDateParameter ( Date  date)
static

Definition at line 114 of file elephant/impl/abstracts/AbstractAction.java.

114  {
115  return ObjectString.formatObject(date, ObjectString.COMPRESSED_DATE_PATTERN, false);
116  }
Here is the caller graph for this function:

◆ makeDateParameter() [2/2]

static String org.turro.elephant.impl.abstracts.AbstractAction.makeDateParameter ( Timestamp  date)
static

Definition at line 118 of file elephant/impl/abstracts/AbstractAction.java.

118  {
119  return makeDateParameter((Date)date);
120  }
Here is the call graph for this function:

◆ setConstructor()

void org.turro.elephant.impl.abstracts.AbstractAction.setConstructor ( IConstructor  constructor)

This method is called within ContextFactory.

Parameters
constructorIConstructor that created the action.

Implements org.turro.elephant.context.IAction.

Definition at line 38 of file elephant/impl/abstracts/AbstractAction.java.

38  {
39  this.constructor = constructor;
40  }

Member Data Documentation

◆ constructor

IConstructor org.turro.elephant.impl.abstracts.AbstractAction.constructor
protected

Definition at line 31 of file elephant/impl/abstracts/AbstractAction.java.


The documentation for this class was generated from the following file: