1 16 19 20 21 package org.apache.pluto.portalImpl.om.common.impl; 22 23 import java.util.Collection ; 24 import java.util.Locale ; 25 26 import org.apache.pluto.om.common.Description; 27 import org.apache.pluto.om.common.DescriptionSet; 28 import org.apache.pluto.om.common.SecurityRoleRef; 29 import org.apache.pluto.util.StringUtils; 30 31 public class SecurityRoleRefImpl implements SecurityRoleRef, java.io.Serializable 32 { 33 34 private String roleName; 35 private String roleLink; 36 private DescriptionSet descriptions; 37 38 public SecurityRoleRefImpl() 39 { 40 descriptions = new org.apache.pluto.portalImpl.om.common.impl.DescriptionSetImpl(); 41 } 42 43 45 public String getRoleName() 46 { 47 return roleName; 48 } 49 50 public String getRoleLink() 51 { 52 return roleLink; 53 } 54 55 58 public Description getDescription(Locale locale) 59 { 60 return descriptions.get(locale); 61 } 62 63 64 public void setRoleName(String roleName) 65 { 66 this.roleName = roleName; 67 } 68 69 71 public void setRoleLink(String roleLink) 72 { 73 this.roleLink = roleLink; 74 } 75 76 public DescriptionSet getDescriptionSet() 77 { 78 return descriptions; 79 } 80 81 public void setDescriptionSet(DescriptionSet descriptions) 82 { 83 this.descriptions = descriptions; 84 } 85 86 public String toString() 87 { 88 return toString(0); 89 } 90 91 public String toString(int indent) 92 { 93 StringBuffer buffer = new StringBuffer (50); 94 StringUtils.newLine(buffer,indent); 95 buffer.append(getClass().toString()); 96 buffer.append(": role-name='"); 97 buffer.append(roleName); 98 buffer.append("', role-link='"); 99 buffer.append(roleLink); 100 buffer.append("'"); 101 StringUtils.newLine(buffer,indent); 102 buffer.append(((DescriptionSetImpl)descriptions).toString(indent)); 103 return buffer.toString(); 104 } 105 106 public Collection getCastorDescriptions() 107 { 108 return(DescriptionSetImpl)descriptions; 109 } 110 111 public void setCastorDescriptions(DescriptionSet castorDescriptions) 112 { 113 this.descriptions = castorDescriptions; 114 } 115 116 117 } 118 | Popular Tags |