Codota Logo
AtmosObject.getContentMetadata
Code IndexAdd Codota to your IDE (free)

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

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

  • Common ways to obtain AtmosObject
private void myMethod () {
AtmosObject a =
  • Codota IconObject obj;AtmosObject.class.cast(obj)
  • Codota IconAtmosObject.Factory atmosObjectFactory;atmosObjectFactory.create((MutableContentMetadata)null)
  • Codota IconBlobMetadataToObject blobMetadataToObject;Blob blob;blobMetadataToObject.apply(blob.getMetadata())
  • Smart code suggestions by Codota
}
origin: Nextdoor/bender

@Override
public String apply(Object input) {
 checkArgument(checkNotNull(input, "input") instanceof AtmosObject,
    "this function is only valid for AtmosObjects!");
 AtmosObject object = AtmosObject.class.cast(input);
 return checkNotNull(object.getContentMetadata().getName() != null ? object.getContentMetadata().getName()
    : object.getSystemMetadata().getObjectName(), "objectName");
}
origin: apache/jclouds

@Override
public String apply(Object input) {
 checkArgument(checkNotNull(input, "input") instanceof AtmosObject,
    "this function is only valid for AtmosObjects!");
 AtmosObject object = AtmosObject.class.cast(input);
 return checkNotNull(object.getContentMetadata().getName() != null ? object.getContentMetadata().getName()
    : object.getSystemMetadata().getObjectName(), "objectName");
}
origin: io.cloudsoft.jclouds.api/atmos

@Override
public String apply(Object input) {
 checkArgument(checkNotNull(input, "input") instanceof AtmosObject,
    "this function is only valid for AtmosObjects!");
 AtmosObject object = AtmosObject.class.cast(input);
 return checkNotNull(object.getContentMetadata().getName() != null ? object.getContentMetadata().getName()
    : object.getSystemMetadata().getObjectName(), "objectName");
}
origin: org.apache.jclouds.api/atmos

@Override
public String apply(Object input) {
 checkArgument(checkNotNull(input, "input") instanceof AtmosObject,
    "this function is only valid for AtmosObjects!");
 AtmosObject object = AtmosObject.class.cast(input);
 return checkNotNull(object.getContentMetadata().getName() != null ? object.getContentMetadata().getName()
    : object.getSystemMetadata().getObjectName(), "objectName");
}
origin: jclouds/legacy-jclouds

@Override
public String apply(Object input) {
 checkArgument(checkNotNull(input, "input") instanceof AtmosObject,
    "this function is only valid for AtmosObjects!");
 AtmosObject object = AtmosObject.class.cast(input);
 return checkNotNull(object.getContentMetadata().getName() != null ? object.getContentMetadata().getName()
    : object.getSystemMetadata().getObjectName(), "objectName");
}
origin: Nextdoor/bender

/**
* {@inheritDoc}
*/
@Override
public int compareTo(AtmosObject o) {
 if (getContentMetadata().getName() == null)
   return -1;
 return (this == o) ? 0 : getContentMetadata().getName().compareTo(o.getContentMetadata().getName());
}
origin: apache/jclouds

/**
* {@inheritDoc}
*/
@Override
public int compareTo(AtmosObject o) {
 if (getContentMetadata().getName() == null)
   return -1;
 return (this == o) ? 0 : getContentMetadata().getName().compareTo(o.getContentMetadata().getName());
}
origin: jclouds/legacy-jclouds

/**
* {@inheritDoc}
*/
@Override
public int compareTo(AtmosObject o) {
 if (getContentMetadata().getName() == null)
   return -1;
 return (this == o) ? 0 : getContentMetadata().getName().compareTo(o.getContentMetadata().getName());
}
origin: com.amysta.jclouds.api/atmos

/**
* {@inheritDoc}
*/
@Override
public int compareTo(AtmosObject o) {
 if (getContentMetadata().getName() == null)
   return -1;
 return (this == o) ? 0 : getContentMetadata().getName().compareTo(o.getContentMetadata().getName());
}
origin: org.jclouds.api/atmos

