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

COVERAGE SUMMARY FOR SOURCE FILE [MutableBlobMetadataImpl.java]

nameclass, %method, %block, %line, %
MutableBlobMetadataImpl.java100% (1/1)50%  (4/8)41%  (22/54)47%  (9/19)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class MutableBlobMetadataImpl100% (1/1)50%  (4/8)41%  (22/54)47%  (9/19)
MutableBlobMetadataImpl (BlobMetadata): void 0%   (0/1)0%   (0/22)0%   (0/6)
getContainer (): String 0%   (0/1)0%   (0/3)0%   (0/1)
getPublicUri (): URI 0%   (0/1)0%   (0/3)0%   (0/1)
setPublicUri (URI): void 0%   (0/1)0%   (0/4)0%   (0/2)
MutableBlobMetadataImpl (): void 100% (1/1)100% (11/11)100% (4/4)
getContentMetadata (): MutableContentMetadata 100% (1/1)100% (3/3)100% (1/1)
setContainer (String): void 100% (1/1)100% (4/4)100% (2/2)
setContentMetadata (MutableContentMetadata): void 100% (1/1)100% (4/4)100% (2/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.blobstore.domain.internal;
20 
21import java.net.URI;
22 
23import org.jclouds.blobstore.domain.Blob;
24import org.jclouds.blobstore.domain.BlobMetadata;
25import org.jclouds.blobstore.domain.MutableBlobMetadata;
26import org.jclouds.blobstore.domain.StorageType;
27import org.jclouds.http.HttpUtils;
28import org.jclouds.io.MutableContentMetadata;
29import org.jclouds.io.payloads.BaseMutableContentMetadata;
30 
31/**
32 * System and user Metadata for the {@link Blob}.
33 * 
34 * @author Adrian Cole
35 */
36public class MutableBlobMetadataImpl extends MutableStorageMetadataImpl implements MutableBlobMetadata {
37   /** The serialVersionUID */
38   private static final long serialVersionUID = -5932618957134612231L;
39   private MutableContentMetadata contentMetadata;
40   private URI publicUri;
41   private String container;
42 
43   public MutableBlobMetadataImpl() {
44      this.setType(StorageType.BLOB);
45      this.contentMetadata = new BaseMutableContentMetadata();
46   }
47 
48   public MutableBlobMetadataImpl(BlobMetadata from) {
49      super(from);
50      this.contentMetadata = new BaseMutableContentMetadata();
51      HttpUtils.copy(from.getContentMetadata(), this.contentMetadata);
52      this.publicUri = from.getPublicUri();
53      this.container = from.getContainer();
54   }
55 
56   /**
57    * {@inheritDoc}
58    */
59   @Override
60   public MutableContentMetadata getContentMetadata() {
61      return contentMetadata;
62   }
63 
64   /**
65    * {@inheritDoc}
66    */
67   @Override
68   public void setContentMetadata(MutableContentMetadata contentMetadata) {
69      this.contentMetadata = contentMetadata;
70   }
71 
72   /**
73    * {@inheritDoc}
74    */
75   @Override
76   public void setPublicUri(URI publicUri) {
77      this.publicUri = publicUri;
78   }
79 
80   /**
81    * {@inheritDoc}
82    */
83   @Override
84   public URI getPublicUri() {
85      return publicUri;
86   }
87 
88   /**
89    * {@inheritDoc}
90    */
91   @Override
92   public String getContainer() {
93      return container;
94   }
95 
96   /**
97    * {@inheritDoc}
98    */
99   @Override
100   public void setContainer(String container) {
101      this.container = container;
102   }
103 
104}

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