| 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 org.kuali.rice.core.api.reflect.ObjectDefinition; |
| 19 | |
import org.kuali.rice.core.api.resourceloader.GlobalResourceLoader; |
| 20 | |
import org.kuali.rice.kim.bo.Person; |
| 21 | |
|
| 22 | |
|
| 23 | |
|
| 24 | |
|
| 25 | |
|
| 26 | |
|
| 27 | |
|
| 28 | |
|
| 29 | |
|
| 30 | |
|
| 31 | |
|
| 32 | |
public class LazyLoadSecurityAttribute implements SecurityAttribute { |
| 33 | |
|
| 34 | |
private static final long serialVersionUID = 8194757786570696656L; |
| 35 | |
|
| 36 | |
private String className; |
| 37 | |
private String applicationId; |
| 38 | |
|
| 39 | 0 | public LazyLoadSecurityAttribute(String className, String applicationId) { |
| 40 | 0 | this.className = className; |
| 41 | 0 | this.applicationId = applicationId; |
| 42 | 0 | } |
| 43 | |
|
| 44 | |
public Boolean docSearchAuthorized(Person currentUser, String docTypeName, |
| 45 | |
String documentId, String initiatorPrincipalId) { |
| 46 | 0 | return getSecurityAttribute().docSearchAuthorized(currentUser, docTypeName, documentId, initiatorPrincipalId); |
| 47 | |
} |
| 48 | |
|
| 49 | |
public Boolean routeLogAuthorized(Person currentUser, String docTypeName, |
| 50 | |
String documentId, String initiatorPrincipalId) { |
| 51 | 0 | return getSecurityAttribute().routeLogAuthorized(currentUser, docTypeName, documentId, initiatorPrincipalId); |
| 52 | |
} |
| 53 | |
|
| 54 | |
protected SecurityAttribute getSecurityAttribute() { |
| 55 | 0 | ObjectDefinition objDef = new ObjectDefinition(className, applicationId); |
| 56 | 0 | return (SecurityAttribute)GlobalResourceLoader.getObject(objDef); |
| 57 | |
} |
| 58 | |
|
| 59 | |
} |