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 */
19 package org.jclouds.io;
20
21 import javax.annotation.Nullable;
22
23 import com.google.common.collect.Multimap;
24
25 /**
26 * @author Adrian Cole
27 */
28 public interface MutableContentMetadata extends ContentMetadata {
29 /**
30 * sets properties related to the http headers listed in
31 * {@link ContentMetadata#HTTP_HEADERS}
32 *
33 */
34 void setPropertiesFromHttpHeaders(Multimap<String, String> headers);
35
36 void setContentLength(@Nullable Long contentLength);
37
38 void setContentMD5(@Nullable byte[] md5);
39
40 void setContentType(@Nullable String contentType);
41
42 /**
43 * Set Content Disposition of the payload
44 * <p/>
45 * Not all providers may support it
46 *
47 * @param contentDisposition
48 */
49 void setContentDisposition(@Nullable String contentDisposition);
50
51 /**
52 * Set Content Language of the payload
53 * <p/>
54 * Not all providers may support it
55 *
56 * @param contentLanguage
57 */
58 void setContentLanguage(@Nullable String contentLanguage);
59
60 /**
61 * Set Content Encoding of the payload
62 * <p/>
63 * Not all providers may support it
64 *
65 * @param contentEncoding
66 */
67 void setContentEncoding(@Nullable String contentEncoding);
68
69 }