Is there a wiki site for RTC API examples?
The forum is a huge help as well as Ralph's blog and an occasional hit on another blog here or there. However, it's still extremely time consuming to sort through all the "close matches", partial answers, and/or wrong and non-answers in order to find out how to do something like, oh, I don't know, load a workspace into a sandbox.
The developer wiki is sort of nice but sadly out dated.
Does it exist or would it be possible to get a wiki on the Jazz site that users could use where we could create an almanac of RTC plain Java API sample snippets? I think with the right skeleton (something flat and easily navigated) it could become a nice resource for learning and working with the API. It would be nice to have a standard format such as:
Title: Creating a workspace
Description: Creating a new workspace seeded from a stream configuration
Links:
- Other useful links
- To forum posts
- Blogs
- Etc
Snippet:
public IWorkspaceConnection createWorkspace(String srcstream, String wspacename) throws RtcException {This is not a great example because it has some of my own local wrappers built-in, but there might be guidelines that suggest to minimize logging, un-referenced method calls, etc.
IWorkspaceConnection workspace = null;
String description = String.format("%s created from stream %s as of %tr",wspacename,srcstream,new Date());
try {
// try to see if this ws exists
workspace = getWorkspace(wspacename);
if(workspace!=null){
log.warn("Workspace seems to have already existed!");
} else {
log.debug("Trying to create {} from stream {}",wspacename,srcstream);
// get stream configuration
IWorkspaceConnection streamspace = WorkspaceUtility.getWorkspace(session, RtcSelector.stream, srcstream);
workspace = SCMPlatform.getWorkspaceManager(session.getRepo()).createWorkspace(session.getRepo().loggedInContributor(), wspacename, description, streamspace, streamspace, session.getMonitor());
}
} catch (TeamRepositoryException e) {
throw new RtcException("Could not create workspace",e);
}
return workspace;
}
Thoughts?
Andy
Accepted answer
Comments
My blog is far from the ralph's blog, but I share some usefull code and tips.
1 vote
The concern is that IBM can be sued by copyright trolls big time and a process to review and clean everything is just impractical.
What you can do is to post it to a private blog and maybe leave the sources in a public Dev Ops services project/Bluemix project or provide the link e.g. using Dropbox or some other download site (that is what I do).
If you do, let me know, I try to collect links and repost etc. on my blog to make them easier to search.
Tiago, I added your blog me to my "More Jazz Blogs". If you disagree, please let me know
Yes, I'm a big consumer of your blog, Ralph, thank you very much, it's an awesome resource!
Tiago, now that you give me the link I realize I've used that source many times I just never realized it was a blog;) It integrates nicely into DW. Ha, good stuff for sure!
Ok, I am saying this question is answered but the answer is essentially "no", there is not a snippet reference wiki site. The blogs I consider more in-depth which are obviously extremely valuable but I am still looking for more of a simple almanac, i.e., snippet index. I'll investigate some kind of private approach. Thanks for your help!
I have given up on it. we have asked for something like that but could never get an agreement. Either it is IBM only or it is not on IBM sites.