Search in sources :

Example 1 with ICompositeGroupServiceFactory

use of org.apereo.portal.groups.ICompositeGroupServiceFactory in project uPortal by Jasig.

the class GroupService method initializeCompositeService.

/** @exception GroupsException */
private void initializeCompositeService() throws GroupsException {
    String eMsg = null;
    try {
        GroupServiceConfiguration cfg = getServiceConfiguration();
        String factoryName = (String) cfg.getAttributes().get("compositeFactory");
        if (factoryName == null) {
            eMsg = "GroupService.initialize(): No entry for CompositeServiceFactory in configuration";
            LOGGER.error(eMsg);
            throw new GroupsException(eMsg);
        }
        ICompositeGroupServiceFactory serviceFactory = (ICompositeGroupServiceFactory) Class.forName(factoryName).newInstance();
        compositeGroupService = serviceFactory.newGroupService();
    } catch (Exception e) {
        eMsg = "GroupService.initialize(): Problem creating groups service... " + e.getMessage();
        LOGGER.error(eMsg, e);
        throw new GroupsException(eMsg, e);
    }
}
Also used : GroupServiceConfiguration(org.apereo.portal.groups.GroupServiceConfiguration) GroupsException(org.apereo.portal.groups.GroupsException) ICompositeGroupServiceFactory(org.apereo.portal.groups.ICompositeGroupServiceFactory) CachingException(org.apereo.portal.concurrency.CachingException) InvalidNameException(javax.naming.InvalidNameException) GroupsException(org.apereo.portal.groups.GroupsException)

Aggregations

InvalidNameException (javax.naming.InvalidNameException)1 CachingException (org.apereo.portal.concurrency.CachingException)1 GroupServiceConfiguration (org.apereo.portal.groups.GroupServiceConfiguration)1 GroupsException (org.apereo.portal.groups.GroupsException)1 ICompositeGroupServiceFactory (org.apereo.portal.groups.ICompositeGroupServiceFactory)1