Package net.anotheria.anosite.guard
Class ContextLanguageIsGuard
- java.lang.Object
-
- net.anotheria.anosite.guard.ContextLanguageIsGuard
-
- All Implemented Interfaces:
ConditionalGuard
- Direct Known Subclasses:
ContextLanguageIsEnglishGuard,ContextLanguageIsGermanGuard,ContextLanguageIsRussianGuard
public abstract class ContextLanguageIsGuard extends Object implements ConditionalGuard
Basic class for guards based on anodoc context language. Please note that anodoc context language is not the same as locale language and is more a representation of a complete locale or a site variant. For example we usually represent german by DE and swiss german by CH_DE, which is opposite to what you would do with locales.- Author:
- lrosenberg
-
-
Constructor Summary
Constructors Constructor Description ContextLanguageIsGuard()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringgetDesiredContextLanguage()Returns the context language for this guard implementation to let pass.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) throws net.anotheria.asg.exception.ASGRuntimeExceptionDescription 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.
- Throws:
net.anotheria.asg.exception.ASGRuntimeException- TODO dummy comment for javadoc.
-
getDesiredContextLanguage
protected abstract String getDesiredContextLanguage()
Returns the context language for this guard implementation to let pass. Remember the return value of this function must MATCH EXACTLY what you've written in the context.xml.- Returns:
- context language.
-
-