1 13 14 19 20 package org.ejbca.core.model.authorization; 21 22 import java.security.cert.X509Certificate ; 23 24 30 public class AdminInformation implements java.io.Serializable { 31 32 34 public AdminInformation(X509Certificate certificate){ 35 this.certificate=certificate; 36 this.specialuser=0; 37 } 38 39 public AdminInformation(int specialuser) { 40 this.specialuser=specialuser; 41 42 } 43 44 public AdminInformation(AdminGroup admingroup) { 45 this.specialuser=0; 46 this.admingroup= admingroup; 47 } 48 49 50 public boolean isSpecialUser() { 51 return this.specialuser!=0; 52 } 53 54 public boolean isGroupUser() { 55 return this.admingroup != null; 56 } 57 58 public X509Certificate getX509Certificate() { 59 return this.certificate; 60 } 61 62 public int getSpecialUser() { 63 return this.specialuser; 64 } 65 66 public int getGroupId(){ 67 return this.admingroup.getAdminGroupId(); 68 } 69 70 private X509Certificate certificate; 72 private int specialuser = 0; 73 private AdminGroup admingroup = null; 74 } 75 | Popular Tags |