|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAction
ch.elexis.actions.RestrictedAction
public abstract class RestrictedAction
Special class for actiosn requiring special access rights. The run() method of this class checks the required access rights and runs doRun() if access is granted. Classes extending this class must implement the method doRun() instead of run(). Users of this class may register a listener to get informed about missing rights during execution of the action. (Usually, this is not required, because the action is disabled if the user has not the required rights. See setEnabled())
Nested Class Summary | |
---|---|
static class |
RestrictedAction.RestrictionEvent
Event containing the required right. |
static interface |
RestrictedAction.RestrictionListener
Users of this class can register a RestrictionListener to get informed about missing rights during execution of the action. |
Constructor Summary | |
---|---|
RestrictedAction(ACE necessaryRight)
|
|
RestrictedAction(ACE necessaryRight,
java.lang.String text)
|
|
RestrictedAction(ACE necessaryRight,
java.lang.String text,
int style)
|
Method Summary | |
---|---|
void |
addRestrictionListener(RestrictedAction.RestrictionListener listener)
Register a listener to get informed about missing rights. |
void |
disableAutoAdapt()
Remove this RestrcitedAction from the AutoAdapt queue |
abstract void |
doRun()
Called by RestrictedAction.run() after access rights check. |
void |
enableAutoAdapt()
If AutoAdapt is enabled, the Action will reflect is visual representation according to the current user's rights automatically. |
java.lang.Object |
execute(java.lang.Object param)
execute the connected action |
void |
reflectRight()
Sets the enabled status of this action according to the required right. |
void |
removeRestrictionListener(RestrictedAction.RestrictionListener listener)
Remove a previously registered listener. |
void |
run()
Checks the required access rights and then calls doRun(). |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface ch.elexis.core.data.IActionDefinition |
---|
getText, getToolTipText |
Constructor Detail |
---|
public RestrictedAction(ACE necessaryRight)
public RestrictedAction(ACE necessaryRight, java.lang.String text, int style)
public RestrictedAction(ACE necessaryRight, java.lang.String text)
Method Detail |
---|
public void enableAutoAdapt()
public void disableAutoAdapt()
public void reflectRight()
public void run()
public java.lang.Object execute(java.lang.Object param)
IActionDefinition
execute
in interface IActionDefinition
param
- any parameters needed by the Action
public abstract void doRun()
public void addRestrictionListener(RestrictedAction.RestrictionListener listener)
listener
- the listener to register.public void removeRestrictionListener(RestrictedAction.RestrictionListener listener)
listener
- the listener to remove.
|
Elexis API documentationVersion 2.1.6 as of December 11 2011 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |