stella.parameter
Class TargetInstitution
java.lang.Object
util.PropertyContainer
util.PropertyResources
util.PropertyBundles
stella.parameter.AbstractParameter
stella.parameter.WatchController
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.
|
Field Summary |
static String |
DEFNAME
The name of this parameter. |
private String |
user
The user name of the target registered to this parameter. |
| 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.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 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 |
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.
TargetInstitution
public TargetInstitution(Map prop)
- Constructs a new target user parameter.
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