Examples of LDAPGroup


Examples of org.apache.jetspeed.om.security.ldap.LDAPGroup

    public void removeGroup(String groupname)
        throws JetspeedSecurityException
    {
        try
        {
            LDAPGroup group = new LDAPGroup(groupname, false);
            JetspeedLDAP.deleteEntry(group.getldapurl());

            if(cascadeDelete)
            {
            }
View Full Code Here

Examples of org.apache.jetspeed.om.security.ldap.LDAPGroup

     */
    public Group getGroup(String groupname)
        throws JetspeedSecurityException
    {
        BasicAttributes attr= new BasicAttributes();
        LDAPGroup group;
        Vector groupurls;
        try
        {
            groupurls = JetspeedLDAP.search(JetspeedLDAP.buildURL("ou=groups"),
                         "(&(uid="+ groupname+")(objectclass=jetspeedgroup))", ATTRS, true);
            if (groupurls.size() == 1)
            {
                return new LDAPGroup((LDAPURL)((Vector)groupurls.elementAt(0)).firstElement());
            }
            else if(groupurls.size() > 1)
            {
                throw new GroupException("Multiple groups with same name");
            }
View Full Code Here

Examples of org.apache.jetspeed.om.security.ldap.LDAPGroup

     *
     */
    public void addGroup(Group group)
        throws JetspeedSecurityException
    {
        LDAPGroup ldapGroup = null;

        if(groupExists(group.getName()))
        {
            throw new GroupException("The group '" +
                group.getName() + "' already exists");
        }
        try
        {
            ldapGroup = new LDAPGroup(group.getName(), true);
            ldapGroup.update(true);
        }
        catch(Exception e)
        {
            throw new GroupException("Failed to create group '" +
                group.getName() + "'", e);
        }

        try
        {
            addDefaultGroupPSML(ldapGroup);
        }
        catch (Exception e)
        {
            try
            {
                removeGroup(ldapGroup.getName());
            }
            catch (Exception e2)
            {
            }
            throw new GroupException("failed to add default PSML for Group resource", e);
View Full Code Here

Examples of org.apache.jetspeed.om.security.ldap.LDAPGroup

    public void removeGroup(String groupname)
        throws JetspeedSecurityException
    {
        try
        {
            LDAPGroup group = new LDAPGroup(groupname, false);
            JetspeedLDAP.deleteEntry(group.getldapurl());

            if(cascadeDelete)
            {
            }
View Full Code Here

Examples of org.apache.jetspeed.om.security.ldap.LDAPGroup

     */
    public Group getGroup(String groupname)
        throws JetspeedSecurityException
    {
        BasicAttributes attr= new BasicAttributes();
        LDAPGroup group;
        Vector groupurls;

        try
        {
            groupurls = JetspeedLDAP.search(JetspeedLDAP.buildURL("ou=groups"),
                         "(&(uid="+ groupname+")(objectclass=jetspeedgroup))", ATTRS, true);
            if (groupurls.size() == 1)
            {
                return new LDAPGroup((LDAPURL)((Vector)groupurls.elementAt(0)).firstElement());
            }
            else if(groupurls.size() > 1)
            {
                throw new GroupException("Multiple groups with same name");
            }
View Full Code Here

Examples of org.apache.jetspeed.om.security.ldap.LDAPGroup

     */
    public HashMap getTurbineGroupRole(String username)
         throws JetspeedSecurityException
    {
      BasicAttributes attr= new BasicAttributes();
      LDAPGroup group;
      Vector groupurls;
      HashMap h = new HashMap();
      return h;
    }
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.ldap.LdapGroup

     * Test performing the action.
     */
    @Test
    public final void testPerformActionWithGroup()
    {
        LdapGroup group = context.mock(LdapGroup.class);
        results.add(group);

        context.checking(new Expectations()
        {
            {
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.ldap.LdapGroup

        DirContextAdapter dir = (DirContextAdapter) inCtx;
       
        //This is the callback for the PagedLdapSearch, getNameInNamespace returns the fully qualified
        //dn for the result.  This is preferred over getDn which just returns the relative dn without
        //the base path if it was supplied by the ldaptemplate during search.
        return new LdapGroup(new DistinguishedName(dir.getNameInNamespace()));
    }
View Full Code Here

Examples of org.eurekastreams.server.persistence.mappers.ldap.LdapGroup

                allowing(ctx).getNameInNamespace();
                will(returnValue(dn));
            }
        });

        LdapGroup result = (LdapGroup) sut.mapFromContext(ctx);

        assertEquals(dn, result.getDistinguishedName().toCompactString());
        context.assertIsSatisfied();
    }
View Full Code Here

Examples of org.rhq.core.domain.resource.group.LdapGroup

                }
            }

            // Add new groups, but filter those that are still attached
            for (LdapGroup ldapGroup : newLdapGroups) {
                LdapGroup attachedLdapGroup = (ldapGroup.getId() != 0) ? entityManager.find(LdapGroup.class,
                    ldapGroup.getId()) : null;
                if (attachedLdapGroup == null && !currentLdapGroups.contains(ldapGroup)) {
                    ldapGroup.setRole(attachedRole);
                    entityManager.persist(ldapGroup);
                    attachedLdapGroup = ldapGroup;
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.