Jazz Forum Welcome to the Jazz Community Forum Connect and collaborate with IBM Engineering experts and users

Is a file artifact in RAM given a URL?

Hi,

If I upload a file artifact (e.g. a Word doc) with an asset, can I programmatically by using the RAM API retrieve a URL/link which points to the file?

In the Class Artifact javadoc, there is no getURI() or something like that. There is a getPath(), but path is not the same as URI. I also looked into RAMArtifact class and LocalFileArtifact class and also could not find a getURI() type of method.

Thanks!

0 votes



13 answers

Permanent link
Try something like this:

AssetAttribute ssd = serviceAsset.getAssetAttribute("Service Specification").setValues(new String[]{"<a href=\"myURL\">myLabel</a>"});

0 votes


Permanent link
Try something like this:

AssetAttribute ssd = serviceAsset.getAssetAttribute("Service Specification").setValues(new String[]{"<a>myLabel</a>"});



By using the code above, it works in that I could prove that the value of my attribute has been set (including its label). BUT... for some strange reasons, my attribute is not showing up on the General Details page.

Note: something seems to be wrong with this jazz forum -- the code isn't showing properly even if it is enclosed within the "code" and "/code".

0 votes


Permanent link
Try something like this:

AssetAttribute ssd = serviceAsset.getAssetAttribute("Service Specification").setValues(new String[]{"<a>myLabel</a>"});



By using the code above, it works in that I could prove that the value of my attribute has been set (including its label). BUT... for some strange reasons, my attribute is not showing up on the General Details page.

Note: something seems to be wrong with this jazz forum -- the code isn't showing properly even if it is enclosed within the "code" and "/code".

OK, I figured out why my attribute value wasn't showing on the General Details page -- it is because I need to add code to get the session and use the session to commit my changes. Once I did that, then the code works.

Thanks!

0 votes

1–15 items
page 2of 1 pagesof 2 pages

Your answer

Register or log in to post your answer.

Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.

Search context
Follow this question

By Email: 

Once you sign in you will be able to subscribe for any updates here.

By RSS:

Answers
Answers and Comments
Question details

Question asked: Mar 22 '12, 3:34 p.m.

Question was seen: 16,889 times

Last updated: Mar 22 '12, 3:34 p.m.

Confirmation Cancel Confirm