Tabnine Logo
AtmosObject.getAllHeaders
Code IndexAdd Tabnine to your IDE (free)

How to use
getAllHeaders
method
in
org.jclouds.atmos.domain.AtmosObject

Best Java code snippets using org.jclouds.atmos.domain.AtmosObject.getAllHeaders (Showing top 20 results out of 315)

origin: jclouds/legacy-jclouds

  public Blob apply(AtmosObject from) {
   if (from == null)
     return null;
   Blob blob = blobFactory.create(object2BlobMd.apply(from));
   blob.setPayload(checkNotNull(from.getPayload(), "payload: " + from));
   HttpUtils.copy(from.getContentMetadata(), blob.getPayload().getContentMetadata());
   blob.setAllHeaders(from.getAllHeaders());
   return blob;
  }
}
origin: org.jclouds.api/atmos

  public Blob apply(AtmosObject from) {
   if (from == null)
     return null;
   Blob blob = blobFactory.create(object2BlobMd.apply(from));
   blob.setPayload(checkNotNull(from.getPayload(), "payload: " + from));
   HttpUtils.copy(from.getContentMetadata(), blob.getPayload().getContentMetadata());
   blob.setAllHeaders(from.getAllHeaders());
   return blob;
  }
}
origin: io.cloudsoft.jclouds.api/atmos

  public Blob apply(AtmosObject from) {
   if (from == null)
     return null;
   Blob blob = blobFactory.create(object2BlobMd.apply(from));
   blob.setPayload(checkNotNull(from.getPayload(), "payload: " + from));
   HttpUtils.copy(from.getContentMetadata(), blob.getPayload().getContentMetadata());
   blob.setAllHeaders(from.getAllHeaders());
   return blob;
  }
}
origin: com.amysta.jclouds.api/atmos

  public Blob apply(AtmosObject from) {
   if (from == null)
     return null;
   Blob blob = blobFactory.create(object2BlobMd.apply(from));
   blob.setPayload(checkNotNull(from.getPayload(), "payload: " + from));
   HttpUtils.copy(from.getContentMetadata(), blob.getPayload().getContentMetadata());
   blob.setAllHeaders(from.getAllHeaders());
   return blob;
  }
}
origin: org.apache.jclouds.api/atmos

  public Blob apply(AtmosObject from) {
   if (from == null)
     return null;
   Blob blob = blobFactory.create(object2BlobMd.apply(from));
   blob.setPayload(checkNotNull(from.getPayload(), "payload: " + from));
   HttpUtils.copy(from.getContentMetadata(), blob.getPayload().getContentMetadata());
   blob.setAllHeaders(from.getAllHeaders());
   return blob;
  }
}
origin: Nextdoor/bender

  public Blob apply(AtmosObject from) {
   if (from == null)
     return null;
   Blob blob = blobFactory.create(object2BlobMd.apply(from));
   blob.setPayload(checkNotNull(from.getPayload(), "payload: " + from));
   HttpUtils.copy(from.getContentMetadata(), blob.getPayload().getContentMetadata());
   blob.setAllHeaders(from.getAllHeaders());
   return blob;
  }
}
origin: apache/jclouds

  public Blob apply(AtmosObject from) {
   if (from == null)
     return null;
   Blob blob = blobFactory.create(object2BlobMd.apply(from));
   blob.setPayload(checkNotNull(from.getPayload(), "payload: " + from));
   HttpUtils.copy(from.getContentMetadata(), blob.getPayload().getContentMetadata());
   blob.setAllHeaders(from.getAllHeaders());
   return blob;
  }
}
origin: Nextdoor/bender

  public MutableBlobMetadata apply(AtmosObject from) {
   if (from == null)
     return null;
   MutableBlobMetadata to = new MutableBlobMetadataImpl();
   to.setId(from.getSystemMetadata().getObjectID());
   to.setLastModified(from.getSystemMetadata().getLastUserDataModification());
   HttpUtils.copy(from.getContentMetadata(), to.getContentMetadata());
   to.setName(objectName.apply(from));
   to.setUri(from.getContentMetadata().getUri());
   to.setContainer(Iterables.get(Splitter.on('/').split(from.getContentMetadata().getPath()), 0));
   if (from.getAllHeaders().containsEntry("x-emc-groupacl", "other=READ"))
     to.setPublicUri(shareUrl.apply(from.getContentMetadata().getPath()));
   if (from.getSystemMetadata().getType() == FileType.DIRECTORY) {
     to.setType(StorageType.FOLDER);
   } else {
     to.setType(StorageType.BLOB);
   }
   Map<String, String> lowerKeyMetadata = Maps.newHashMap();
   for (Entry<String, String> entry : from.getUserMetadata().getMetadata().entrySet()) {
     String key = entry.getKey().toLowerCase();
     if (!systemMetadata.contains(key))
      lowerKeyMetadata.put(key, entry.getValue());
   }
   to.setUserMetadata(lowerKeyMetadata);
   to.setSize(from.getContentMetadata().getContentLength());
   return to;
  }
}
origin: jclouds/legacy-jclouds

  public MutableBlobMetadata apply(AtmosObject from) {
   if (from == null)
     return null;
   MutableBlobMetadata to = new MutableBlobMetadataImpl();
   to.setId(from.getSystemMetadata().getObjectID());
   to.setLastModified(from.getSystemMetadata().getLastUserDataModification());
   HttpUtils.copy(from.getContentMetadata(), to.getContentMetadata());
   to.setName(objectName.apply(from));
   to.setUri(from.getContentMetadata().getUri());
   to.setContainer(Iterables.get(Splitter.on('/').split(from.getContentMetadata().getPath()),0));
   if (from.getAllHeaders().containsEntry("x-emc-groupacl", "other=READ"))
     to.setPublicUri(shareUrl.apply(from.getContentMetadata().getPath()));
   if (from.getSystemMetadata().getType() == FileType.DIRECTORY) {
     to.setType(StorageType.FOLDER);
   } else {
     to.setType(StorageType.BLOB);
   }
   Map<String, String> lowerKeyMetadata = Maps.newHashMap();
   for (Entry<String, String> entry : from.getUserMetadata().getMetadata().entrySet()) {
     String key = entry.getKey().toLowerCase();
     if (!systemMetadata.contains(key))
      lowerKeyMetadata.put(key, entry.getValue());
   }
   to.setUserMetadata(lowerKeyMetadata);
   return to;
  }
}
origin: org.jclouds.api/atmos

  public MutableBlobMetadata apply(AtmosObject from) {
   if (from == null)
     return null;
   MutableBlobMetadata to = new MutableBlobMetadataImpl();
   to.setId(from.getSystemMetadata().getObjectID());
   to.setLastModified(from.getSystemMetadata().getLastUserDataModification());
   HttpUtils.copy(from.getContentMetadata(), to.getContentMetadata());
   to.setName(objectName.apply(from));
   to.setUri(from.getContentMetadata().getUri());
   to.setContainer(Iterables.get(Splitter.on('/').split(from.getContentMetadata().getPath()),0));
   if (from.getAllHeaders().containsEntry("x-emc-groupacl", "other=READ"))
     to.setPublicUri(shareUrl.apply(from.getContentMetadata().getPath()));
   if (from.getSystemMetadata().getType() == FileType.DIRECTORY) {
     to.setType(StorageType.FOLDER);
   } else {
     to.setType(StorageType.BLOB);
   }
   Map<String, String> lowerKeyMetadata = Maps.newHashMap();
   for (Entry<String, String> entry : from.getUserMetadata().getMetadata().entrySet()) {
     String key = entry.getKey().toLowerCase();
     if (!systemMetadata.contains(key))
      lowerKeyMetadata.put(key, entry.getValue());
   }
   to.setUserMetadata(lowerKeyMetadata);
   return to;
  }
}
origin: io.cloudsoft.jclouds.api/atmos

  public MutableBlobMetadata apply(AtmosObject from) {
   if (from == null)
     return null;
   MutableBlobMetadata to = new MutableBlobMetadataImpl();
   to.setId(from.getSystemMetadata().getObjectID());
   to.setLastModified(from.getSystemMetadata().getLastUserDataModification());
   HttpUtils.copy(from.getContentMetadata(), to.getContentMetadata());
   to.setName(objectName.apply(from));
   to.setUri(from.getContentMetadata().getUri());
   to.setContainer(Iterables.get(Splitter.on('/').split(from.getContentMetadata().getPath()),0));
   if (from.getAllHeaders().containsEntry("x-emc-groupacl", "other=READ"))
     to.setPublicUri(shareUrl.apply(from.getContentMetadata().getPath()));
   if (from.getSystemMetadata().getType() == FileType.DIRECTORY) {
     to.setType(StorageType.FOLDER);
   } else {
     to.setType(StorageType.BLOB);
   }
   Map<String, String> lowerKeyMetadata = Maps.newHashMap();
   for (Entry<String, String> entry : from.getUserMetadata().getMetadata().entrySet()) {
     String key = entry.getKey().toLowerCase();
     if (!systemMetadata.contains(key))
      lowerKeyMetadata.put(key, entry.getValue());
   }
   to.setUserMetadata(lowerKeyMetadata);
   return to;
  }
}
origin: com.amysta.jclouds.api/atmos

  public MutableBlobMetadata apply(AtmosObject from) {
   if (from == null)
     return null;
   MutableBlobMetadata to = new MutableBlobMetadataImpl();
   to.setId(from.getSystemMetadata().getObjectID());
   to.setLastModified(from.getSystemMetadata().getLastUserDataModification());
   HttpUtils.copy(from.getContentMetadata(), to.getContentMetadata());
   to.setName(objectName.apply(from));
   to.setUri(from.getContentMetadata().getUri());
   to.setContainer(Iterables.get(Splitter.on('/').split(from.getContentMetadata().getPath()), 0));
   if (from.getAllHeaders().containsEntry("x-emc-groupacl", "other=READ"))
     to.setPublicUri(shareUrl.apply(from.getContentMetadata().getPath()));
   if (from.getSystemMetadata().getType() == FileType.DIRECTORY) {
     to.setType(StorageType.FOLDER);
   } else {
     to.setType(StorageType.BLOB);
   }
   Map<String, String> lowerKeyMetadata = Maps.newHashMap();
   for (Entry<String, String> entry : from.getUserMetadata().getMetadata().entrySet()) {
     String key = entry.getKey().toLowerCase();
     if (!systemMetadata.contains(key))
      lowerKeyMetadata.put(key, entry.getValue());
   }
   to.setUserMetadata(lowerKeyMetadata);
   to.setSize(from.getContentMetadata().getContentLength());
   return to;
  }
}
origin: jclouds/legacy-jclouds

