Package com.exedio.cope.pattern
Class PasswordLimiter
- java.lang.Object
-
- com.exedio.cope.Feature
-
- com.exedio.cope.Pattern
-
- com.exedio.cope.pattern.PasswordLimiter
-
- All Implemented Interfaces:
Serializable
public final class PasswordLimiter extends Pattern
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PasswordLimiter.ExceededException
static class
PasswordLimiter.Refusal
-
Constructor Summary
Constructors Constructor Description PasswordLimiter(HashInterface password, long period, int limit)
Deprecated.UsePasswordLimiter(HashInterface, Duration, int)
instead.PasswordLimiter(HashInterface password, Duration period, int limit)
PasswordLimiter(Hash password, long period, int limit)
Deprecated.UsePasswordLimiter(HashInterface, Duration, int)
instead.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description boolean
check(Item item, String password)
boolean
checkVerbosely(Item item, String password)
DateField
getDate()
int
getLimit()
<P extends Item>
ItemField<P>getParent(Class<P> parentClass)
HashInterface
getPassword()
long
getPeriod()
Duration
getPeriodDuration()
PartOf<?>
getRefusals()
Type<PasswordLimiter.Refusal>
getRefusalType()
protected void
onMount()
Here you can do additional initialization not yet done in the constructor.int
purge(Interrupter interrupter)
Deprecated.Usepurge(JobContext)
instead.void
purge(JobContext ctx)
int
purge(Class<?> parentClass, Interrupter interrupter)
Deprecated.Usepurge(com.exedio.cope.util.Interrupter)
instead.void
reset(Item item)
-
Methods inherited from class com.exedio.cope.Pattern
addSource, addSource, addSource, addSource, addSourceFeature, addSourceFeature, addSourceFeature, annotationField, equals, getGeneratedTypes, getSourceFeatures, getSourceFeaturesGather, getSourceFields, getSources, getSourceTypes, getType, hashCode, initialize, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newSourceType, newType, newType, registerSource
-
Methods inherited from class com.exedio.cope.Feature
afterModelCreated, getAbstractType, getAnnotation, getID, getLocalizationKeys, getName, getPattern, isAnnotationPresent, isSourceAlready, mount, readResolve, requireMounted, toString, toString, writeReplace
-
-
-
-
Constructor Detail
-
PasswordLimiter
public PasswordLimiter(HashInterface password, Duration period, int limit)
-
PasswordLimiter
@Deprecated public PasswordLimiter(Hash password, long period, int limit)
Deprecated.UsePasswordLimiter(HashInterface, Duration, int)
instead.
-
PasswordLimiter
@Deprecated public PasswordLimiter(HashInterface password, long period, int limit)
Deprecated.UsePasswordLimiter(HashInterface, Duration, int)
instead.
-
-
Method Detail
-
getPassword
public HashInterface getPassword()
-
getPeriod
public long getPeriod()
-
getPeriodDuration
public Duration getPeriodDuration()
-
getLimit
public int getLimit()
-
onMount
protected void onMount()
Description copied from class:Pattern
Here you can do additional initialization not yet done in the constructor. In this method you can call methodsPattern.getType()
andFeature.getName()
for the first time.
-
getRefusals
public PartOf<?> getRefusals()
-
getDate
public DateField getDate()
-
getRefusalType
public Type<PasswordLimiter.Refusal> getRefusalType()
-
checkVerbosely
public boolean checkVerbosely(@Nonnull Item item, @Nullable String password) throws PasswordLimiter.ExceededException
-
purge
public void purge(@Nonnull JobContext ctx)
-
purge
@Deprecated public int purge(Class<?> parentClass, Interrupter interrupter)
Deprecated.Usepurge(com.exedio.cope.util.Interrupter)
instead.
-
purge
@Deprecated public int purge(@Nullable Interrupter interrupter)
Deprecated.Usepurge(JobContext)
instead.
-
-