1 23 package com.sun.enterprise.security.acl; 24 25 import java.security.Principal ; 26 27 31 abstract public class Resource { 32 private String app; 33 private String name; 34 private String method; 35 36 protected Resource(String app, String name, String method) { 37 this.app = app; 38 this.name = name; 39 this.method = method; 40 } 41 42 public String getName() { 43 return this.name; 44 } 45 46 public String getApplication() { 47 return this.app; 48 } 49 50 public String getMethod() { 51 return this.method; 52 } 53 54 public int hashCode() { 55 return getClass().hashCode(); 56 } 57 58 public abstract boolean implies(Resource res); 59 public abstract boolean equals(Object obj); 60 61 public String toString() { 62 return getApplication() + ":" + getName() + "." + getMethod(); 63 } 64 } 65 | Popular Tags |