It's all about the answers!

Ask a question

How to get component names of a particular Stream?


Surya Raj (17116) | asked Jul 30 '15, 8:11 a.m.
Hello All,
I have 2 questions here.

1.Is it possible to get all components of a Stream? by giving StreamName as input, I need to list all components of a particular Stream.

2.With the Componentname i need to get all filenames of that component.

I tried myself with different ideas but couldn't make it.

kindly post your suggestion on this.

Thanks in advance.

2 answers



permanent link
Ralph Schoon (62.3k33643) | answered Jul 30 '15, 8:19 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER
edited Jul 30 '15, 8:28 a.m.
Try https://jazz.net/forum/questions/202289/on-delivery-of-changeset-how-to-retrieve-component-list-under-a-stream-via-changeset/202299

Or this https://rsjazz.wordpress.com/2013/09/24/managing-workspaces-streams-and-components-using-the-plain-java-client-libraries/ and check the related posts and links provided.

Comments
Surya Raj commented Jul 30 '15, 9:44 a.m.

Hi Ralph,

Thanks for your post. In the link its retrieving all components, but i need to get only the components of a single stream(i.e by giving Stream name as argument).

Kindly correct me if i'm wrong.

Thank you.


Ralph Schoon commented Jul 30 '15, 10:01 a.m.
FORUM ADMINISTRATOR / FORUM MODERATOR / JAZZ DEVELOPER

Have you looked into the code in https://jazz.net/forum/questions/202289/on-delivery-of-changeset-how-to-retrieve-component-list-under-a-stream-via-changeset? That explains how to get it for a stream. It uses server API, but I would assume the client API has also a call like

getComponentsForWorkspace()


Surya Raj commented Jul 31 '15, 2:22 a.m.

Ralph, with the above code i got all UUID's of a stream, still I need to get component names also. With the below code, cant find the component names

IComponent[] components = (IComponent[]) this.getRepositoryItemServiceForScm().fetchItems(componentHandles,
                        IRepositoryItemService.COMPLETE);
Can u help me out in this situation.
Thank you.


Surya Raj commented Jul 31 '15, 2:25 a.m.

Ralph, with the above code i got all UUID's of a stream, still I need to get component names also. With the below code, cant find the component names

IComponent[] components = (IComponent[]) this.getRepositoryItemServiceForScm().fetchItems(componentHandles,
                        IRepositoryItemService.COMPLETE);
Can u help me out in this situation.
Thank you.


permanent link
Shashikant Padur (4.2k27) | answered Jul 30 '15, 11:20 p.m.
JAZZ DEVELOPER
If you are using it in a script then you can also try the scm commandline.
https://jazz.net/library/article/1031
The listing of components and files/folders for a component is at the bottom of the page.

Your answer


Register or to post your answer.