org.jclouds.predicates.validators
Class DnsNameValidator

java.lang.Object
  extended by org.jclouds.predicates.Validator<String>
      extended by org.jclouds.predicates.validators.DnsNameValidator
All Implemented Interfaces:
com.google.common.base.Predicate<String>
Direct Known Subclasses:
BucketNameValidator, ContainerNameValidator

public class DnsNameValidator
extends Validator<String>

Validates name for dns-style names

Author:
Adrian Cole
See Also:
InputParamValidator, Validator

Constructor Summary
DnsNameValidator(int min, int max)
           
 
Method Summary
protected  IllegalArgumentException exception(String vAppName, String reason)
           
protected  com.google.common.base.CharMatcher getAcceptableRange()
           
 void validate(String name)
          Validates the parameter
 
Methods inherited from class org.jclouds.predicates.Validator
apply
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.google.common.base.Predicate
equals
 

Constructor Detail

DnsNameValidator

@Inject
public DnsNameValidator(@Named(value="jclouds.dns_name_length_min")
                               int min,
                               @Named(value="jclouds.dns_name_length_max")
                               int max)
Method Detail

validate

public void validate(String name)
Description copied from class: Validator
Validates the parameter

Specified by:
validate in class Validator<String>
Parameters:
name - parameter to be validated

getAcceptableRange

protected com.google.common.base.CharMatcher getAcceptableRange()

exception

protected IllegalArgumentException exception(String vAppName,
                                             String reason)


Copyright © 2009-2012 jclouds. All Rights Reserved.