/**
* {@inheritDoc}
*/
@Override
public int compareTo(AtmosObject o) {
 if (getContentMetadata().getName() == null)
   return -1;
 return (this == o) ? 0 : getContentMetadata().getName().compareTo(o.getContentMetadata().getName());
}
origin: io.cloudsoft.jclouds.api/atmos

/**
* {@inheritDoc}
*/
@Override
public int compareTo(AtmosObject o) {
 if (getContentMetadata().getName() == null)
   return -1;
 return (this == o) ? 0 : getContentMetadata().getName().compareTo(o.getContentMetadata().getName());
}
origin: org.apache.jclouds.api/atmos

/**
* {@inheritDoc}
*/
@Override
public int compareTo(AtmosObject o) {
 if (getContentMetadata().getName() == null)
   return -1;
 return (this == o) ? 0 : getContentMetadata().getName().compareTo(o.getContentMetadata().getName());
}
origin: jclouds/legacy-jclouds

@Test
public void testCorrectContentMetadataName() throws SecurityException, NoSuchMethodException {
 AtmosObject blob = BLOB_FACTORY.create(null);
 blob.getContentMetadata().setName("foo");
 assertEquals(fn.apply(blob), "foo");
}
origin: apache/jclouds

private void createOrReplaceObject(String name, Object data, HashCode hashCode, String metadataValue) throws Exception {
 // Test PUT with string data, ETag hash, and a piece of metadata
 AtmosObject object = getApi().newObject();
 object.getContentMetadata().setName(name);
 object.setPayload(Payloads.newPayload(data));
 object.getContentMetadata().setContentLength(16L);
 object.getContentMetadata().setContentMD5(hashCode.asBytes());
 object.getContentMetadata().setContentType("text/plain");
 object.getUserMetadata().getMetadata().put("Metadata", metadataValue);
 replaceObject(object);
}
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: apache/jclouds

@Test(timeOut = 5 * 60 * 1000, dependsOnMethods = { "testFileOperations" })
public void testPutZeroLengthBlob() throws Exception {
 AtmosObject object = getApi().newObject();
 object.getContentMetadata().setName("object");
 byte[] payload = new byte[0];
 object.setPayload(Payloads.newPayload(payload));
 object.getContentMetadata().setContentLength(Long.valueOf(payload.length));
 replaceObject(object);
}
origin: jclouds/legacy-jclouds

private void createOrReplaceObject(String name, Object data, String metadataValue) throws Exception {
 // Test PUT with string data, ETag hash, and a piece of metadata
 AtmosObject object = getApi().newObject();
 object.getContentMetadata().setName(name);
 object.setPayload(Payloads.newPayload(data));
 object.getContentMetadata().setContentLength(16l);
 Payloads.calculateMD5(object);
 object.getContentMetadata().setContentType("text/plain");
 object.getUserMetadata().getMetadata().put("Metadata", metadataValue);
 replaceObject(object);
}
org.jclouds.atmos.domainAtmosObjectgetContentMetadata

Popular methods of AtmosObject

  • getPayload
  • getSystemMetadata
  • getUserMetadata
  • setPayload
  • getAllHeaders
  • setAllHeaders

Popular in Java

  • Reactive rest calls using spring rest template
  • runOnUiThread (Activity)
  • getContentResolver (Context)
  • scheduleAtFixedRate (ScheduledExecutorService)
    Creates and executes a periodic action that becomes enabled first after the given initial delay, and
  • FileInputStream (java.io)
    A FileInputStream obtains input bytes from a file in a file system. What files are available depends
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Scanner (java.util)
    A parser that parses a text string of primitive types and strings with the help of regular expressio
  • JPanel (javax.swing)
  • Logger (org.slf4j)
    The main user interface to logging. It is expected that logging takes place through concrete impleme
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now