1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.impl.peopleflow |
17 | |
|
18 | |
import org.kuali.rice.kew.impl.type.KewAttributeDefinitionBo |
19 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
20 | |
import org.kuali.rice.kew.api.repository.type.KewTypeAttribute |
21 | |
import org.kuali.rice.kew.api.repository.type.KewAttributeDefinition |
22 | |
|
23 | |
class PeopleFlowAttributeBo extends PersistableBusinessObjectBase { |
24 | |
|
25 | |
String id |
26 | |
String attributeDefinitionId |
27 | |
String value |
28 | |
String peopleFlowId |
29 | |
|
30 | |
def KewAttributeDefinitionBo attributeDefinition |
31 | |
|
32 | |
public void setAttributeDefinition(KewAttributeDefinitionBo attrDef) { |
33 | 0 | if (attrDef != null) { |
34 | 0 | this.attributeDefinitionId = attrDef.getId(); |
35 | |
} else { |
36 | 0 | this.attributeDefinitionId = null; |
37 | |
} |
38 | 0 | this.attributeDefinition = attrDef; |
39 | |
} |
40 | |
|
41 | |
public static PeopleFlowAttributeBo from(KewAttributeDefinition attributeDefinition, String id, String peopleFlowId, String value) { |
42 | 0 | if (attributeDefinition == null) { |
43 | 0 | return null; |
44 | |
} |
45 | 0 | PeopleFlowAttributeBo peopleFlowAttributeBo = new PeopleFlowAttributeBo(); |
46 | 0 | peopleFlowAttributeBo.setId(id); |
47 | 0 | peopleFlowAttributeBo.setPeopleFlowId(peopleFlowId); |
48 | 0 | peopleFlowAttributeBo.setValue(value); |
49 | 0 | peopleFlowAttributeBo.setAttributeDefinition(KewAttributeDefinitionBo.from(attributeDefinition)); |
50 | 0 | peopleFlowAttributeBo.setAttributeDefinitionId(attributeDefinition.getId()); |
51 | 0 | return peopleFlowAttributeBo; |
52 | |
} |
53 | |
|
54 | |
} |