Unsolved
This post is more than 5 years old
2 Posts
0
676
February 19th, 2013 14:00
Creating objects with unique id's
Hi all,
Just wondering if its possible using the Atmos object interface api to create an object with a specific identifier ?
I've been taking a look at the Atmos 2.1.0 java binding and the AtmosApi seems to have a "createObject" interface method that allows the specification of an identifier:
/**
* Creates a new object in the cloud with the specified identifier.
*
* @param identifier The identifier to use for the new object. This may be an ObjectPath or an ObjectKey.
* @param content The initial content of the object. May be appended to later. May be null to create an
* object with no content. The content object can be any object type that is supported by the
* implementation.
* @param contentType the MIME type of the content. Optional, may be null. If null, defaults to
* application/octet-stream.
*
* @return ObjectId of the newly created object.
*/
ObjectId createObject( ObjectIdentifier identifier, Object content, String contentType );
Maybe this method should only be used for creation of object paths ?
Thanks for your help,
Jack.



JasonCwik
281 Posts
0
February 25th, 2013 13:00
That's correct. That version of the createObject method should only be used with an ObjectPath. You cannot use that version to specify an ObjectId.