@Test public void testCheckBucketName() { assert (ObjectStorageGateway.checkBucketNameValidity("bucket")); assert (ObjectStorageGateway.checkBucketNameValidity("bucket.bucket.bucket")); assert (!ObjectStorageGateway.checkBucketNameValidity("10.100.1.1")); assert (ObjectStorageGateway.checkBucketNameValidity("bu_ckeS-adsad")); assert (ObjectStorageGateway.checkBucketNameValidity("aou12naofdufan1421_-123oiasd-afasf.asdfas")); assert (!ObjectStorageGateway.checkBucketNameValidity("bucke<t>%12313")); assert (!ObjectStorageGateway.checkBucketNameValidity("b*u&c%k#et")); assert (ObjectStorageGateway.checkBucketNameValidity("bucket_name")); }
public static boolean checkBucketNameValidity(String bucketName) { return BucketNameValidatorRepo.getBucketNameValidator( ConfigurationCache.getConfiguration(ObjectStorageGlobalConfiguration.class).getBucket_naming_restrictions()).check(bucketName); }
ObjectStorageGateway implements ObjectStorageService { public static boolean checkBucketNameValidity(String bucketName) { return BucketNameValidatorRepo.getBucketNameValidator( ConfigurationCache.getConfiguration(ObjectStorageGlobalConfiguration.class).getBucket_naming_restrictions()).check(bucketName); } }
ObjectStorageGateway implements ObjectStorageService { public static boolean checkBucketNameValidity(String bucketName) { return BucketNameValidatorRepo.getBucketNameValidator( ConfigurationCache.getConfiguration(ObjectStorageGlobalConfiguration.class).getBucket_naming_restrictions()).check(bucketName); } @Inject  ObjectStorageGateway(
      final RequestAuthorizationHandler authorizationHandler
  ); }
