Package org.apache.jetspeed.om.security.ldap

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


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

            if(cascadeDelete)
            {
            }
View Full Code Here

     */
    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

     */
    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

TOP

Related Classes of org.apache.jetspeed.om.security.ldap.LDAPGroup

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.