1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kim.bo.types.dto; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.util.ArrayList; |
20 | |
import java.util.List; |
21 | |
|
22 | |
import org.apache.commons.lang.StringUtils; |
23 | |
import org.kuali.rice.kim.bo.KimType; |
24 | |
import org.kuali.rice.kns.bo.TransientBusinessObjectBase; |
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
public class KimTypeInfo extends TransientBusinessObjectBase implements KimType, Serializable { |
30 | |
|
31 | |
private static final long serialVersionUID = 4229466320569714756L; |
32 | |
|
33 | |
protected String kimTypeId; |
34 | |
protected String name; |
35 | |
protected String namespaceCode; |
36 | |
protected String kimTypeServiceName; |
37 | |
|
38 | |
protected List<KimTypeAttributeInfo> attributeDefinitions; |
39 | |
|
40 | 0 | public KimTypeInfo() { |
41 | 0 | attributeDefinitions = new ArrayList<KimTypeAttributeInfo> (); |
42 | 0 | } |
43 | |
|
44 | |
public List<KimTypeAttributeInfo> getAttributeDefinitions() { |
45 | 0 | return attributeDefinitions; |
46 | |
} |
47 | |
|
48 | |
public String getKimTypeId() { |
49 | 0 | return kimTypeId; |
50 | |
} |
51 | |
|
52 | |
public String getKimTypeServiceName() { |
53 | 0 | return kimTypeServiceName; |
54 | |
} |
55 | |
|
56 | |
public String getName() { |
57 | 0 | return name; |
58 | |
} |
59 | |
|
60 | |
public void setAttributeDefinitions(List<KimTypeAttributeInfo> attributeDefinitions) { |
61 | 0 | this.attributeDefinitions = attributeDefinitions; |
62 | 0 | } |
63 | |
|
64 | |
public KimTypeAttributeInfo getAttributeDefinition( String kimAttributeId ) { |
65 | 0 | if ( kimAttributeId == null || attributeDefinitions == null ) { |
66 | 0 | return null; |
67 | |
} |
68 | 0 | for ( KimTypeAttributeInfo def : attributeDefinitions ) { |
69 | 0 | if ( def.kimAttributeId.equals( kimAttributeId ) ) { |
70 | 0 | return def; |
71 | |
} |
72 | |
} |
73 | 0 | return null; |
74 | |
} |
75 | |
|
76 | |
public KimTypeAttributeInfo getAttributeDefinitionByName( String attributeName ) { |
77 | 0 | if ( attributeName == null || attributeDefinitions == null ) { |
78 | 0 | return null; |
79 | |
} |
80 | 0 | for ( KimTypeAttributeInfo def : attributeDefinitions ) { |
81 | 0 | if ( StringUtils.equals(def.attributeName, attributeName) ) { |
82 | 0 | return def; |
83 | |
} |
84 | |
} |
85 | 0 | return null; |
86 | |
} |
87 | |
|
88 | |
public void setKimTypeServiceName(String kimTypeServiceName) { |
89 | 0 | this.kimTypeServiceName = kimTypeServiceName; |
90 | 0 | } |
91 | |
|
92 | |
public void setName(String name) { |
93 | 0 | this.name = name; |
94 | 0 | } |
95 | |
|
96 | |
public String getNamespaceCode() { |
97 | 0 | return this.namespaceCode; |
98 | |
} |
99 | |
|
100 | |
public void setNamespaceCode(String namespaceCode) { |
101 | 0 | this.namespaceCode = namespaceCode; |
102 | 0 | } |
103 | |
|
104 | |
public void setKimTypeId(String kimTypeId) { |
105 | 0 | this.kimTypeId = kimTypeId; |
106 | 0 | } |
107 | |
} |