ObjectStorageGateway implements ObjectStorageService { public static boolean checkBucketNameValidity(String bucketName) { return BucketNameValidatorRepo.getBucketNameValidator( ConfigurationCache.getConfiguration(ObjectStorageGlobalConfiguration.class).getBucket_naming_restrictions()).check(bucketName); } @Inject  ObjectStorageGateway(
      final RequestAuthorizationHandler authorizationHandler
  ); static void checkPreconditions(); static void configure(); static void enable(); static void disable(); static void check(); static void stop(); @Override UpdateObjectStorageConfigurationResponseType updateObjectStorageConfiguration(UpdateObjectStorageConfigurationType request); @Override GetObjectStorageConfigurationResponseType getObjectStorageConfiguration(GetObjectStorageConfigurationType request); static boolean checkBucketNameValidity(String bucketName); @Override PutObjectResponseType putObject(final PutObjectType request); @Override HeadBucketResponseType headBucket(HeadBucketType request); @Override CreateBucketResponseType createBucket(final CreateBucketType request); @Override DeleteBucketResponseType deleteBucket(final DeleteBucketType request); @Override ListAllMyBucketsResponseType listAllMyBuckets(ListAllMyBucketsType request); @Override GetBucketAccessControlPolicyResponseType getBucketAccessControlPolicy(GetBucketAccessControlPolicyType request); @Override PostObjectResponseType postObject(PostObjectType request); @Override DeleteObjectResponseType deleteObject(final DeleteObjectType request); @Override ListBucketResponseType listBucket(ListBucketType request); @Override GetObjectAccessControlPolicyResponseType getObjectAccessControlPolicy(GetObjectAccessControlPolicyType request); @Override SetBucketAccessControlPolicyResponseType setBucketAccessControlPolicy(final SetBucketAccessControlPolicyType request); @Override SetObjectAccessControlPolicyResponseType setObjectAccessControlPolicy(final SetObjectAccessControlPolicyType request); @Override GetObjectResponseType getObject(final GetObjectType request); @Override GetObjectExtendedResponseType getObjectExtended(GetObjectExtendedType request); @Override HeadObjectResponseType headObject(HeadObjectType request); @Override GetBucketLocationResponseType getBucketLocation(GetBucketLocationType request); @Override CopyObjectResponseType copyObject(CopyObjectType request); @Override GetBucketLoggingStatusResponseType getBucketLoggingStatus(GetBucketLoggingStatusType request); @Override SetBucketLoggingStatusResponseType setBucketLoggingStatus(final SetBucketLoggingStatusType request); @Override GetBucketVersioningStatusResponseType getBucketVersioningStatus(GetBucketVersioningStatusType request); @Override SetBucketVersioningStatusResponseType setBucketVersioningStatus(final SetBucketVersioningStatusType request); @Override ListVersionsResponseType listVersions(ListVersionsType request); @Override DeleteVersionResponseType deleteVersion(final DeleteVersionType request); @Override GetBucketLifecycleResponseType getBucketLifecycle(GetBucketLifecycleType request); @Override SetBucketLifecycleResponseType setBucketLifecycle(SetBucketLifecycleType request); @Override DeleteBucketLifecycleResponseType deleteBucketLifecycle(DeleteBucketLifecycleType request); @Override SetBucketTaggingResponseType setBucketTagging(SetBucketTaggingType request); @Override GetBucketTaggingResponseType getBucketTagging(GetBucketTaggingType request); @Override DeleteBucketTaggingResponseType deleteBucketTagging(DeleteBucketTaggingType request); @Override GetBucketCorsResponseType getBucketCors(GetBucketCorsType request); void setCorsInfo(ObjectStorageRequestType request, ObjectStorageCommonResponseType response, Bucket bucket); @Override SetBucketCorsResponseType setBucketCors(SetBucketCorsType request); @Override DeleteBucketCorsResponseType deleteBucketCors(DeleteBucketCorsType request); @Override PreflightCheckCorsResponseType preflightCors(PreflightCheckCorsType request); @Override GetBucketPolicyResponseType getBucketPolicy( final GetBucketPolicyType request ); @Override SetBucketPolicyResponseType setBucketPolicy( final SetBucketPolicyType request ); @Override DeleteBucketPolicyResponseType deleteBucketPolicy( final DeleteBucketPolicyType request ); @Override InitiateMultipartUploadResponseType initiateMultipartUpload(InitiateMultipartUploadType request); @Override UploadPartResponseType uploadPart(final UploadPartType request); @Override CompleteMultipartUploadResponseType completeMultipartUpload(final CompleteMultipartUploadType request); @Override AbortMultipartUploadResponseType abortMultipartUpload(AbortMultipartUploadType request); @Override ListPartsResponseType listParts(ListPartsType request); @Override ListMultipartUploadsResponseType listMultipartUploads(ListMultipartUploadsType request); @Override DeleteMultipleObjectsResponseType deleteMultipleObjects(DeleteMultipleObjectsType request); }
