1 28 package net.sf.jguard.core.authorization.permissions; 29 30 import java.security.Permission ; 31 32 import net.sf.jguard.core.authorization.workflow.WorkflowCheckerFactory; 33 34 42 public class DSODDecorator extends Permission { 43 44 private static final long serialVersionUID = 6660070267190082422L; 45 private Permission permission = null; 46 private WorkflowCheckerFactory wcf = null; 47 48 public DSODDecorator(WorkflowCheckerFactory wcf, Permission p){ 49 super(p.getName()); 50 this.permission = p; 51 this.wcf = wcf; 52 } 53 public boolean equals(Object obj) { 54 if (obj instanceof DSODDecorator) { 55 DSODDecorator duration = (DSODDecorator) obj; 56 if(this.permission.getName().equals(duration.getName()) 57 && this.permission.getActions().equals(duration.getActions())){ 58 return true; 59 } 60 } 61 return false; 62 } 63 64 public String getActions() { 65 return permission.getActions(); 66 } 67 68 public int hashCode() { 69 return this.permission.hashCode()+wcf.hashCode(); 70 } 71 72 public boolean implies(Permission permission) { 73 return false; 75 } 76 77 } 78 | Popular Tags |