Package org.jasig.portal.groups

Examples of org.jasig.portal.groups.IGroupMember


    * Returns the IGroupMember represented by an Element
    * @param gmElem
    * @return IGroupMember
    */
   public static IGroupMember retrieveGroupMemberForElement (Element gmElem) {
      IGroupMember gm;
      String gmKey = gmElem.getAttribute("key");
      Utility.logMessage("DEBUG", "GroupsManagerXML::retrieveGroupMemberForElement(): About to retrieve group member ("
            + gmElem.getTagName() + " for key: " + gmKey);
      if (gmElem.getTagName().equals(GROUP_TAGNAME)) {
         gm = GroupsManagerXML.retrieveGroup(gmKey);
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

      sr.setName("Search Results");
      sr.setDescription("Search for a " + label + " whose name" + methods[methodInt] + "'" + query + "'");
      sr.setCreatorID("CGroupsManager");
      for (int sub = 0; sub < results.length; sub++) {
         EntityIdentifier entID = results[sub];
         IGroupMember resultGroup = GroupService.getGroupMember(entID);
         sr.addMember(resultGroup);
      }
      Element searchElem = GroupsManagerXML.getGroupMemberXml(sr, true, null, sessionData.getUnrestrictedData());
      searchElem.setAttribute("searchResults", "true");
      model.getDocumentElement().appendChild(searchElem);
View Full Code Here

         Element elem = (org.w3c.dom.Element)nList.item(i);
         if (Utility.areEqual(elem.getAttribute("selected"), "true")) {
            addit = true;
            Iterator gmItr = gmCollection.iterator();
            while (gmItr.hasNext()) {
               IGroupMember ggmm = (IGroupMember)gmItr.next();
               if ((ggmm.getKey().equals(elem.getAttribute("key")))
                        && (ggmm.getType().equals(elem.getAttribute("type")))){
                       addit = false;
                       break;
               }
            }
            if (addit) {
               IGroupMember gm = Utility.retrieveGroupMemberForKeyAndType(elem.getAttribute("key"),elem.getAttribute("type"));
               gmCollection.add(gm);
               Utility.logMessage("DEBUG", "DoneWithSelection::addGroupMemberToCollection(): " +
                     "- adding group member" + elem.getAttribute("key"));
            }
         }
View Full Code Here

   private void addChildrenToGroup (Vector gmCollection, CGroupsManagerSessionData sessionData,
      Element parentElem, Document model) throws Exception {
      //ChannelRuntimeData runtimeData = sessionData.runtimeData;
      Element parent;
      ILockableEntityGroup parentGroup = null;
      IGroupMember childGm = null;
      Element childElem;
      parentGroup = sessionData.lockedGroup;
      Iterator gmItr = gmCollection.iterator();
      while (gmItr.hasNext()) {
         childGm = (IGroupMember) gmItr.next();
View Full Code Here

    * @param key
    * @param type
    * @return an <code>IGroupMember</code> object
    */
   public static IGroupMember retrieveGroupMemberForKeyAndType (String key, String type) {
      IGroupMember gm = null;

      if (type.equals(GROUP_CLASSNAME)) {
         gm = GroupsManagerXML.retrieveGroup(key);
         Utility.logMessage("DEBUG", "Utility::retrieveGroupMemberForKeyAndType(): Retrieved group for Type: = "
               + type + " and key: " + key);
View Full Code Here

    throw new java.lang.UnsupportedOperationException("Method setLocalGroupService() not yet implemented.");
  }
  public boolean contains(IGroupMember gm) throws GroupsException {
    Iterator members = getMembers();
    while (members.hasNext()){
      IGroupMember m = (IGroupMember) members.next();
      if (m.isGroup() && m.getKey().equals(gm.getKey())){
        return true;
      }
    }
    return false;
  }
View Full Code Here

          CGroupsManagerUnrestrictedSessionData ursd = servant.getSessionData().getUnrestrictedData();

            Element rootElem = viewDoc.getDocumentElement();
            try{
                for (int mm = 0; mm< members.length;mm++){
                  IGroupMember mem = members[mm];
                  Element memelem = GroupsManagerXML.getGroupMemberXml(mem,false,null,ursd);
                  memelem.setAttribute("selected","true");
                  rootElem.appendChild(memelem);
                }
            }
View Full Code Here

     * @throws PortalException
     */
     public static IGroupsManagerPermissions getPermissionsPolicy(ChannelStaticData staticData) throws PortalException{
        IGroupsManagerPermissions pp = null;
        IEntityGroup admin = GroupService.getDistinguishedGroup(GroupService.PORTAL_ADMINISTRATORS);
        IGroupMember currUser = org.jasig.portal.services.AuthorizationService.instance().getGroupMember(staticData.getAuthorizationPrincipal());
        boolean isAdminUser = (admin.deepContains(currUser));
        if (isAdminUser)
           pp = GroupsManagerAdminPermissions.getInstance();
        else
           pp = GroupsManagerDefaultPermissions.getInstance();
View Full Code Here

            targets = new HashMap();
            IEntityGroup everyone = GroupService.getDistinguishedGroup(GroupService.EVERYONE);
            targets.put(everyone.getKey(), everyone.getName());
            Iterator allgroups = everyone.getAllMembers();
            while (allgroups.hasNext()) {
               IGroupMember g = (IGroupMember)allgroups.next();
               if (g.isGroup()) {
                  if (targets.get(g.getKey()) == null) {
                     try {
                        targets.put(g.getKey(), ((IEntityGroup)g).getName());
                     } catch (Exception e) {
                        Utility.logMessage("ERROR", "CGroupsManager.init():: unable to add target"
                              + e, e);
                     }
                  }
               }
            }

            IEntityGroup allChans = GroupService.getDistinguishedGroup(GroupService.CHANNEL_CATEGORIES);
            targets.put(allChans.getKey(), allChans.getName());
            Iterator allcgroups = allChans.getAllMembers();
            while (allcgroups.hasNext()) {
               IGroupMember g = (IGroupMember)allcgroups.next();
               if (g.isGroup()) {
                  if (targets.get(g.getKey()) == null) {
                     try {
                        targets.put(g.getKey(), ((IEntityGroup)g).getName());
                     } catch (Exception e) {
                        Utility.logMessage("ERROR", "CGroupsManager.init():: unable to add target"
                              + e, e);
                     }
                  }
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.