Package javax.naming.ldap

Examples of javax.naming.ldap.BasicControl


        // controls
        List<Control> controlList = new ArrayList<Control>();
        if ( useTreeDeleteControl
            && browserConnection.getRootDSE().isControlSupported( StudioControl.TREEDELETE_CONTROL.getOid() ) )
        {
            Control treeDeleteControl = new BasicControl( StudioControl.TREEDELETE_CONTROL.getOid(),
                StudioControl.TREEDELETE_CONTROL.isCritical(), StudioControl.TREEDELETE_CONTROL.getControlValue() );
            controlList.add( treeDeleteControl );
        }
        if ( useManageDsaItControl
            && browserConnection.getRootDSE().isControlSupported( StudioControl.MANAGEDSAIT_CONTROL.getOid() ) )
View Full Code Here


            LdifControlLine[] controlLines = changeRecord.getControls();
            controls = new Control[controlLines.length];
            for ( int i = 0; i < controlLines.length; i++ )
            {
                LdifControlLine line = controlLines[i];
                controls[i] = new BasicControl( line.getUnfoldedOid(), line.isCritical(), line
                    .getControlValueAsBinary() );
            }
        }
        return controls;
    }
View Full Code Here

        new Rdn("y=asd+t=test", "a=asd");
        new Rdn("y=asd", "a=asd+t=test");
        new Rdn("t", new ArrayList());
        new Rdn("t=t=t", new Object());
        new Rdn("t=t=t", "test");
        new Rdn("t", new BasicControl("test"));
    }
View Full Code Here

     * </p>
     */
    public void testRdnStringObject018() throws Exception {
        new Rdn(new String("t===T"), new ArrayList());
        new Rdn(new String("t=+=T"), new Object());
        new Rdn(new String("t=,33,=T"), new BasicControl("test"));
    }
View Full Code Here

     * </p>
     */
    public void testRdnStringObject019() throws Exception {
        new Rdn(new String("t===T"), new char[] { 'a', 'v' });
        new Rdn(new String("t=+=T"), new int[] { 1, 2, 3 });
        new Rdn(new String("t=,33,=T"), new BasicControl("test"));
    }
View Full Code Here

                    .equals(new Rdn("t", new int[] { 00 }));
            fail("Should throw an exception.");
        } catch (ClassCastException e) {}

        try {
            new Rdn("t", new BasicControl("t")).equals(new Rdn("t",
                    new BasicControl("t")));
            fail("Should throw an exception.");
        } catch (ClassCastException e) {}
    }
View Full Code Here

    {
        CodecControl<? extends Control> decorator = newControl( control );
        ByteBuffer bb = ByteBuffer.allocate( decorator.computeLength() );
        decorator.encode( bb );
        bb.flip();
        BasicControl jndiControl =
            new BasicControl( control.getOid(), control.isCritical(), bb.array() );
        return jndiControl;
    }
View Full Code Here

            List<StudioControl> ctls = parameter.getControls();
            jndiControls = new Control[ctls.size()];
            for ( int i = 0; i < ctls.size(); i++ )
            {
                StudioControl ctl = ctls.get( i );
                jndiControls[i] = new BasicControl( ctl.getOid(), ctl.isCritical(), ctl.getControlValue() );
            }
        }

        StudioNamingEnumeration result = browserConnection.getConnection().getJNDIConnectionWrapper().search(
            searchBase, filter, controls, aliasesDereferencingMethod, referralsHandlingMethod, jndiControls, monitor,
View Full Code Here

            List<StudioControl> ctls = parameter.getControls();
            jndiControls = new Control[ctls.size()];
            for ( int i = 0; i < ctls.size(); i++ )
            {
                StudioControl ctl = ctls.get( i );
                jndiControls[i] = new BasicControl( ctl.getOid(), ctl.isCritical(), ctl.getControlValue() );
            }
        }

        StudioNamingEnumeration result = browserConnection.getConnection().getJNDIConnectionWrapper().search(
            searchBase, filter, controls, aliasesDereferencingMethod, referralsHandlingMethod, jndiControls, monitor,
View Full Code Here

                  modsWithUpgrade[0] =
                     new ModificationItem(DirContext.REPLACE_ATTRIBUTE, new ObjectClassAttribute(
                        LDAPAttributeMapping.USER_LDAP_CLASSES));
                  System.arraycopy(mods, 0, modsWithUpgrade, 1, mods.length);

                  ctx.setRequestControls(new Control[]{new BasicControl("1.3.6.1.4.1.4203.666.5.12")});
                  try
                  {
                     ctx.modifyAttributes(userDN, modsWithUpgrade);
                  }
                  finally
View Full Code Here

TOP

Related Classes of javax.naming.ldap.BasicControl

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.