1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
package org.kuali.rice.kew.doctype; |
17 | |
|
18 | |
import java.io.Serializable; |
19 | |
import java.util.HashMap; |
20 | |
import java.util.Map; |
21 | |
|
22 | |
import org.kuali.rice.kew.api.extension.ExtensionDefinition; |
23 | |
import org.kuali.rice.kew.framework.document.security.DocumentSecurityAttribute; |
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
public class SecuritySession implements Serializable { |
34 | |
|
35 | |
private static final long serialVersionUID = 2542191040889845305L; |
36 | |
|
37 | |
private final String principalId; |
38 | 0 | private Map<String, Boolean> authenticatedWorkgroups = new HashMap<String, Boolean>(); |
39 | 0 | private Map<String, Boolean> passesRoleSecurity = new HashMap<String, Boolean>(); |
40 | 0 | private Map<String, DocumentSecurityAttribute> securityAttributeClassNameMap = new HashMap<String, DocumentSecurityAttribute>(); |
41 | 0 | private Map<String, ExtensionDefinition> extensionDefinitionMap = new HashMap<String, ExtensionDefinition>(); |
42 | |
|
43 | 0 | private Map<String, DocumentTypeSecurity> documentTypeSecurity = new HashMap<String, DocumentTypeSecurity>(); |
44 | |
|
45 | 0 | public SecuritySession(String principalId) { |
46 | 0 | this.principalId = principalId; |
47 | 0 | } |
48 | |
|
49 | |
public String getPrincipalId() { |
50 | 0 | return principalId; |
51 | |
} |
52 | |
|
53 | |
public Map<String, Boolean> getPassesRoleSecurity() { |
54 | 0 | return passesRoleSecurity; |
55 | |
} |
56 | |
|
57 | |
public void setPassesRoleSecurity(Map<String, Boolean> passesRoleSecurity) { |
58 | 0 | this.passesRoleSecurity = passesRoleSecurity; |
59 | 0 | } |
60 | |
|
61 | |
public Map<String, Boolean> getAuthenticatedWorkgroups() { |
62 | 0 | return authenticatedWorkgroups; |
63 | |
} |
64 | |
|
65 | |
public void setAuthenticatedWorkgroups(Map<String, Boolean> authenticatedWorkgroups) { |
66 | 0 | this.authenticatedWorkgroups = authenticatedWorkgroups; |
67 | 0 | } |
68 | |
|
69 | |
public Map<String, DocumentTypeSecurity> getDocumentTypeSecurity() { |
70 | 0 | return documentTypeSecurity; |
71 | |
} |
72 | |
|
73 | |
public void setDocumentTypeSecurity(Map<String, DocumentTypeSecurity> documentTypeSecurity) { |
74 | 0 | this.documentTypeSecurity = documentTypeSecurity; |
75 | 0 | } |
76 | |
|
77 | |
public DocumentSecurityAttribute getSecurityAttributeForClass(String className) { |
78 | 0 | return this.securityAttributeClassNameMap.get(className); |
79 | |
} |
80 | |
|
81 | |
public void setSecurityAttributeForClass(String className, DocumentSecurityAttribute securityAttribute) { |
82 | 0 | this.securityAttributeClassNameMap.put(className, securityAttribute); |
83 | 0 | } |
84 | |
|
85 | |
public ExtensionDefinition getExtensionByName(String extensionName) { |
86 | 0 | return extensionDefinitionMap.get(extensionName); |
87 | |
} |
88 | |
|
89 | |
public void setExtensionForName(String extensionName, ExtensionDefinition extension) { |
90 | 0 | this.extensionDefinitionMap.put(extensionName, extension); |
91 | 0 | } |
92 | |
} |