EMMA Coverage Report (generated Fri Aug 26 14:14:05 EDT 2011)
[all classes][org.jclouds.filesystem.config]

COVERAGE SUMMARY FOR SOURCE FILE [FilesystemBlobStoreContextModule.java]

nameclass, %method, %block, %line, %
FilesystemBlobStoreContextModule.java100% (3/3)100% (5/5)100% (75/75)100% (13/13)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FilesystemBlobStoreContextModule100% (1/1)100% (3/3)100% (63/63)100% (12/12)
FilesystemBlobStoreContextModule (): void 100% (1/1)100% (3/3)100% (1/1)
configure (): void 100% (1/1)100% (58/58)100% (10/10)
provide (FilesystemBlobStore): BlobStore 100% (1/1)100% (2/2)100% (1/1)
     
class FilesystemBlobStoreContextModule$1100% (1/1)100% (1/1)100% (6/6)100% (1/1)
FilesystemBlobStoreContextModule$1 (FilesystemBlobStoreContextModule): void 100% (1/1)100% (6/6)100% (1/1)
     
class FilesystemBlobStoreContextModule$2100% (1/1)100% (1/1)100% (6/6)100% (1/1)
FilesystemBlobStoreContextModule$2 (FilesystemBlobStoreContextModule): void 100% (1/1)100% (6/6)100% (1/1)

1/**
2 *
3 * Copyright (C) 2011 Cloud Conscious, LLC. <info@cloudconscious.com>
4 *
5 * ====================================================================
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 * ====================================================================
18 */
19package org.jclouds.filesystem.config;
20 
21import org.jclouds.blobstore.AsyncBlobStore;
22import org.jclouds.blobstore.BlobStore;
23import org.jclouds.blobstore.BlobStoreContext;
24import org.jclouds.blobstore.attr.ConsistencyModel;
25import org.jclouds.blobstore.config.BlobStoreMapModule;
26import org.jclouds.blobstore.config.BlobStoreObjectModule;
27import org.jclouds.blobstore.internal.BlobStoreContextImpl;
28import org.jclouds.blobstore.util.BlobUtils;
29import org.jclouds.filesystem.FilesystemBlobStore;
30import org.jclouds.filesystem.predicates.validators.FilesystemBlobKeyValidator;
31import org.jclouds.filesystem.predicates.validators.FilesystemContainerNameValidator;
32import org.jclouds.filesystem.predicates.validators.internal.FilesystemBlobKeyValidatorImpl;
33import org.jclouds.filesystem.predicates.validators.internal.FilesystemContainerNameValidatorImpl;
34import org.jclouds.filesystem.strategy.FilesystemStorageStrategy;
35import org.jclouds.filesystem.strategy.internal.FilesystemStorageStrategyImpl;
36import org.jclouds.filesystem.util.internal.FileSystemBlobUtilsImpl;
37import org.jclouds.location.config.JustProviderLocationModule;
38 
39import com.google.inject.AbstractModule;
40import com.google.inject.Provides;
41import com.google.inject.Scopes;
42import com.google.inject.Singleton;
43import com.google.inject.TypeLiteral;
44 
45/**
46 * 
47 * @author Alfredo "Rainbowbreeze" Morresi
48 */
49public class FilesystemBlobStoreContextModule extends AbstractModule {
50 
51   @Override
52   protected void configure() {
53      bind(new TypeLiteral<BlobStoreContext>() {
54      }).to(new TypeLiteral<BlobStoreContextImpl<FilesystemBlobStore, AsyncBlobStore>>() {
55      }).in(Scopes.SINGLETON);
56      install(new BlobStoreObjectModule());
57      install(new BlobStoreMapModule());
58      bind(ConsistencyModel.class).toInstance(ConsistencyModel.STRICT);
59      bind(FilesystemStorageStrategy.class).to(FilesystemStorageStrategyImpl.class);
60      bind(BlobUtils.class).to(FileSystemBlobUtilsImpl.class);
61      bind(FilesystemBlobKeyValidator.class).to(FilesystemBlobKeyValidatorImpl.class);
62      bind(FilesystemContainerNameValidator.class).to(FilesystemContainerNameValidatorImpl.class);
63      install(new JustProviderLocationModule());
64   }
65 
66   @Provides
67   @Singleton
68   BlobStore provide(FilesystemBlobStore in) {
69      return in;
70   }
71 
72}

[all classes][org.jclouds.filesystem.config]
EMMA 2.0.5312 (C) Vladimir Roubtsov