1 19 20 package com.sslexplorer.notification; 21 22 public class Recipient implements Comparable { 23 public static final int EOF = 0; 24 25 public static final int ADMINS = 1; 26 27 public static final int USER = 2; 28 29 public static final int ROLE = 3; 30 31 public static final int POLICY = 4; 32 33 private int recipientType; 34 private String recipientAlias; 35 private String realmName; 36 37 42 public Recipient(int recipientType, String recipientAlias, String realmName) { 43 this.recipientType = recipientType; 44 this.recipientAlias = recipientAlias; 45 this.realmName = realmName; 46 } 47 48 51 public String getRecipientAlias() { 52 return recipientAlias; 53 } 54 57 public void setRecipientAlias(String recipientAlias) { 58 this.recipientAlias = recipientAlias; 59 } 60 63 public int getRecipientType() { 64 return recipientType; 65 } 66 69 public void setRecipientType(int recipientType) { 70 this.recipientType = recipientType; 71 } 72 73 public int compareTo(Object arg0) { 74 Recipient r = (Recipient)arg0; 75 int c = new Integer (recipientType).compareTo(new Integer (r.getRecipientType())); 76 return c == 0 ? recipientAlias.compareTo(r.getRecipientAlias()) : c; 77 } 78 79 82 public String getRealmName() { 83 return realmName; 84 } 85 86 89 public void setRealmName(String realmName) { 90 this.realmName = realmName; 91 } 92 93 } 94 | Popular Tags |