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

COVERAGE SUMMARY FOR SOURCE FILE [ListCdnContainerOptions.java]

nameclass, %method, %block, %line, %
ListCdnContainerOptions.java0%   (0/2)0%   (0/9)0%   (0/76)0%   (0/17)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class ListCdnContainerOptions0%   (0/1)0%   (0/5)0%   (0/50)0%   (0/11)
<static initializer> 0%   (0/1)0%   (0/5)0%   (0/1)
ListCdnContainerOptions (): void 0%   (0/1)0%   (0/3)0%   (0/2)
afterMarker (String): ListCdnContainerOptions 0%   (0/1)0%   (0/10)0%   (0/2)
enabledOnly (): ListCdnContainerOptions 0%   (0/1)0%   (0/8)0%   (0/2)
maxResults (int): ListCdnContainerOptions 0%   (0/1)0%   (0/24)0%   (0/4)
     
class ListCdnContainerOptions$Builder0%   (0/1)0%   (0/4)0%   (0/26)0%   (0/7)
ListCdnContainerOptions$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
afterMarker (String): ListCdnContainerOptions 0%   (0/1)0%   (0/8)0%   (0/2)
enabledOnly (): ListCdnContainerOptions 0%   (0/1)0%   (0/7)0%   (0/2)
maxResults (int): ListCdnContainerOptions 0%   (0/1)0%   (0/8)0%   (0/2)

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.cloudfiles.options;
20 
21import static com.google.common.base.Preconditions.checkNotNull;
22import static com.google.common.base.Preconditions.checkState;
23 
24import org.jclouds.http.options.BaseHttpRequestOptions;
25 
26 
27/**
28 * Contains options supported in the REST API for the GET CDN containers operation.
29 */
30public class ListCdnContainerOptions extends BaseHttpRequestOptions {
31   public static final ListCdnContainerOptions NONE = new ListCdnContainerOptions();
32 
33   public ListCdnContainerOptions enabledOnly() {
34      queryParameters.put("enabled_only", "true");
35      return this;
36   }
37 
38   /**
39    * Indicates where to begin listing the identity's containers. The list will only include 
40    * containers whose names occur lexicographically after the marker. This is convenient for 
41    * pagination: To get the next page of results use the last container name of the current 
42    * page as the marker.
43    */
44   public ListCdnContainerOptions afterMarker(String marker) {
45      queryParameters.put("marker", checkNotNull(marker, "marker"));
46      return this;
47   }
48 
49 
50   /**
51    * The maximum number of containers that will be included in the response body. 
52    * The server might return fewer than this many containers, but will not return more.
53    */
54   public ListCdnContainerOptions maxResults(int limit) {
55      checkState(limit >= 0, "limit must be >= 0");
56      checkState(limit <= 10000, "limit must be <= 10000");
57      queryParameters.put("limit", Integer.toString(limit));
58      return this;
59   }
60 
61   public static class Builder {
62      
63      public static ListCdnContainerOptions enabledOnly() {
64         ListCdnContainerOptions options = new ListCdnContainerOptions();
65         return options.enabledOnly();
66      }
67 
68      /**
69       * @see ListCdnContainerOptions#afterMarker(String)
70       */
71      public static ListCdnContainerOptions afterMarker(String marker) {
72         ListCdnContainerOptions options = new ListCdnContainerOptions();
73         return options.afterMarker(marker);
74      }
75 
76      /**
77       * @see ListCdnContainerOptions#limit(int)
78       */
79      public static ListCdnContainerOptions maxResults(int limit) {
80         ListCdnContainerOptions options = new ListCdnContainerOptions();
81         return options.maxResults(limit);
82      }
83 
84   }
85 
86}

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