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

COVERAGE SUMMARY FOR SOURCE FILE [PutOptions.java]

nameclass, %method, %block, %line, %
PutOptions.java100% (2/2)80%  (4/5)89%  (25/28)94%  (7.5/8)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class PutOptions$Builder100% (1/1)50%  (1/2)70%  (7/10)67%  (2/3)
PutOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
publicRead (): PutOptions 100% (1/1)100% (7/7)100% (2/2)
     
class PutOptions100% (1/1)100% (3/3)100% (18/18)100% (6/6)
<static initializer> 100% (1/1)100% (5/5)100% (1/1)
PutOptions (): void 100% (1/1)100% (3/3)100% (2/2)
publicRead (): PutOptions 100% (1/1)100% (10/10)100% (3/3)

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.atmos.options;
20 
21import org.jclouds.http.options.BaseHttpRequestOptions;
22 
23/**
24 * Contains options supported in the REST API for the PUT operations.
25 * <p/>
26 * <h2>
27 * Usage</h2> The recommended way to instantiate a PutOptions object is to statically import
28 * PutOptions.Builder.* and invoke a static creation method followed by an instance mutator (if
29 * needed):
30 * <p/>
31 * <code>
32 * import org.jclouds.atmos.options.PutOptions.Builder.*
33 * import org.jclouds.atmos.AtmosClient;
34 * 
35 * AtmosClient connection = // get connection
36 *  connection.createDirectory("directory", publicRead());
37 * <code>
38 * 
39 * @author Adrian Cole
40 * 
41 */
42public class PutOptions extends BaseHttpRequestOptions {
43   public static final PutOptions NONE = new PutOptions();
44 
45   /**
46    * Add public access to all users
47    * 
48    */
49   public PutOptions publicRead() {
50      this.replaceHeader("x-emc-useracl", "root=FULL_CONTROL");
51      this.replaceHeader("x-emc-groupacl", "other=READ");
52      return this;
53   }
54 
55   public static class Builder {
56 
57      /**
58       * @see PutOptions#publicRead
59       */
60      public static PutOptions publicRead() {
61         PutOptions options = new PutOptions();
62         return options.publicRead();
63      }
64   }
65}

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