Package net.anotheria.anosite.guard
Class SessionFlagPresentGuard
- java.lang.Object
-
- net.anotheria.anosite.guard.SessionFlagPresentGuard
-
- All Implemented Interfaces:
ConditionalGuard
- Direct Known Subclasses:
CMSLogedInGuard,InEditModeGuard
public abstract class SessionFlagPresentGuard extends Object implements ConditionalGuard
A guard which only returns true if the desired attribute is in session.- Author:
- lrosenberg
-
-
Constructor Summary
Constructors Constructor Description SessionFlagPresentGuard()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected booleangetDesiredResult()If true the guard is fullfilled whenever the attribute with name = flagName is in session.protected abstract StringgetFlagName()Returns the name of the flag to look after.booleanisConditionFullfilled(net.anotheria.asg.data.DataObject object, jakarta.servlet.http.HttpServletRequest req)Returns true if the condition is fullfilled.
-
-
-
Method Detail
-
isConditionFullfilled
public boolean isConditionFullfilled(net.anotheria.asg.data.DataObject object, jakarta.servlet.http.HttpServletRequest req)Description copied from interface:ConditionalGuardReturns true if the condition is fullfilled.- Specified by:
isConditionFullfilledin interfaceConditionalGuard- Parameters:
object- TODO dummy comment for javadoc.req- TODO dummy comment for javadoc.- Returns:
- TODO dummy comment for javadoc.
-
getDesiredResult
protected boolean getDesiredResult()
If true the guard is fullfilled whenever the attribute with name = flagName is in session. If false the guard is fullfilled if the attribute with the name = flagName is NOT in session.
-
getFlagName
protected abstract String getFlagName()
Returns the name of the flag to look after.- Returns:
- flag name.
-
-