mirror of
https://git.victorphan.net/basketballcantho/Teedy_custom.git
synced 2026-08-05 14:03:10 +07:00
Initial commit
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
package com.sismics.security;
|
||||
|
||||
import java.util.Locale;
|
||||
|
||||
import org.joda.time.DateTimeZone;
|
||||
|
||||
/**
|
||||
* Anonymous principal.
|
||||
*
|
||||
* @author jtremeaux
|
||||
*/
|
||||
public class AnonymousPrincipal implements IPrincipal {
|
||||
public static final String ANONYMOUS = "anonymous";
|
||||
|
||||
/**
|
||||
* User locale.
|
||||
*/
|
||||
private Locale locale;
|
||||
|
||||
/**
|
||||
* User timezone.
|
||||
*/
|
||||
private DateTimeZone dateTimeZone;
|
||||
|
||||
/**
|
||||
* Constructor of AnonymousPrincipal.
|
||||
*/
|
||||
public AnonymousPrincipal() {
|
||||
// NOP
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getId() {
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getName() {
|
||||
return ANONYMOUS;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAnonymous() {
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Locale getLocale() {
|
||||
return locale;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter of locale.
|
||||
*
|
||||
* @param locale locale
|
||||
*/
|
||||
public void setLocale(Locale locale) {
|
||||
this.locale = locale;
|
||||
}
|
||||
|
||||
@Override
|
||||
public DateTimeZone getDateTimeZone() {
|
||||
return dateTimeZone;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getEmail() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Setter of dateTimeZone.
|
||||
*
|
||||
* @param dateTimeZone dateTimeZone
|
||||
*/
|
||||
public void setDateTimeZone(DateTimeZone dateTimeZone) {
|
||||
this.dateTimeZone = dateTimeZone;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user