1 23 package com.sun.enterprise.deployment; 24 25 import com.sun.enterprise.deployment.web.SecurityRole; 26 import com.sun.enterprise.deployment.Role; 27 28 33 public class SecurityRoleDescriptor extends Descriptor implements SecurityRole { 34 35 38 public SecurityRoleDescriptor(String name, String description) { 39 super(name, description); 40 } 41 42 45 46 public SecurityRoleDescriptor(Role role) { 47 super(role.getName(), role.getDescription()); 48 } 49 50 53 public SecurityRoleDescriptor() { 54 } 55 56 59 60 public boolean equals(Object other) { 61 if (other instanceof SecurityRoleDescriptor && 62 this.getName().equals( ((SecurityRoleDescriptor) other).getName() )) { 63 return true; 64 } 65 return false; 66 } 67 68 71 72 public int hashCode() { 73 return this.getName().hashCode(); 74 } 75 76 79 public void print(StringBuffer toStringBuffer) { 80 toStringBuffer.append("SecurityRole "); 81 super.print(toStringBuffer); 82 } 83 84 } 85 | Popular Tags |