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

RTC SCM API IFileItem.getUserProperties() problem

 I am trying to read the user properties of a file.
The file I am using has a known set key/value pair that has been checked into the workspace.
However when I the run the IFileItem.getUserProperties() method it returns a map with no entries.
The elementCount is 0.  What am I doing wrong?

Here is my usage=>

 IItem fileWorkingCopy = fileItem.getWorkingCopy();
Map<String, String> props = ((IFileItem)fileWorkingCopy).getUserProperties( );

0 votes

Comments

Can you show the part where you fetch the file item? Where does that file item handle come from?

Can you show the part where you fetch the file item? Where does that file item handle come from?

I had to attach an image.  There is something about complex code that greys out the "Post comment" button.  It did the same thing when I pasted a java stack trace.  If there is a trick to doing this please let me know.  Thanks 

IFileItem.getProperty.Problem.jpg

The image attach didn't work.  lets try using a link =>
RTCSCMIFileItemGetPropertiesProb.rtf

You likely can't paste the code because some rich formatting on the code is using up the character limit.

It's not clear from your code which configuration you're using to fetch the file item. If the configuration was retrieved before the properties were added, it is fetching the file item as it was in that configuration where it doesn't have the properties.

If you want to paste code, use [pre] [/pre] (replace the brackets with < and > ) in the HTML Source view (top right button).

Could you try calling getUserProperties() immediately after you call setUserProperties() and see if you are able to read those properties? If yes, then there may be something different when you read the properties at a later time. May you are using a different configuration?

showing 5 of 7 show 2 more comments

Be the first one to answer this question!

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: May 22 '13, 1:49 p.m.

Question was seen: 4,048 times

Last updated: Jul 18 '13, 6:11 p.m.

Confirmation Cancel Confirm