org.jclouds.s3.predicates.validators
Class BucketNameValidator

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

public class BucketNameValidator
extends DnsNameValidator

Validates name for S3 buckets. The complete requirements are listed at: http://docs.amazonwebservices.com/AmazonS3/latest/index.html?BucketRestrictions.html

Author:
Adrian Cole
See Also:
InputParamValidator, Validator

Method Summary
protected  IllegalArgumentException exception(String containerName, String reason)
           
protected  com.google.common.base.CharMatcher getAcceptableRange()
          Amazon also permits periods in the dns name.
 void validate(String containerName)
          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
 

Method Detail

validate

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

Overrides:
validate in class DnsNameValidator
Parameters:
containerName - parameter to be validated

exception

protected IllegalArgumentException exception(String containerName,
                                             String reason)
Overrides:
exception in class DnsNameValidator

getAcceptableRange

protected com.google.common.base.CharMatcher getAcceptableRange()
Amazon also permits periods in the dns name. It also permits underscores, although they aren't recommended.

Overrides:
getAcceptableRange in class DnsNameValidator


Copyright © 2009-2011 jclouds. All Rights Reserved.