Package javax.naming.ldap

Examples of javax.naming.ldap.InitialLdapContext.destroySubcontext()


        DirContext kate = ctx.createSubcontext( "cn=Kate Bush", user );
        assertNotNull( kate );
        assertTrue( ArrayUtils.isEquals( Asn1StringUtils.getBytesUtf8( "Aerial" ), kate.getAttributes( "" ).get(
            "userPassword" ).get() ) );

        ctx.destroySubcontext( "cn=Kate Bush" );
    }
}
View Full Code Here


      try
      {
         ctx = initialiseContext();
                
         String roleDN = String.format("%s=%s,%s", getRoleNameAttribute(), role, getRoleContextDN() );         
         ctx.destroySubcontext(roleDN);        
         return true;
      }
      catch (NamingException ex)
      {
         throw new IdentityManagementException("Failed to delete role", ex);
View Full Code Here

      try
      {
         ctx = initialiseContext();
                
         String userDN = getUserDN(name);         
         ctx.destroySubcontext(userDN);        
         return true;
      }
      catch (NamingException ex)
      {
         throw new IdentityManagementException("Failed to delete user", ex);
View Full Code Here

        DirContext kate = ctx.createSubcontext( "cn=Kate Bush", user );
        assertNotNull( kate );
        assertTrue( ArrayUtils.isEquals( Asn1StringUtils.getBytesUtf8( "Aerial" ), kate.getAttributes( "" ).get(
            "userPassword" ).get() ) );

        ctx.destroySubcontext( "cn=Kate Bush" );
    }
}
View Full Code Here

      {
         ctx = initialiseContext();
                
         // Delete the role entry itself
         String roleDN = String.format("%s=%s,%s", getRoleNameAttribute(), role, getRoleContextDN() );         
         ctx.destroySubcontext(roleDN);        
        
         // Then delete all user attributes that point to this role
         int searchScope = SearchControls.SUBTREE_SCOPE;
         int searchTimeLimit = 10000;
        
View Full Code Here

      try
      {
         ctx = initialiseContext();
                
         String userDN = getUserDN(name);         
         ctx.destroySubcontext(userDN);        
         return true;
      }
      catch (NamingException ex)
      {
         throw new IdentityManagementException("Failed to delete user", ex);
View Full Code Here

      {
         ctx = initialiseContext();
                
         // Delete the role entry itself
         String roleDN = String.format("%s=%s,%s", getRoleNameAttribute(), role, getRoleContextDN() );         
         ctx.destroySubcontext(roleDN);        
        
         // Then delete all user attributes that point to this role
         int searchScope = SearchControls.SUBTREE_SCOPE;
         int searchTimeLimit = 10000;
        
View Full Code Here

      try
      {
         ctx = initialiseContext();
                
         String userDN = getUserDN(name);         
         ctx.destroySubcontext(userDN);        
         return true;
      }
      catch (NamingException ex)
      {
         throw new IdentityManagementException("Failed to delete user", ex);
View Full Code Here

        DirContext kate = ctx.createSubcontext( "cn=Kate Bush", user );
        assertNotNull( kate );
        assertTrue( ArrayUtils.isEquals( Asn1StringUtils.getBytesUtf8( "Aerial" ), kate.getAttributes( "" ).get(
            "userPassword" ).get() ) );

        ctx.destroySubcontext( "cn=Kate Bush" );
    }
}
View Full Code Here

        DirContext kate = ctx.createSubcontext( "cn=Kate Bush", user );
        assertNotNull( kate );
        assertTrue( ArrayUtils.isEquals( Asn1StringUtils.getBytesUtf8( "Aerial" ), kate.getAttributes( "" ).get(
            "userPassword" ).get() ) );

        ctx.destroySubcontext( "cn=Kate Bush" );
    }
}
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.