stella.parameter
Class TargetInstitution

java.lang.Object
  extended by util.PropertyContainer
      extended by util.PropertyResources
          extended by util.PropertyBundles
              extended by stella.parameter.AbstractParameter
                  extended by stella.parameter.WatchController
                      extended by stella.parameter.TargetInstitution
All Implemented Interfaces:
Cloneable, Parameter, AfterRegistering, ParameterDepending, TargetDepending, TargetDependingParameter, ExitCleaning, Initializable, LocalizedSupplying, PropertySupplying, Reloadable, ResourceSupplying

public class TargetInstitution
extends WatchController
implements TargetDependingParameter, Reloadable

A parameter that assumes the user name of the current target. Additionally, all the user RollOverWatches are served within this parameter via its WatchController properties. Whenever a target is registered to this parameter, all the running RollOverWatches are stopped and those whose name start with the user name of the new target registered augmented with UserShare#SHARECURRENT are started.


Nested Class Summary
 
Nested classes/interfaces inherited from class stella.parameter.WatchController
WatchController.ResetTask
 
Nested classes/interfaces inherited from class util.PropertyResources
PropertyResources.URLResource
 
Field Summary
static String DEFNAME
          The name of this parameter.
private  String user
          The user name of the target registered to this parameter.
 
Fields inherited from class stella.parameter.WatchController
KEY_ACCEPT, KEY_COARSE, KEY_DATEFORMAT, KEY_T0
 
Fields inherited from class stella.parameter.AbstractParameter
KEY_FORMAT, KEY_NAME, KEY_PRESERVE, UNKNOWN
 
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 util.PropertySupplying
CONFIG, KEY_CLASS
 
Fields inherited from interface util.ResourceSupplying
KEY_URLRESOURCES, KEY_URLUSECONFIG, KEY_URLUSECURRENT, KEY_URLUSEHOME
 
Constructor Summary
TargetInstitution(Map prop)
          Constructs a new target user parameter.
 
Method Summary
 Object get()
          Gets the user name of the target currently requested.
 String getFormattedFor(TargetDefinition td)
          Deviates the formatting to the protected version in AbstractParameter.
 Object getForTarget(TargetDefinition target)
          Returns the institution out of the target description.
 void registerTarget(TargetDefinition target)
          Registers this target to the target user parameter.
 double rescanned(String key, String old, String newval)
          Makes this method public, no further changes.
 Object set(Object newuser)
          Sets a new user name.
 
Methods inherited from class stella.parameter.WatchController
afterAll, getWatches, registerParameter
 
Methods inherited from class stella.parameter.AbstractParameter
createParameter, delivers, exit, getFormatted, getFormatted, getName, getPreserveFile, getString, getString, init, register, setName, toString
 
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, setObject, setProperties, setProperty, stringProperties
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface stella.Parameter
getFormatted, getName, getString
 
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
 
Methods inherited from interface util.Initializable
init
 
Methods inherited from interface util.Reloadable
reload
 
Methods inherited from interface util.ResourceSupplying
getResource, getResourceAsStream, getResources
 

Field Detail

DEFNAME

public static final String DEFNAME
The name of this parameter.

See Also:
Constant Field Values

user

private String user
The user name of the target registered to this parameter.

Constructor Detail

TargetInstitution

public TargetInstitution(Map prop)
Constructs a new target user parameter.

Method Detail

rescanned

public double rescanned(String key,
                        String old,
                        String newval)
Makes this method public, no further changes.

Specified by:
rescanned in interface Reloadable
Overrides:
rescanned in class WatchController

set

public Object set(Object newuser)
Sets a new user name. additionally roams through the RollOverWatches registered to this object and stops all those starting with the old user name and start all those whose name start with the new user name, in both cases augmented with UserShare.CURRENT.

Specified by:
set in interface Parameter
Returns:
The old user name as a string

get

public Object get()
Gets the user name of the target currently requested.

Specified by:
get in interface Parameter

getForTarget

public Object getForTarget(TargetDefinition target)
Returns the institution out of the target description. Calls TargetDefinition.getInstitution(). If this call returns null, the user name is looked up in the properties if an entry is found matching the user name to an institution (e.g. 'Strassmeier'->'AIP'). If no match can be found, the user name is returned.

Specified by:
getForTarget in interface TargetDependingParameter

getFormattedFor

public String getFormattedFor(TargetDefinition td)
Deviates the formatting to the protected version in AbstractParameter.

Specified by:
getFormattedFor in interface TargetDependingParameter

registerTarget

public void registerTarget(TargetDefinition target)
Registers this target to the target user parameter. Aditionally starts all roll-over watches asociated with the user name and stops all watches that were asociated with the former name.

Specified by:
registerTarget in interface TargetDepending