|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectutil.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.util.UserProperty
public class UserProperty
A class to facilitate user properties on a telescope. It is a convenience class to allow simple properties retrieval.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class util.PropertyResources |
|---|
PropertyResources.URLResource |
| Nested classes/interfaces inherited from interface stella.util.UserProfile |
|---|
UserProfile.Affil, UserProfile.Notifies |
| Field Summary | |
|---|---|
private Collection<javax.mail.internet.InternetAddress> |
address
The list of e-mail addresses. |
private List<UserProfile.Affil> |
affils
The list of allowed affiliations. |
private static Color |
DEFCOLOR
The default color. |
private static String |
DEFINSTITUTION
The default user institution. |
private static String |
DEFNOTIFY
The default user-notification. |
static String |
KEY_COLOR
The preferred color for various display purposes. |
static String |
KEY_EMAIL
The e-mail addresses of the user, as a comma-separated list. |
static String |
KEY_INSTITUTION
The institution observing time is accounted to. |
static String |
KEY_NOTIFY
The notification preferences for the user, as a comma-list. |
static String |
KEY_USER
The user this properties are bound to. |
private UserProfile.Affil |
mainaffil
The default affiliation (first in list or explicedly set). |
private Collection<UserProfile.Notifies> |
notify
The list of notification events. |
| Fields inherited from class util.PropertyBundles |
|---|
KEY_LOCALECOUNTRY, KEY_LOCALELANGUAGE, KEY_RESOURCEBUNDLES |
| Fields inherited from class util.PropertyResources |
|---|
KEY_NOINITONCREATE, localurl, locate, POSTFIX_DIR, POSTFIX_EXT, POSTFIX_FILE, POSTFIX_LIST, POSTFIX_URL, urlset |
| Fields inherited from class util.PropertyContainer |
|---|
KEY_LISTSEPARATOR, KEY_MAPKEYVALUECHAR, KEY_MAPSEPARATOR |
| Fields inherited from interface stella.util.UserProfile |
|---|
AFFILCOLOR, SYSTEM |
| Fields inherited from interface util.ResourceSupplying |
|---|
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME |
| Fields inherited from interface util.PropertySupplying |
|---|
CONFIG, KEY_CLASS |
| Constructor Summary | |
|---|---|
UserProperty(Map<String,String> prop)
Creates a new user-preferences helper. |
|
| Method Summary | |
|---|---|
List<UserProfile.Affil> |
getAllowedInstitutions()
Returns all allowed billing institutions for this user. |
Color |
getColor()
Retunrs the user color. |
Collection<? extends javax.mail.Address> |
getEmail()
Returns the e-mail list. |
UserProfile.Affil |
getInstitution()
Returns the institution. |
PublicKey |
getKey()
Return null. |
Collection<UserProfile.Notifies> |
getNotify()
Returns the notification list. |
PasswordAuthentication |
getPassword()
Return null. |
String |
getUser()
Returns the user name. |
void |
init()
Checks if the user name and the e-mail address is set. |
boolean |
setInstitution(UserProfile.Affil allowed)
Tries to set a new affiliation, which is only allowed if the new affiliation is part of the KEY_INSTITUTION list. |
String |
toString()
Returns a string description. |
| Methods inherited from class util.PropertyBundles |
|---|
clone, getLocalized, getLocalized, getLocalizedString, getLocalizedString, loadResource |
| Methods inherited from class util.PropertyResources |
|---|
createFrom, createFrom, createFrom, getApplet, getAsResources, getLocalClassLoader, getPropertiesToKey, getPropertiesToKey, getResource, getResourceAsStream, getResourceFromKey, getResources, keyCreate, keyCreate, reload, setApplet |
| Methods inherited from class util.PropertyContainer |
|---|
augment, augment, augment, defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsEnums, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, isNew, parseObject, reload, removeProperty, rescanned, setObject, setProperties, setProperty, stringProperties |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface util.ResourceSupplying |
|---|
getResource, getResourceAsStream, getResources |
| Methods inherited from interface util.PropertySupplying |
|---|
defaultBoolean, defaultChar, defaultDouble, defaultFloat, defaultInt, defaultLong, defaultObject, defaultObject, defaultProperties, defaultProperty, getAsBoolean, getAsChar, getAsDouble, getAsFloat, getAsInt, getAsList, getAsLong, getAsMap, getAsObject, getAsObject, getProperties, getProperty, has, parseObject, removeProperty, setObject, setProperty, stringProperties |
| Field Detail |
|---|
public static final String KEY_USER
public static final String KEY_INSTITUTION
public static final String KEY_EMAIL
public static final String KEY_NOTIFY
public static final String KEY_COLOR
private static final String DEFINSTITUTION
private static final String DEFNOTIFY
private static final Color DEFCOLOR
private Collection<javax.mail.internet.InternetAddress> address
private Collection<UserProfile.Notifies> notify
private List<UserProfile.Affil> affils
private UserProfile.Affil mainaffil
| Constructor Detail |
|---|
public UserProperty(Map<String,String> prop)
| Method Detail |
|---|
public void init()
init in interface Initializableinit in class PropertyResourcespublic String getUser()
getUser in interface UserProfilepublic UserProfile.Affil getInstitution()
getInstitution in interface UserProfilepublic List<UserProfile.Affil> getAllowedInstitutions()
UserProfile
getAllowedInstitutions in interface UserProfilepublic boolean setInstitution(UserProfile.Affil allowed)
KEY_INSTITUTION list.
setInstitution in interface UserProfilepublic Collection<? extends javax.mail.Address> getEmail()
getEmail in interface UserProfilepublic Collection<UserProfile.Notifies> getNotify()
getNotify in interface UserProfilepublic Color getColor()
getColor in interface UserProfilepublic String toString()
toString in class PropertyContainerpublic PublicKey getKey()
getKey in interface UserProfilepublic PasswordAuthentication getPassword()
getPassword in interface UserProfile
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||