Package net.anotheria.anosite.guard
Class SystemEnvironmentAbstractGuard
- java.lang.Object
-
- net.anotheria.anosite.guard.SystemEnvironmentAbstractGuard
-
- All Implemented Interfaces:
ConditionalGuard
- Direct Known Subclasses:
SystemIsCmsGuard,SystemIsDevGuard,SystemIsPreprodGuard,SystemIsPreviewGuard,SystemIsProdGuard,SystemIsTestingGuard
public abstract class SystemEnvironmentAbstractGuard extends Object implements ConditionalGuard
Abstract class that provides common methods and String constants for all derived guards.- Author:
- Alex Osadchy
-
-
Constructor Summary
Constructors Constructor Description SystemEnvironmentAbstractGuard()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract StringgetTargetEnvironmentName()Override this method to provide name of target environment.booleanisConditionFullfilled(net.anotheria.asg.data.DataObject object, jakarta.servlet.http.HttpServletRequest req)Returns true if the condition is fullfilled.protected abstract booleanshouldMatch()Override this method in a way that it would return true if environments should match, false otherwise.
-
-
-
Method Detail
-
getTargetEnvironmentName
protected abstract String getTargetEnvironmentName()
Override this method to provide name of target environment.- Returns:
- name of the environment
-
shouldMatch
protected abstract boolean shouldMatch()
Override this method in a way that it would return true if environments should match, false otherwise.- Returns:
- boolean value.
-
isConditionFullfilled
public final boolean isConditionFullfilled(net.anotheria.asg.data.DataObject object, jakarta.servlet.http.HttpServletRequest req) throws net.anotheria.asg.exception.ASGRuntimeExceptionReturns 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.
-
-