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( );
showing 5 of 7
show 2 more comments
|
Be the first one to answer this question!
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.
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
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?