EMMA Coverage Report (generated Mon Oct 17 05:41:20 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 * 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.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