1 package com.sslexplorer.jdbc; 2 3 import java.io.Serializable ; 4 5 import com.sslexplorer.realms.Realm; 6 import com.sslexplorer.security.Role; 7 8 15 public class JDBCRole implements Role<JDBCRole>, Serializable { 16 17 private final String rolename; 18 private final Realm realm; 19 20 JDBCRole(String roleName, Realm realm) { 21 this.rolename = roleName; 22 this.realm = realm; 23 } 24 25 28 public String getPrincipalName() { 29 return rolename; 30 } 31 32 35 public String toString() { 36 return getPrincipalName(); 37 } 38 39 42 public int compareTo(JDBCRole o) { 43 return getPrincipalName().compareTo(o.getPrincipalName()); 44 } 45 46 49 public Realm getRealm() { 50 return realm; 51 } 52 } | Popular Tags |