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 org.jclouds.predicates.validators.DnsNameValidator

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

See Also:
InputParamValidator, Validator

Constructor Summary
BucketNameValidator()
           
 
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)
           
 
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

BucketNameValidator

@Inject
public BucketNameValidator()
Method Detail

validate

public void validate(String containerName)
Overrides:
validate in class org.jclouds.predicates.validators.DnsNameValidator

exception

protected IllegalArgumentException exception(String containerName,
                                             String reason)
Overrides:
exception in class org.jclouds.predicates.validators.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 org.jclouds.predicates.validators.DnsNameValidator


Copyright © 2009-2014 The Apache Software Foundation. All Rights Reserved.