Package org.jasig.portal.groups

Examples of org.jasig.portal.groups.GroupsException


                query = "%"+query+"%";
                ps = conn.prepareStatement(RDBMPersonSearcher.person_partial_search);
                ups = conn.prepareStatement(RDBMPersonSearcher.user_partial_search);
                break;
              default:
                throw new GroupsException("Unknown search type");
            }
            ps.clearParameters();
            ps.setString(1,query);
            ps.setString(2,query);
            rs = ps.executeQuery();
            //System.out.println(ps.toString());
            while (rs.next()){
              //System.out.println("result");
              uis.clearParameters();
              uis.setString(1,rs.getString(1));
              urs = uis.executeQuery();
              if(urs.next()){
                ar.add(new EntityIdentifier(urs.getString(1),personDef));
              }
            }

            ups.clearParameters();
            ups.setString(1,query);
            uprs = ups.executeQuery();
            while (uprs.next()){
                ar.add(new EntityIdentifier(uprs.getString(1),personDef));
            }
        } catch (SQLException e) {
            throw new GroupsException("RDBMChannelDefSearcher.searchForEntities(): " + ps,e);
        } finally {
            if (rs!=null) RDBMServices.closeResultSet(rs);
            if (urs!=null) RDBMServices.closeResultSet(urs);
            if (uprs!=null) RDBMServices.closeResultSet(uprs);
            if (ps!=null) RDBMServices.closeStatement(ps);
View Full Code Here


              case CONTAINS:
                query = "%"+query+"%";
                ps = conn.prepareStatement(RDBMChannelDefSearcher.partial_search);
                break;
              default:
                throw new GroupsException("Unknown search type");
            }
            try {
              ps.clearParameters();
              ps.setString(1,query);
              ps.setString(2,query);
View Full Code Here

  public IEntity newInstance(String key) throws GroupsException {
    return new EntityImpl(key, null);
  }
  public IEntity newInstance(String key, Class type) throws GroupsException {
    if ( org.jasig.portal.EntityTypes.getEntityTypeID(type) == null )
        { throw new GroupsException("Invalid group type: " + type); }
    return new EntityImpl(key, type);
  }
View Full Code Here

*/
public IEntityNameFinder getNameFinder(Class type) throws GroupsException
{
        IEntityNameFinder finder = (IEntityNameFinder) (getNameFinders().get(type));
        if ( finder == null )
            { throw new GroupsException("Name finder for " + type.getName() + " could not be located."); }
        return finder;
}
View Full Code Here

protected GroupServiceConfiguration getServiceConfiguration() throws GroupsException
{
    try
        { return GroupServiceConfiguration.getConfiguration(); }
    catch (Exception ex)
        { throw new GroupsException("Problem retrieving service configuration", ex);}
}
View Full Code Here

            final EntityIdentifier entityIdentifier = gm.getEntityIdentifier();
            EntityCachingService.getEntityCachingService().remove(entityIdentifier.getType(), entityIdentifier.getKey());
        }
        catch (CachingException ce)
        {
            throw new GroupsException("Problem removing group member " + gm.getKey() + " from cache", ce);
        }
    }
View Full Code Here

    {
        String key = getDistinguishedGroupKey(name);
        return compositeGroupService.findGroup(key);
    }
    catch (Exception ex){
      throw new GroupsException("GroupService.getDistinguishedGroup(): "
            +"could not find key for: " + name,ex);
    }
}
View Full Code Here

    protected IEntityGroup inewGroup(Class type, String serviceName) throws GroupsException
    {
        try
            { return compositeGroupService.newGroup(type, parseServiceName(serviceName)); }
        catch (InvalidNameException ine)
            { throw new GroupsException("GroupService.inewGroup(): invalid service name", ine);}
    }
View Full Code Here

      if ( factoryName == null )
      {
          eMsg = "GroupService.initialize(): No entry for org.jasig.portal.groups.GroupServiceFactory in portal.properties.";
          log.error( eMsg);
          throw new GroupsException(eMsg);
      }

      try
      {
          IGroupServiceFactory groupServiceFactory =
              (IGroupServiceFactory)Class.forName(factoryName).newInstance();
          groupService = groupServiceFactory.newGroupService();
      }
      catch (Exception e)
      {
          eMsg = "GroupService.initialize(): Problem creating groups service...";
          log.error( eMsg, e);
          throw new GroupsException(eMsg, e);
      }
    }
View Full Code Here

        if ( factoryName == null )
        {
            eMsg = "GroupService.initialize(): No entry for CompositeServiceFactory in configuration";
            log.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();
        log.error( eMsg, e);
        throw new GroupsException(eMsg, e);
    }
}
View Full Code Here

TOP

Related Classes of org.jasig.portal.groups.GroupsException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.