ObjectStorageGateway implements ObjectStorageService { public static boolean checkBucketNameValidity(String bucketName) { return BucketNameValidatorRepo.getBucketNameValidator( ConfigurationCache.getConfiguration(ObjectStorageGlobalConfiguration.class).getBucket_naming_restrictions()).check(bucketName); } @Inject  ObjectStorageGateway(
      final RequestAuthorizationHandler authorizationHandler
  ); static void checkPreconditions(); static void configure(); static void enable(); static void disable(); static void check(); static void stop(); @Override UpdateObjectStorageConfigurationResponseType updateObjectStorageConfiguration(UpdateObjectStorageConfigurationType request); @Override GetObjectStorageConfigurationResponseType getObjectStorageConfiguration(GetObjectStorageConfigurationType request); static boolean checkBucketNameValidity(String bucketName); @Override PutObjectResponseType putObject(final PutObjectType request); @Override HeadBucketResponseType headBucket(HeadBucketType request); @Override CreateBucketResponseType createBucket(final CreateBucketType request); @Override DeleteBucketResponseType deleteBucket(final DeleteBucketType request); @Override ListAllMyBucketsResponseType listAllMyBuckets(ListAllMyBucketsType request); @Override GetBucketAccessControlPolicyResponseType getBucketAccessControlPolicy(GetBucketAccessControlPolicyType request); @Override PostObjectResponseType postObject(PostObjectType request); @Override DeleteObjectResponseType deleteObject(final DeleteObjectType request); @Override ListBucketResponseType listBucket(ListBucketType request); @Override GetObjectAccessControlPolicyResponseType getObjectAccessControlPolicy(GetObjectAccessControlPolicyType request); @Override SetBucketAccessControlPolicyResponseType setBucketAccessControlPolicy(final SetBucketAccessControlPolicyType request); @Override SetObjectAccessControlPolicyResponseType setObjectAccessControlPolicy(final SetObjectAccessControlPolicyType request); @Override GetObjectResponseType getObject(final GetObjectType request); @Override GetObjectExtendedResponseType getObjectExtended(GetObjectExtendedType request); @Override HeadObjectResponseType headObject(HeadObjectType request); @Override GetBucketLocationResponseType getBucketLocation(GetBucketLocationType request); @Override CopyObjectResponseType copyObject(CopyObjectType request); @Override GetBucketLoggingStatusResponseType getBucketLoggingStatus(GetBucketLoggingStatusType request); @Override SetBucketLoggingStatusResponseType setBucketLoggingStatus(final SetBucketLoggingStatusType request); @Override GetBucketVersioningStatusResponseType getBucketVersioningStatus(GetBucketVersioningStatusType request); @Override SetBucketVersioningStatusResponseType setBucketVersioningStatus(final SetBucketVersioningStatusType request); @Override ListVersionsResponseType listVersions(ListVersionsType request); @Override DeleteVersionResponseType deleteVersion(final DeleteVersionType request); @Override GetBucketLifecycleResponseType getBucketLifecycle(GetBucketLifecycleType request); @Override SetBucketLifecycleResponseType setBucketLifecycle(SetBucketLifecycleType request); @Override DeleteBucketLifecycleResponseType deleteBucketLifecycle(DeleteBucketLifecycleType request); @Override SetBucketTaggingResponseType setBucketTagging(SetBucketTaggingType request); @Override GetBucketTaggingResponseType getBucketTagging(GetBucketTaggingType request); @Override DeleteBucketTaggingResponseType deleteBucketTagging(DeleteBucketTaggingType request); @Override GetBucketCorsResponseType getBucketCors(GetBucketCorsType request); void setCorsInfo(ObjectStorageRequestType request, ObjectStorageCommonResponseType response, Bucket bucket); @Override SetBucketCorsResponseType setBucketCors(SetBucketCorsType request); @Override DeleteBucketCorsResponseType deleteBucketCors(DeleteBucketCorsType request); @Override PreflightCheckCorsResponseType preflightCors(PreflightCheckCorsType request); @Override GetBucketPolicyResponseType getBucketPolicy( final GetBucketPolicyType request ); @Override SetBucketPolicyResponseType setBucketPolicy( final SetBucketPolicyType request ); @Override DeleteBucketPolicyResponseType deleteBucketPolicy( final DeleteBucketPolicyType request ); @Override InitiateMultipartUploadResponseType initiateMultipartUpload(InitiateMultipartUploadType request); @Override UploadPartResponseType uploadPart(final UploadPartType request); @Override CompleteMultipartUploadResponseType completeMultipartUpload(final CompleteMultipartUploadType request); @Override AbortMultipartUploadResponseType abortMultipartUpload(AbortMultipartUploadType request); @Override ListPartsResponseType listParts(ListPartsType request); @Override ListMultipartUploadsResponseType listMultipartUploads(ListMultipartUploadsType request); @Override DeleteMultipleObjectsResponseType deleteMultipleObjects(DeleteMultipleObjectsType request);  }