Package org.jasig.portal.groups

Examples of org.jasig.portal.groups.IGroupMember


{
    if (log.isDebugEnabled())
        log.debug( "AuthorizationImpl.getGroupMemberForPrincipal(): for principal " +
                principal);

    IGroupMember gm = GroupService.getGroupMember(principal.getKey(), principal.getType());

    if (log.isDebugEnabled())
        log.debug("AuthorizationImpl.getGroupMemberForPrincipal(): " +
                "got group member " + gm);
View Full Code Here


* @return java.util.Iterator over Collection of IEntityGroups
*/
private Iterator getGroupsForPrincipal(IAuthorizationPrincipal principal)
throws GroupsException
{
    IGroupMember gm = getGroupMemberForPrincipal(principal);
    return gm.getAllContainingGroups();
}
View Full Code Here

     */
    public boolean isUserInRole(String role) {       
        boolean isUserInRole = super.isUserInRole(role);
        try {
            if (!isUserInRole && person != null) {
                IGroupMember user = GroupService.getGroupMember(person.getEntityIdentifier());
                IGroupMember groupForRole = GroupService.getGroupMember(role, IEntityGroup.class);
                if (groupForRole != null) {
                    isUserInRole = user.isDeepMemberOf(groupForRole);
                    if (!isUserInRole) {
                        SecurityRoleRef securityRoleRef = securityRoleRefs.get(role);
                        if (securityRoleRef != null) {
                            String roleLink = securityRoleRef.getRoleLink();
                            IGroupMember groupForRoleLink = GroupService.getGroupMember(roleLink, IEntityGroup.class);
                            if (groupForRoleLink != null) {
                                isUserInRole = user.isDeepMemberOf(groupForRoleLink);
                            }
                        }
                    }
View Full Code Here

  public String getProperty(EntityIdentifier entityID, String name) {
    String r = null;
    try{
      StringBuffer buf = new StringBuffer();
      if (name.equals(names[0])){
        IGroupMember gm = GroupService.getGroupMember(entityID);
        Iterator i = gm.getContainingGroups();
        int x = 0;
        while (i.hasNext()){
          if (x > 0){
            buf.append(", ");
          }
View Full Code Here

   if ( !(layoutStore instanceof IAggregatedUserLayoutStore) )
     throw new PortalException ( "The layout store must have type IAggregatedUserLayoutStore!");
  IAggregatedUserLayoutStore store = (IAggregatedUserLayoutStore) layoutStore; 
 
  EntityIdentifier personIdentifier = person.getEntityIdentifier();
    IGroupMember groupPerson = GroupService.getGroupMember(personIdentifier);
   
    int[] result = new int[] { DEFAULT_MIN_PRIORITY, DEFAULT_MAX_PRIORITY };
   
    for ( Iterator groups = groupPerson.getAllContainingGroups(); groups.hasNext(); ) {
      IEntityGroup group = (IEntityGroup) groups.next();
      int[] range = store.getPriorityRange(group.getKey());
      if ( range.length == 2 ) {
          if ( result[0] > range[0] )
            result[0] = range[0];
View Full Code Here

    String pushFragmentIds = null;

  try {

       EntityIdentifier personIdentifier = person.getEntityIdentifier();
       IGroupMember groupPerson = GroupService.getGroupMember(personIdentifier);


        con = RDBMServices.getConnection();
        RDBMServices.setAutoCommit(con,false);

        layoutData = new Hashtable(50);


       Iterator containingGroups = groupPerson.getAllContainingGroups();

       if ( containingGroups.hasNext() ) {
        //Connection extraCon = RDBMServices.getConnection();

        // Getting push-fragments based on a group key parameter
View Full Code Here

           permitted = true;
         rs.close()
          
         if ( !permitted ) { 
           EntityIdentifier personIdentifier = person.getEntityIdentifier();
           IGroupMember groupPerson = GroupService.getGroupMember(personIdentifier);
           query = "SELECT GROUP_KEY FROM UP_GROUP_FRAGMENT WHERE FRAGMENT_ID="+fragmentId;
           rs = stmt.executeQuery(query);
           while ( rs.next() ) {   
            IEntityGroup group = GroupService.findGroup(rs.getString(1));
            if ( group != null && groupPerson.isDeepMemberOf(group) ) {
              permitted = true;
              break;   
            }              
           }
            rs.close();
View Full Code Here

  int layoutId = profile.getLayoutId();
  Set incorrectIds = new HashSet();
  Set correctIds = new HashSet();
  Connection con = RDBMServices.getConnection();
  try {
    IGroupMember groupPerson = null;
    String query1 = "SELECT ULS.FRAGMENT_ID,ULS.NODE_ID,UGF.GROUP_KEY FROM UP_LAYOUT_STRUCT_AGGR ULS,UP_OWNER_FRAGMENT UOF,UP_GROUP_FRAGMENT UGF WHERE "+
    "UOF.PUSHED_FRAGMENT='Y' AND ULS.USER_ID="+userId+" AND ULS.LAYOUT_ID="+layoutId+" AND ULS.FRAGMENT_ID=UOF.FRAGMENT_ID AND ULS.FRAGMENT_ID=UGF.FRAGMENT_ID";
    Statement stmt = con.createStatement();
    ResultSet rs = stmt.executeQuery(query1);
    Set groupKeys = new HashSet();

    while ( rs.next() ) {
     if ( groupPerson == null ) {
      EntityIdentifier personIdentifier = person.getEntityIdentifier();
      groupPerson = GroupService.getGroupMember(personIdentifier);
     }
      String nodeId = rs.getInt(2)+"";
      String groupKey = rs.getString(3);
      if ( !correctIds.contains(nodeId) ) {
       boolean isGroupKey = groupKeys.contains(groupKey);  
       if( !isGroupKey ) {
        IEntityGroup group = GroupService.findGroup(groupKey);
        if ( group == null || !groupPerson.isDeepMemberOf(group) ) {
         if ( !incorrectIds.contains(nodeId) )
           incorrectIds.add(nodeId);
         groupKeys.add(groupKey);
        } else {
           correctIds.add(nodeId);
View Full Code Here

      */
  public Collection getSubscribableFragments(IPerson person) throws PortalException {
    Set fragmentIds = new HashSet();
    Connection con = RDBMServices.getConnection();
    try {
     IGroupMember groupPerson = null;
     String query1 = "SELECT UGF.FRAGMENT_ID,UGF.GROUP_KEY FROM UP_GROUP_FRAGMENT UGF, UP_OWNER_FRAGMENT UOF WHERE UOF.FRAGMENT_ID=UGF.FRAGMENT_ID" +
     " AND UOF.PUSHED_FRAGMENT='N'";
     Statement stmt = con.createStatement();
     ResultSet rs = stmt.executeQuery(query1);
     Set groupKeys = new HashSet();

     while ( rs.next() ) {
      if ( groupPerson == null ) {
       EntityIdentifier personIdentifier = person.getEntityIdentifier();
       groupPerson = GroupService.getGroupMember(personIdentifier);
      }
       int fragmentId = rs.getInt(1);
       String groupKey = rs.getString(2);
       String fragStrId = Integer.toString(fragmentId);
       if ( !fragmentIds.contains(fragStrId) ) {
        if ( groupKeys.contains(groupKey) )
          fragmentIds.add(fragStrId);
        else {
         IEntityGroup group = GroupService.findGroup(groupKey);
         if ( group != null && groupPerson.isDeepMemberOf(group) ) {
          fragmentIds.add(fragStrId);
          groupKeys.add(groupKey);
         }
        }
       }
View Full Code Here

      ChannelRuntimeData runtimeData = sessionData.runtimeData;
      Utility.logMessage("DEBUG", "RemoveMember::execute(): Start");
      Document model = getXmlDoc(sessionData);
      String cmdIds = getCommandArg(runtimeData);
      Object parentGroup = null;
      IGroupMember childGm = null;
      String hasMbrs = "duh";
      Utility.logMessage("DEBUG", "RemoveMember::execute(): About to get parent and child keys");
      String parentID = Utility.parseStringDelimitedBy("parent.", cmdIds, "|");
      String childID = Utility.parseStringDelimitedBy("child.", cmdIds, "|");
      Utility.logMessage("DEBUG", "RemoveMember::execute(): Uid of parent element = "
View Full Code Here

TOP

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

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.