@Unstable public abstract class AbstractEntityNameValidation extends Object implements EntityNameValidation
EntityNameValidation.transform(String)
and EntityNameValidation.isValid(String)
.Constructor and Description |
---|
AbstractEntityNameValidation() |
Modifier and Type | Method and Description |
---|---|
boolean |
isValid(EntityReference entityReference)
Validate that the given
EntityReference respects the current policy. |
EntityReference |
transform(EntityReference entityReference)
Aims at transforming an entity reference such as
EntityNameValidation.isValid(EntityReference) returns true. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
isValid, transform
public EntityReference transform(EntityReference entityReference)
EntityNameValidation
EntityNameValidation.isValid(EntityReference)
returns true.
Note that this method should return exactly entityReference
if EntityNameValidation.isValid(EntityReference)
already
returns true for it.transform
in interface EntityNameValidation
entityReference
- the entity reference on which to perform transformation.EntityReference
with the fewer possible transformation to make
it pass EntityNameValidation.isValid(EntityReference)
.public boolean isValid(EntityReference entityReference)
EntityNameValidation
EntityReference
respects the current policy.isValid
in interface EntityNameValidation
entityReference
- the entity reference to checktrue
if the policy is respected.Copyright © 2004–2021 XWiki. All rights reserved.