1 10 11 package org.mmbase.security.implementation.basic; 12 13 import org.mmbase.security.Rank; 14 import org.mmbase.security.BasicUser; 15 import org.mmbase.security.SecurityException; 16 17 24 public class NameContext extends BasicUser { 25 26 private String identifier = null; 27 private Rank rank = null; 28 29 public NameContext(Rank rank, String authenticationType) { 30 super(authenticationType); 31 this.rank = rank; 32 } 33 34 public String getIdentifier() { 35 if(identifier == null) { 36 throw new SecurityException ("No user name was set by the security implementation. This is required."); 37 } 38 return identifier; 39 } 40 41 public Rank getRank() { 42 if(rank == null) { 43 throw new SecurityException ("No rank was provider by the security implementation. This is required."); 44 } 45 return rank; 46 } 47 48 51 void setRank(Rank r) { 52 rank = r; 53 } 54 55 void setIdentifier(String ident) { 56 this.identifier = ident; 57 } 58 } 59 | Popular Tags |