EMMA Coverage Report (generated Mon Oct 17 05:41:20 EDT 2011)
[all classes][org.jclouds.blobstore.options]

COVERAGE SUMMARY FOR SOURCE FILE [CreateContainerOptions.java]

nameclass, %method, %block, %line, %
CreateContainerOptions.java67%  (2/3)21%  (3/14)23%  (17/75)29%  (6/21)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class CreateContainerOptions$Builder0%   (0/1)0%   (0/2)0%   (0/10)0%   (0/3)
CreateContainerOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
publicRead (): CreateContainerOptions 0%   (0/1)0%   (0/7)0%   (0/2)
     
class CreateContainerOptions100% (1/1)29%  (2/7)26%  (11/43)27%  (3/11)
CreateContainerOptions (boolean): void 0%   (0/1)0%   (0/6)0%   (0/3)
clone (): CreateContainerOptions 0%   (0/1)0%   (0/6)0%   (0/1)
isPublicRead (): boolean 0%   (0/1)0%   (0/3)0%   (0/1)
publicRead (): CreateContainerOptions 0%   (0/1)0%   (0/5)0%   (0/2)
toString (): String 0%   (0/1)0%   (0/12)0%   (0/1)
<static initializer> 100% (1/1)100% (8/8)100% (1/1)
CreateContainerOptions (): void 100% (1/1)100% (3/3)100% (2/2)
     
class CreateContainerOptions$ImmutableCreateContainerOptions100% (1/1)20%  (1/5)27%  (6/22)43%  (3/7)
clone (): CreateContainerOptions 0%   (0/1)0%   (0/4)0%   (0/1)
isPublicRead (): boolean 0%   (0/1)0%   (0/4)0%   (0/1)
publicRead (): CreateContainerOptions 0%   (0/1)0%   (0/4)0%   (0/1)
toString (): String 0%   (0/1)0%   (0/4)0%   (0/1)
CreateContainerOptions$ImmutableCreateContainerOptions (CreateContainerOption... 100% (1/1)100% (6/6)100% (3/3)

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.blobstore.options;
20 
21/**
22 * Contains options supported in the list container operation. <h2>
23 * Usage</h2> The recommended way to instantiate a CreateOptions object is to statically import
24 * CreateContainerOptions.* and invoke a static creation method followed by an instance mutator (if
25 * needed):
26 * <p/>
27 * <code>
28 * import static org.jclouds.blobstore.options.CreateContainerOptions.Builder.*
29 * <p/>
30 * BlobStore connection = // get connection
31 * Future<CreateResponse<ResourceMetadata>> list = connection.list("container",inDirectory("home/users").maxResults(1000));
32 * <code>
33 * 
34 * @author Adrian Cole
35 */
36public class CreateContainerOptions implements Cloneable {
37 
38   public static final ImmutableCreateContainerOptions NONE = new ImmutableCreateContainerOptions(
39            new CreateContainerOptions());
40 
41   private boolean publicRead;
42 
43   public CreateContainerOptions() {
44   }
45 
46   CreateContainerOptions(boolean publicRead) {
47      this.publicRead = publicRead;
48   }
49 
50   public static class ImmutableCreateContainerOptions extends CreateContainerOptions {
51      private final CreateContainerOptions delegate;
52 
53      public ImmutableCreateContainerOptions(CreateContainerOptions delegate) {
54         this.delegate = delegate;
55      }
56 
57      @Override
58      public boolean isPublicRead() {
59         return delegate.isPublicRead();
60      }
61 
62      @Override
63      public CreateContainerOptions publicRead() {
64         throw new UnsupportedOperationException();
65      }
66 
67      @Override
68      public CreateContainerOptions clone() {
69         return delegate.clone();
70      }
71 
72      @Override
73      public String toString() {
74         return delegate.toString();
75      }
76 
77   }
78 
79   public boolean isPublicRead() {
80      return publicRead;
81   }
82 
83   /**
84    * return a listing of all objects inside the store, publicReadly.
85    */
86   public CreateContainerOptions publicRead() {
87      // checkArgument(path == null, "path and publicRead combination currently not supported");
88      this.publicRead = true;
89      return this;
90   }
91 
92   public static class Builder {
93 
94      /**
95       * @see CreateContainerOptions#publicRead()
96       */
97      public static CreateContainerOptions publicRead() {
98         CreateContainerOptions options = new CreateContainerOptions();
99         return options.publicRead();
100      }
101 
102   }
103 
104   @Override
105   public CreateContainerOptions clone() {
106      return new CreateContainerOptions(publicRead);
107   }
108 
109   @Override
110   public String toString() {
111      return "[publicRead=" + publicRead + "]";
112   }
113}

[all classes][org.jclouds.blobstore.options]
EMMA 2.0.5312 (C) Vladimir Roubtsov