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

COVERAGE SUMMARY FOR SOURCE FILE [AllCatalogItemsInOrg.java]

nameclass, %method, %block, %line, %
AllCatalogItemsInOrg.java0%   (0/2)0%   (0/5)0%   (0/40)0%   (0/9)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class AllCatalogItemsInOrg0%   (0/1)0%   (0/3)0%   (0/27)0%   (0/7)
AllCatalogItemsInOrg (Function, Function): void 0%   (0/1)0%   (0/12)0%   (0/5)
access$000 (AllCatalogItemsInOrg): Function 0%   (0/1)0%   (0/3)0%   (0/1)
apply (Org): Iterable 0%   (0/1)0%   (0/12)0%   (0/1)
     
class AllCatalogItemsInOrg$10%   (0/1)0%   (0/2)0%   (0/13)0%   (0/2)
AllCatalogItemsInOrg$1 (AllCatalogItemsInOrg): void 0%   (0/1)0%   (0/6)0%   (0/1)
apply (Catalog): Iterable 0%   (0/1)0%   (0/7)0%   (0/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.trmk.vcloud_0_8.functions;
20 
21import javax.annotation.Resource;
22import javax.inject.Inject;
23import javax.inject.Singleton;
24 
25import org.jclouds.logging.Logger;
26import org.jclouds.trmk.vcloud_0_8.domain.Catalog;
27import org.jclouds.trmk.vcloud_0_8.domain.CatalogItem;
28import org.jclouds.trmk.vcloud_0_8.domain.Org;
29 
30import com.google.common.base.Function;
31import com.google.common.collect.Iterables;
32 
33/**
34 * @author Adrian Cole
35 */
36@Singleton
37public class AllCatalogItemsInOrg implements Function<Org, Iterable<? extends CatalogItem>> {
38 
39   @Resource
40   public Logger logger = Logger.NULL;
41 
42   private final Function<Org, Iterable<? extends Catalog>> allCatalogsInOrg;
43 
44   private final Function<Catalog, Iterable<? extends CatalogItem>> allCatalogItemsInCatalog;
45 
46   @Inject
47   AllCatalogItemsInOrg(Function<Org, Iterable<? extends Catalog>> allCatalogsInOrg,
48            Function<Catalog, Iterable<? extends CatalogItem>> allCatalogItemsInCatalog) {
49      this.allCatalogsInOrg = allCatalogsInOrg;
50      this.allCatalogItemsInCatalog = allCatalogItemsInCatalog;
51   }
52 
53   @Override
54   public Iterable<? extends CatalogItem> apply(Org from) {
55      return Iterables.concat(Iterables.transform(allCatalogsInOrg.apply(from),
56               new Function<Catalog, Iterable<? extends CatalogItem>>() {
57                  @Override
58                  public Iterable<? extends CatalogItem> apply(Catalog from) {
59                     return allCatalogItemsInCatalog.apply(from);
60                  }
61 
62               }));
63   }
64}

[all classes][org.jclouds.trmk.vcloud_0_8.functions]
EMMA 2.0.5312 (C) Vladimir Roubtsov