/**
* First, calls {@link ParseSystemAndUserMetadataFromHeaders}.
* 
* Then, sets the object size based on the Content-Length header and adds the content to the
* {@link AtmosObject} result.
* 
* @throws org.jclouds.http.HttpException
*/
public AtmosObject apply(HttpResponse from) {
 checkNotNull(from, "http response");
 AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
 object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
 object.getContentMetadata().setPath(path);
 object.getContentMetadata().setUri(uri);
 object.getAllHeaders().putAll(from.getHeaders());
 object.setPayload(from.getPayload());
 object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
 return object;
}
origin: Nextdoor/bender

/**
* First, calls {@link ParseSystemAndUserMetadataFromHeaders}.
* 
* Then, sets the object size based on the Content-Length header and adds the content to the
* {@link AtmosObject} result.
* 
* @throws org.jclouds.http.HttpException
*/
public AtmosObject apply(HttpResponse from) {
 checkNotNull(from, "http response");
 AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
 object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
 object.getContentMetadata().setPath(path);
 object.getContentMetadata().setUri(uri);
 object.getAllHeaders().putAll(from.getHeaders());
 object.setPayload(from.getPayload());
 object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
 return object;
}
origin: org.jclouds.api/atmos

/**
* First, calls {@link ParseSystemAndUserMetadataFromHeaders}.
* 
* Then, sets the object size based on the Content-Length header and adds the content to the
* {@link AtmosObject} result.
* 
* @throws org.jclouds.http.HttpException
*/
public AtmosObject apply(HttpResponse from) {
 checkNotNull(from, "http response");
 AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
 object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
 object.getContentMetadata().setPath(path);
 object.getContentMetadata().setUri(uri);
 object.getAllHeaders().putAll(from.getHeaders());
 object.setPayload(from.getPayload());
 object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
 return object;
}
origin: apache/jclouds

