]>
git.argeo.org Git - gpl/argeo-slc.git/blob - legacy/org.argeo.slc.spring/src/org/argeo/slc/core/execution/generator/DefaultRunnableDataNode.java
cd0eaefe662b0a586d4ade32948b7b8452bb0876
1 package org
.argeo
.slc
.core
.execution
.generator
;
3 import java
.util
.ArrayList
;
4 import java
.util
.HashMap
;
9 * Default implementation of <code>RunnableDataNode</code>
12 public class DefaultRunnableDataNode
implements RunnableDataNode
{
14 private List
<RunnableDataNode
> children
= new ArrayList
<RunnableDataNode
>();
16 private RunnableDataNode parent
;
19 * Data of the RunnableDataNode. Does not contain
22 private Map
<String
, Object
> properData
= new HashMap
<String
, Object
>();
26 private String beanName
;
28 public boolean isLeaf() {
29 return children
.size() == 0;
32 public List
<RunnableDataNode
> getChildren() {
36 public void addChild(RunnableDataNode child
) {
37 child
.setParent(this);
41 public Map
<String
, Object
> getData() {
42 Map
<String
, Object
> data
= new HashMap
<String
, Object
>();
44 Map
<String
, Object
> parentData
= parent
.getData();
45 if(parentData
!= null) {
46 data
.putAll(parentData
);
49 // entries defined in parentData can be overridden
51 if(properData
!= null) {
52 data
.putAll(properData
);
57 public Map
<String
, Object
> getProperData() {
61 public void setProperData(Map
<String
, Object
> properData
) {
62 this.properData
= properData
;
65 public String
getPath() {
69 public void setPath(String path
) {
73 public String
getBeanName() {
77 public void setBeanName(String beanName
) {
78 this.beanName
= beanName
;
81 public void setParent(RunnableDataNode parent
) {
85 public RunnableDataNode
getParent() {