Role.java

00001 
00027 package org.objectweb.jonas.security.realm.principals;
00028 
00029 import java.io.Serializable;
00030 
00036 public class Role implements Serializable, RoleMBean {
00037 
00041     private String name = null;
00042 
00046     private String description = null;
00047 
00051     public Role() {
00052 
00053     }
00054 
00059     public Role(String name) {
00060         setName(name);
00061     }
00062 
00067     public void setName(String name) {
00068         this.name = name;
00069     }
00070 
00075     public String getName() {
00076         return name;
00077     }
00078 
00083     public void setDescription(String description) {
00084         this.description = description;
00085     }
00086 
00091     public String getDescription() {
00092         return description;
00093     }
00094 
00099     public String toXML() {
00100         StringBuffer xml = new StringBuffer("<role name=\"");
00101         xml.append(name);
00102         xml.append("\" description=\"");
00103         if (description != null) {
00104             xml.append(description);
00105         }
00106         xml.append("\" />");
00107         return xml.toString();
00108     }
00109 
00114     public String toString() {
00115         return this.toXML();
00116     }
00117 
00118 }

Generated on Tue Feb 15 15:05:23 2005 for JOnAS by  doxygen 1.3.9.1