Package net.anotheria.anosite.guard
Class LanguageAbstractGuard
- java.lang.Object
-
- net.anotheria.anosite.guard.LanguageAbstractGuard
-
- All Implemented Interfaces:
ConditionalGuard
- Direct Known Subclasses:
LanguageIsDEGuard,LanguageIsENGuard
public abstract class LanguageAbstractGuard extends Object implements ConditionalGuard
Abstract language guard.- Author:
- Alexandr Bolbat
-
-
Constructor Summary
Constructors Constructor Description LanguageAbstractGuard()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringgetTargetLanguage()Target language.booleanisConditionFullfilled(net.anotheria.asg.data.DataObject object, jakarta.servlet.http.HttpServletRequest req)Returns true if the condition is fullfilled.protected booleanshouldMatch()By overriding this method we can change conditional logic.
-
-
-
Method Detail
-
getTargetLanguage
protected abstract String getTargetLanguage()
Target language.- Returns:
Stringlanguage code (configured code from ano-site definition)
-
shouldMatch
protected boolean shouldMatch()
By overriding this method we can change conditional logic.- Returns:
trueif target language should be equal to current logic orfalseif shouldn't
-
isConditionFullfilled
public final 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.
-
-