Package org.xwiki.component.namespace
Interface NamespaceValidator
-
@Role public interface NamespaceValidator
Validate a namespace against list of allowed namespaces.- Since:
- 8.0M1
- Version:
- $Id: ab90906780ffb4282206afb149b2524d3929f01b $
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
checkAllowed(Collection<String> allowedNamespaces, String namespace)
boolean
isAllowed(Collection<String> allowedNamespaces, String namespace)
-
-
-
Method Detail
-
isAllowed
boolean isAllowed(Collection<String> allowedNamespaces, String namespace)
- Parameters:
allowedNamespaces
- the allowed dynamic (or not) namespaces, null matches any namespacenamespace
- to validate against passed allowed namespaces- Returns:
- the namespace(s) corresponding to the passed dynamic namespaces
-
checkAllowed
void checkAllowed(Collection<String> allowedNamespaces, String namespace) throws NamespaceNotAllowedException
- Parameters:
allowedNamespaces
- the allowed dynamic (or not) namespaces, null matches any namespacenamespace
- to validate against passed allowed namespaces- Throws:
NamespaceNotAllowedException
- when the passed namespace is not allowed
-
-