/**
*
*/
protected static void setupGroups() throws DataAccessException, WikiException {
WikiGroup group = new WikiGroup();
group.setName(WikiGroup.GROUP_ANONYMOUS);
// FIXME - use message key
group
.setDescription("All non-logged in users are automatically assigned to the anonymous group.");
WikiBase.getDataHandler().writeWikiGroup(group);
List<String> anonymousRoles = new ArrayList<String>();
anonymousRoles.add(RoleImpl.ROLE_EDIT_EXISTING.getAuthority());
anonymousRoles.add(RoleImpl.ROLE_EDIT_NEW.getAuthority());
anonymousRoles.add(RoleImpl.ROLE_UPLOAD.getAuthority());
anonymousRoles.add(RoleImpl.ROLE_VIEW.getAuthority());
WikiBase.getDataHandler().writeRoleMapGroup(group.getGroupId(),
group.getName(), anonymousRoles);
group = new WikiGroup();
group.setName(WikiGroup.GROUP_REGISTERED_USER);
// FIXME - use message key
group
.setDescription("All logged in users are automatically assigned to the registered user group.");
WikiBase.getDataHandler().writeWikiGroup(group);
List<String> userRoles = new ArrayList<String>();
userRoles.add(RoleImpl.ROLE_EDIT_EXISTING.getAuthority());
userRoles.add(RoleImpl.ROLE_EDIT_NEW.getAuthority());
userRoles.add(RoleImpl.ROLE_MOVE.getAuthority());
userRoles.add(RoleImpl.ROLE_UPLOAD.getAuthority());
userRoles.add(RoleImpl.ROLE_VIEW.getAuthority());
WikiBase.getDataHandler().writeRoleMapGroup(group.getGroupId(),
group.getName(), userRoles);
}