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( );
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( );
Comments
Tim Mok
JAZZ DEVELOPER unknownCan you show the part where you fetch the file item? Where does that file item handle come from?
Tim Mok
JAZZ DEVELOPER May 22 '13, 3:50 p.m.Can you show the part where you fetch the file item? Where does that file item handle come from?
Bruce Eifler
May 22 '13, 5:02 p.m.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
Bruce Eifler
May 23 '13, 11:28 a.m.The image attach didn't work. lets try using a link =>
RTCSCMIFileItemGetPropertiesProb.rtf
Tim Mok
JAZZ DEVELOPER May 23 '13, 4:05 p.m.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.
Ralph Schoon
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER May 24 '13, 2:57 a.m.If you want to paste code, use [pre] [/pre] (replace the brackets with < and > ) in the HTML Source view (top right button).
Surya Tripathi
Jul 18 '13, 6:11 p.m.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?