|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.doolin.oxml.action.AbstractOXMLAction
net.sf.doolin.oxml.action.AbstractSequenceOXMLAction
net.sf.doolin.oxml.action.CreateOXMLAction
public class CreateOXMLAction
create action. This action creates an instance according to its
parameters, pushes it on the instance stack, evaluates all nested actions and
pops the instance back from the stack.
Parameters for this action are:
node - (optional) If defined, the class creation is applied
for this XPath.
class - (required if factory or
defId is not provided) Name of the instance type to create
factory - (required if class or
defId is not provided) Class name for an implementation of the
OXMLInstanceFactory interface, responsible for the
creation of the instance
defId - (required if class or
factory is not provided) ID of a createDef action
to apply.
id - (optional) If provided, the created instance will be
stored into the context using
this id.
root - (optional) If set to true, the created
instance will be set as the root of the
context. Only one action with this attribute set to true is
allowed by OXML configuration.
property - (optional) If provided, this attribute indicates
the name of the property of the current instance on the instance stack to
fill with the created instance.
setter - (optional) If provided, this attribute is the name
of a method to be called on the current instance on the instance stack with
the created instance as a unique parameter
post - (optional, defaults to false) The
property or the setter attribute is used by default
before the inner actions are evaluated. Putting this attribute to
true will perform this operation after the inner actions
have been evaluated.
| Constructor Summary | |
|---|---|
CreateOXMLAction()
|
|
| Method Summary | |
|---|---|
protected void |
collect(Object instance,
OXMLContext context)
Collects the instances |
protected void |
create(OXMLContext context)
Creates the instance |
void |
parse(Element e)
Parses each child. |
void |
process(OXMLContext context)
Processes each sub action. |
protected void |
setInParent(OXMLContext context,
Object instance)
Sets the created instance into its parent |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public CreateOXMLAction()
| Method Detail |
|---|
public void parse(Element e)
throws IOException
AbstractSequenceOXMLAction
parse in interface OXMLActionparse in class AbstractSequenceOXMLActione - Configuration element for this action.
IOException - If the element cannot be parsedOXMLAction.parse(org.w3c.dom.Element)public void process(OXMLContext context)
AbstractSequenceOXMLAction
process in interface OXMLActionprocess in class AbstractSequenceOXMLActioncontext - Execution contextOXMLAction.process(net.sf.doolin.oxml.OXMLContext)
protected void collect(Object instance,
OXMLContext context)
instance - Instance to collectcontext - OXML contextprotected void create(OXMLContext context)
context - Execution context
protected void setInParent(OXMLContext context,
Object instance)
context - Execution contextinstance - Created instance
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||