Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Cssdk getting users from a group of teamsite
ravisankar
Hi,
I am working on workflow where there is a requirement as to get the users of a group in teamsite, i know the group name i am using it in an external java code i am using cssdk in that, i need to get group users into myarray[].I checked CSSDK API for CSGroup but didnt find any method for my problem.
If someone can help plz do reply..my code is..
CSClient client = null;
if ((null != vpath) && (!("".equals(vpath)))) {
try {
client = CSClientUtil.getCSClient((String) sessionId, params);
} catch (Exception e) {
e.printStackTrace();
}
}
if (client != null) {
try {
CSVPath currentVpath = new CSVPath(vpath);
CSUser current_user = client.getCurrentUser();
CSGroup group_obj=client.getGroup(groupName,true);
String currentUserName=current_user.getName();
try {
String[] myarray =
//i need a method to get users from the group and place in this array.
help me ...
Find more posts tagged with
Comments
Rick Poulin
The CSGroup object has a method getUsers(boolean recursive) that returns a CSIterator of CSUser objects. From the CSIterator, you can get the object count (size) to initialize your array, and then loop through the iterator contents to add them one by one (or use a different data structure).