[opencms-dev] Retrieve groups (7.0.4 code example)

Seth Lenzi lenzi at jimmy.harvard.edu
Thu Jun 19 00:03:46 CEST 2008


Apparently the fully qualified name of the root organizational unit (aka 
"/") is and empty string. This seems to work.

CmsOrgUnitManager oum = OpenCms.getOrgUnitManager();
List groups = oum.getGroups(myCmsObj,"", true);


Seth Lenzi wrote:
> Under OpenCMS 7.0.4 how can one programmatically retrieve all OpenCMS 
> groups? Under the older API I was able to use CmsObject.getGroups() but 
> this is now deprecated. The API now says use 
> OpenCms.getOrgUnitManager().getGroupsForOrganizationalUnit(CmsObject, 
> String, boolean)
> 
> I am not really clear on how to use that function. The second parameter 
> is ouFqn which is "the fully qualified name of the organizational unit 
> to get all principals for". What is this??
> 
> CmsOrgUnitManager oum = OpenCms.getOrgUnitManager();
> List groups = oum.getGroups(myCmsObj, "???", true);
> 
> 



More information about the opencms-dev mailing list