to.setUri(from.getContentMetadata().getUri());
to.setContainer(Iterables.get(Splitter.on('/').split(from.getContentMetadata().getPath()), 0));
if (from.getAllHeaders().containsEntry("x-emc-groupacl", "other=READ"))
  to.setPublicUri(shareUrl.apply(from.getContentMetadata().getPath()));
if (from.getSystemMetadata().getType() == FileType.DIRECTORY) {
origin: io.cloudsoft.jclouds.api/atmos

/**
* First, calls {@link ParseSystemAndUserMetadataFromHeaders}.
* 
* Then, sets the object size based on the Content-Length header and adds the content to the
* {@link AtmosObject} result.
* 
* @throws org.jclouds.http.HttpException
*/
public AtmosObject apply(HttpResponse from) {
 checkNotNull(from, "http response");
 AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
 object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
 object.getContentMetadata().setPath(path);
 object.getContentMetadata().setUri(uri);
 object.getAllHeaders().putAll(from.getHeaders());
 object.setPayload(from.getPayload());
 object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
 return object;
}
origin: com.amysta.jclouds.api/atmos

/**
* First, calls {@link ParseSystemAndUserMetadataFromHeaders}.
* 
* Then, sets the object size based on the Content-Length header and adds the content to the
* {@link AtmosObject} result.
* 
* @throws org.jclouds.http.HttpException
*/
public AtmosObject apply(HttpResponse from) {
 checkNotNull(from, "http response");
 AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
 object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
 object.getContentMetadata().setPath(path);
 object.getContentMetadata().setUri(uri);
 object.getAllHeaders().putAll(from.getHeaders());
 object.setPayload(from.getPayload());
 object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
 return object;
}
origin: org.apache.jclouds.api/atmos

/**
* First, calls {@link ParseSystemAndUserMetadataFromHeaders}.
* 
* Then, sets the object size based on the Content-Length header and adds the content to the
* {@link AtmosObject} result.
* 
* @throws org.jclouds.http.HttpException
*/
public AtmosObject apply(HttpResponse from) {
 checkNotNull(from, "http response");
 AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
 object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
 object.getContentMetadata().setPath(path);
 object.getContentMetadata().setUri(uri);
 object.getAllHeaders().putAll(from.getHeaders());
 object.setPayload(from.getPayload());
 object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
 object.getContentMetadata().setContentMD5(object.getSystemMetadata().getContentMD5());
 return object;
}
origin: apache/jclouds

/**
* First, calls {@link ParseSystemAndUserMetadataFromHeaders}.
* 
* Then, sets the object size based on the Content-Length header and adds the content to the
* {@link AtmosObject} result.
* 
* @throws org.jclouds.http.HttpException
*/
public AtmosObject apply(HttpResponse from) {
 checkNotNull(from, "http response");
 AtmosObject object = objectProvider.create(systemMetadataParser.apply(from), userMetadataParser.apply(from));
 object.getContentMetadata().setName(object.getSystemMetadata().getObjectName());
 object.getContentMetadata().setPath(path);
 object.getContentMetadata().setUri(uri);
 object.getAllHeaders().putAll(from.getHeaders());
 object.setPayload(from.getPayload());
 object.getContentMetadata().setContentLength(attemptToParseSizeAndRangeFromHeaders(from));
 object.getContentMetadata().setContentMD5(object.getSystemMetadata().getContentMD5());
 return object;
}
org.jclouds.atmos.domainAtmosObjectgetAllHeaders

Popular methods of AtmosObject

  • getContentMetadata
  • getPayload
  • getSystemMetadata
  • getUserMetadata
  • setPayload
  • setAllHeaders

Popular in Java

  • Reactive rest calls using spring rest template
  • scheduleAtFixedRate (ScheduledExecutorService)
  • getResourceAsStream (ClassLoader)
  • setContentView (Activity)
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URL (java.net)
    A Uniform Resource Locator that identifies the location of an Internet resource as specified by RFC
  • Timestamp (java.sql)
    A Java representation of the SQL TIMESTAMP type. It provides the capability of representing the SQL
  • Notification (javax.management)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • 21 Best Atom Packages for 2021
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now