EMMA Coverage Report (generated Mon Oct 17 05:41:20 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% (81/81)100% (14/14)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class FilesystemBlobStoreContextModule100% (1/1)100% (3/3)100% (69/69)100% (13/13)
FilesystemBlobStoreContextModule (): void 100% (1/1)100% (3/3)100% (1/1)
configure (): void 100% (1/1)100% (64/64)100% (11/11)
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 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  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,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.jclouds.filesystem.config;
20 
21import org.jclouds.blobstore.AsyncBlobStore;
22import org.jclouds.blobstore.BlobRequestSigner;
23import org.jclouds.blobstore.BlobStore;
24import org.jclouds.blobstore.BlobStoreContext;
25import org.jclouds.blobstore.TransientBlobRequestSigner;
26import org.jclouds.blobstore.attr.ConsistencyModel;
27import org.jclouds.blobstore.config.BlobStoreMapModule;
28import org.jclouds.blobstore.config.BlobStoreObjectModule;
29import org.jclouds.blobstore.internal.BlobStoreContextImpl;
30import org.jclouds.blobstore.util.BlobUtils;
31import org.jclouds.filesystem.FilesystemBlobStore;
32import org.jclouds.filesystem.predicates.validators.FilesystemBlobKeyValidator;
33import org.jclouds.filesystem.predicates.validators.FilesystemContainerNameValidator;
34import org.jclouds.filesystem.predicates.validators.internal.FilesystemBlobKeyValidatorImpl;
35import org.jclouds.filesystem.predicates.validators.internal.FilesystemContainerNameValidatorImpl;
36import org.jclouds.filesystem.strategy.FilesystemStorageStrategy;
37import org.jclouds.filesystem.strategy.internal.FilesystemStorageStrategyImpl;
38import org.jclouds.filesystem.util.internal.FileSystemBlobUtilsImpl;
39import org.jclouds.location.config.JustProviderLocationModule;
40 
41import com.google.inject.AbstractModule;
42import com.google.inject.Provides;
43import com.google.inject.Scopes;
44import com.google.inject.Singleton;
45import com.google.inject.TypeLiteral;
46 
47/**
48 * 
49 * @author Alfredo "Rainbowbreeze" Morresi
50 */
51public class FilesystemBlobStoreContextModule extends AbstractModule {
52 
53   @Override
54   protected void configure() {
55      bind(new TypeLiteral<BlobStoreContext>() {
56      }).to(new TypeLiteral<BlobStoreContextImpl<FilesystemBlobStore, AsyncBlobStore>>() {
57      }).in(Scopes.SINGLETON);
58      install(new BlobStoreObjectModule());
59      install(new BlobStoreMapModule());
60      bind(ConsistencyModel.class).toInstance(ConsistencyModel.STRICT);
61      bind(FilesystemStorageStrategy.class).to(FilesystemStorageStrategyImpl.class);
62      bind(BlobUtils.class).to(FileSystemBlobUtilsImpl.class);
63      bind(FilesystemBlobKeyValidator.class).to(FilesystemBlobKeyValidatorImpl.class);
64      bind(FilesystemContainerNameValidator.class).to(FilesystemContainerNameValidatorImpl.class);
65      bind(BlobRequestSigner.class).to(TransientBlobRequestSigner.class);
66      install(new JustProviderLocationModule());
67   }
68 
69   @Provides
70   @Singleton
71   BlobStore provide(FilesystemBlobStore in) {
72      return in;
73   }
74 
75}

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