All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.storage.contrib.nio.CloudStorageFileAttributes Maven / Gradle / Ivy

There is a newer version: 0.2.8
Show newest version
/*
 * Copyright 2016 Google Inc. All Rights Reserved.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.google.cloud.storage.contrib.nio;

import com.google.cloud.storage.Acl;
import com.google.common.base.Optional;
import com.google.common.collect.ImmutableMap;

import java.nio.file.attribute.BasicFileAttributes;
import java.util.List;

/**
 * Interface for attributes on a Cloud Storage file or pseudo-directory.
 */
public interface CloudStorageFileAttributes extends BasicFileAttributes {

  /**
   * Returns HTTP etag hash of object contents.
   *
   * @see "https://developers.google.com/storage/docs/hashes-etags"
   */
  Optional etag();

  /**
   * Returns mime type (e.g. text/plain), if set.
   *
   * @see "http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types"
   */
  Optional mimeType();

  /**
   * Returns access control list.
   *
   * @see "https://developers.google.com/storage/docs/reference-headers#acl"
   */
  Optional> acl();

  /**
   * Returns {@code Cache-Control} HTTP header value, if set.
   *
   * @see "https://developers.google.com/storage/docs/reference-headers#cachecontrol"
   */
  Optional cacheControl();

  /**
   * Returns {@code Content-Encoding} HTTP header value, if set.
   *
   * @see "https://developers.google.com/storage/docs/reference-headers#contentencoding"
   */
  Optional contentEncoding();

  /**
   * Returns {@code Content-Disposition} HTTP header value, if set.
   *
   * @see "https://developers.google.com/storage/docs/reference-headers#contentdisposition"
   */
  Optional contentDisposition();

  /**
   * Returns user-specified metadata.
   *
   * @see "https://developers.google.com/storage/docs/reference-headers#contentdisposition"
   */
  ImmutableMap userMetadata();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy