1 23 24 package com.sun.enterprise.deployment.runtime.common; 25 26 import com.sun.enterprise.deployment.runtime.RuntimeDescriptor; 27 import java.util.ArrayList ; 28 import java.util.List ; 29 30 41 public class SecurityRoleMapping extends RuntimeDescriptor { 42 43 private String roleName = null; private List <PrincipalNameDescriptor> principals = 45 new ArrayList <PrincipalNameDescriptor>(); 46 private List <String > groups = new ArrayList <String >(); 47 48 public String getRoleName() { 49 return roleName; 50 } 51 52 public void setRoleName(String name) { 53 roleName = name; 54 } 55 56 public List <PrincipalNameDescriptor> getPrincipalNames() { 57 return principals; 58 } 59 60 public void addPrincipalName(PrincipalNameDescriptor p) { 61 principals.add(p); 62 } 63 64 public List <String > getGroupNames() { 65 return groups; 66 } 67 68 public void addGroupName(String g) { 69 groups.add(g); 70 } 71 72 79 public String [] getPrincipalName() { 80 String [] names = new String [principals.size()]; 81 for (int i = 0; i < principals.size(); i++) { 82 names[i] = new String (principals.get(i).getName()); 83 } 84 return names; 85 } 86 } 87 | Popular Tags |