Obtain file given stream and itemID (API)
2 answers
if you have the item (file/versionable) UUID you can get is item handle via (for example)
see accepted answer here
https://jazz.net/forum/questions/94538/get-iversionablehandle-from-uuid
as for which stream (or workspace) that versionable might be in? yeesh..
IItemHandle handle = IComponent.ITEM_TYPE.createHandle(uuid, null);
see accepted answer here
https://jazz.net/forum/questions/94538/get-iversionablehandle-from-uuid
as for which stream (or workspace) that versionable might be in? yeesh..
From your stream, get your IWorkspaceConnection.
Using connection.configuration(IComponentHandle) will get you your configuration based on the component where your file resides.
Then call #fetchCompleteItem on your configuration. Give it the handle that you've obtained with the method Sam described. That will give you a versionable with state that represents the file in the stream. If you get just the handle, it has no state and refers to the item in a general sense.
Using connection.configuration(IComponentHandle) will get you your configuration based on the component where your file resides.
Then call #fetchCompleteItem on your configuration. Give it the handle that you've obtained with the method Sam described. That will give you a versionable with state that represents the file in the stream. If you get just the handle, it has no state and refers to the item in a general sense.