1 | |
package org.kuali.rice.krms.impl.repository |
2 | |
|
3 | |
import org.apache.commons.lang.StringUtils; |
4 | |
|
5 | |
|
6 | |
import org.kuali.rice.krad.bo.PersistableBusinessObjectBase |
7 | |
|
8 | |
import org.kuali.rice.krms.api.repository.term.TermResolverDefinition; |
9 | |
|
10 | |
|
11 | |
public class TermResolverParameterSpecificationBo extends PersistableBusinessObjectBase { |
12 | |
|
13 | |
def String id |
14 | |
def String termResolverId |
15 | |
def String name |
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
static String to(TermResolverParameterSpecificationBo bo) { |
23 | 0 | if (bo == null) { return null } |
24 | 0 | return bo.name; |
25 | |
} |
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
static TermResolverParameterSpecificationBo from(TermResolverDefinition resolver, String name) { |
33 | 0 | if (resolver == null) { return null } |
34 | 0 | if (StringUtils.isBlank(name)) { return null } |
35 | |
|
36 | 0 | TermResolverParameterSpecificationBo bo = new TermResolverParameterSpecificationBo() |
37 | 0 | bo.termResolverId = resolver.id; |
38 | 0 | bo.name = name; |
39 | |
|
40 | 0 | return bo |
41 | |
} |
42 | |
|
43 | |
} |