1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.rice.kew.rule;
17
18 import java.util.ArrayList;
19 import java.util.List;
20
21 import org.kuali.rice.kew.api.rule.RoleName;
22 import org.kuali.rice.kew.identity.Id;
23 import org.kuali.rice.kew.identity.PrincipalName;
24
25
26
27
28
29
30
31
32
33 public class NetworkIdRoleAttribute extends AbstractIdRoleAttribute {
34
35 private static final long serialVersionUID = 8784036641718163820L;
36
37 private static final String NETWORK_ID_ROLE_NAME = "networkId";
38 private static final String ATTRIBUTE_ELEMENT = "NetworkIdRoleAttribute";
39 private static final String NETWORK_ID_ELEMENT = "networkId";
40
41 public List<RoleName> getRoleNames() {
42 List<RoleName> roleNames = new ArrayList<RoleName>();
43 roleNames.add(new RoleName(getClass().getName(), NETWORK_ID_ROLE_NAME, "Network ID"));
44 return roleNames;
45 }
46
47 protected String getAttributeElementName() {
48 return ATTRIBUTE_ELEMENT;
49 }
50
51 protected Id resolveId(String id) {
52 return id == null ? null : new PrincipalName(id);
53 }
54
55 protected String getIdName() {
56 return NETWORK_ID_ELEMENT;
57 }
58
59 public String getNetworkId() {
60 return getIdValue();
61 }
62
63 public void setNetworkId(String networkId) {
64 setIdValue(networkId);
65 }
66
67 }