Package java.security.acl

Examples of java.security.acl.Group.members()


      {
         Principal p = principals[n];
         if( p instanceof Group )
         {
            Group g = (Group) p;
            Enumeration<? extends Principal> iter = g.members();
            while( iter.hasMoreElements() )
            {
               p = (Principal) iter.nextElement();
               String name = p.getName();
               principalNames.add(name);
View Full Code Here


/*  96 */       Group group = (Group)this.roleGroups.get(roleGroup);
/*  97 */       String[] names = new String[0];
/*  98 */       if (group != null)
/*     */       {
/* 100 */         ArrayList tmp = new ArrayList();
/* 101 */         Enumeration iter = group.members();
/* 102 */         while (iter.hasMoreElements())
/*     */         {
/* 104 */           Principal p = (Principal)iter.nextElement();
/* 105 */           tmp.add(p.getName());
/*     */         }
View Full Code Here

/*     */     {
/* 725 */       Group grp = (Group)iter.next();
/* 726 */       String name = grp.getName();
/* 727 */       if (name.equals("CallerPrincipal"))
/*     */       {
/* 729 */         Enumeration members = grp.members();
/* 730 */         if (members.hasMoreElements()) {
/* 731 */           DomainInfo.access$002(info, (Principal)members.nextElement());
/*     */         }
/*     */
/*     */       }
View Full Code Here

/*     */     {
/* 111 */       Principal p = principals[n];
/* 112 */       if ((p instanceof Group))
/*     */       {
/* 114 */         Group g = (Group)p;
/* 115 */         Enumeration iter = g.members();
/* 116 */         while (iter.hasMoreElements())
/*     */         {
/* 118 */           p = (Principal)iter.nextElement();
/* 119 */           String name = p.getName();
/* 120 */           princpalNames.add(name);
View Full Code Here

/*     */     {
/*     */       Group grp;
/* 146 */       if (NestableGroup.this.rolesStack.size() > 0)
/*     */       {
/* 148 */         grp = (Group)NestableGroup.this.rolesStack.get(0);
/* 149 */         this.iter = grp.members();
/*     */       }
/*     */     }
/*     */
/*     */     public boolean hasMoreElements() {
/* 154 */       boolean hasMore = (this.iter != null) && (this.iter.hasMoreElements());
View Full Code Here

      {
         Group grp = iter.next();
         String name = grp.getName();
         if (name.equals("CallerPrincipal"))
         {
            Enumeration<? extends Principal> members = grp.members();
            if (members.hasMoreElements())
               info.callerPrincipal = members.nextElement();
         }
      }
View Full Code Here

      {
         Group grp = iter.next();
         String name = grp.getName();
         if( name.equals("CallerPrincipal") )
         {
            Enumeration<? extends Principal> members = grp.members();
            if( members.hasMoreElements() )
               info.callerPrincipal = members.nextElement();
         }
      }
     
View Full Code Here

         Group group = (Group) roleGroups.get(roleGroup);
         String[] names = {};
         if( group != null )
         {
            ArrayList<String> tmp = new ArrayList<String>();
            Enumeration<? extends Principal> iter = group.members();
            while( iter.hasMoreElements() )
            {
               Principal p = iter.nextElement();
               tmp.add(p.getName());
            }
View Full Code Here

        IndexEnumeration()
        {
            if( rolesStack.size() > 0 )
            {
                Group grp = (Group) rolesStack.get(0);
                iter = grp.members();
            }
        }
        public boolean hasMoreElements()
        {
            boolean hasMore = iter != null && iter.hasMoreElements();
View Full Code Here

     Subject subject = lc.getSubject();
     Set groups = subject.getPrincipals(Group.class);
     assertTrue("Principals contains nobody", subject.getPrincipals().contains(new SimplePrincipal("nobody")));
     assertTrue("Principals contains Roles", groups.contains(new SimplePrincipal("Roles")));
     Group roles = (Group) groups.iterator().next();
     assertTrue("Roles has no members", roles.members().hasMoreElements() == false);

     lc.logout();
  }
  public void testNull() throws Exception
  {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.