rendered paste body@Override
public boolean createContactGroup(String newGroupName) {
MetaContactListService service = getMetaContactListService();
MetaContactGroup root = service.getRoot();
Iterator<MetaContactGroup> iterator = root.getSubgroups();
logger.info("Trying to create group: " + newGroupName);
while(iterator.hasNext())
{
MetaContactGroup group = iterator.next();
logger.info("group : " + group.getGroupName());
//don't duplicate groups
if (newGroupName.equalsIgnoreCase(group.getGroupName()));
{
logger.info("groupName: " + newGroupName + " is equal to " + group.getGroupName() );
}
}
//this group doesn't exist, so create it
service.createMetaContactGroup(root, newGroupName);
logger.info("Created group : " + newGroupName);
return true;
}