| 1 | |
package org.kuali.rice.krms.impl.repository |
| 2 | |
|
| 3 | |
import org.kuali.rice.kns.bo.PersistableBusinessObjectBase |
| 4 | |
|
| 5 | |
import org.kuali.rice.krms.api.repository.Action |
| 6 | |
import org.kuali.rice.krms.api.repository.ActionContract |
| 7 | |
|
| 8 | |
public class ActionBo extends PersistableBusinessObjectBase implements ActionContract { |
| 9 | |
|
| 10 | |
def String actionId; |
| 11 | |
def String namespace; |
| 12 | |
def String name; |
| 13 | |
def String description; |
| 14 | |
def String typeId; |
| 15 | |
def List<ActionAttributeBo> attributes; |
| 16 | |
|
| 17 | |
|
| 18 | |
|
| 19 | |
|
| 20 | |
|
| 21 | |
|
| 22 | |
|
| 23 | |
static Action to(ActionBo bo) { |
| 24 | 0 | if (bo == null) { return null } |
| 25 | 0 | return org.kuali.rice.krms.api.repository.Action.Builder.create(bo).build(); |
| 26 | |
} |
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
|
| 33 | |
static ActionBo from(Action im) { |
| 34 | 0 | if (im == null) { return null } |
| 35 | |
|
| 36 | 0 | ActionBo bo = new ActionBo() |
| 37 | 0 | bo.actionId = im.actionId |
| 38 | 0 | bo.namespace = im.namespace |
| 39 | 0 | bo.name = im.name |
| 40 | 0 | bo.typeId = im.typeId |
| 41 | 0 | bo.description = im.description |
| 42 | 0 | bo.attributes = new ArrayList<ActionAttributeBo>() |
| 43 | 0 | for (attr in im.attributes){ |
| 44 | 0 | bo.attributes.add (ActionAttributeBo.from(attr)) |
| 45 | |
} |
| 46 | |
|
| 47 | 0 | return bo |
| 48 | |
} |
| 49 | |
|
| 50 | |
} |