Examples of BasicControl


Examples of javax.naming.ldap.BasicControl

    {
        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

Examples of javax.naming.ldap.BasicControl

    {
        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

Examples of javax.naming.ldap.BasicControl

                        convertedControl = new PagedResultsResponseControl( wrapped.getOid(), wrapped.isCritical(),
                            wrapped.getValue() );
                    }
                    catch ( IOException e )
                    {
                        convertedControl = new BasicControl( wrapped.getOid(), wrapped.isCritical(),
                            wrapped.getValue() );
                    }
                }
                else
                {
                    // Default case
                    convertedControl = new BasicControl( wrapped.getOid(), wrapped.isCritical(),
                        wrapped.getValue() );
                }

                convertedControls.add( convertedControl );
            }
View Full Code Here

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

Examples of javax.naming.ldap.BasicControl

            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()
View Full Code Here

Examples of javax.naming.ldap.BasicControl

            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

Examples of javax.naming.ldap.BasicControl

        context = new LdapContextImpl(client, env, "cn=test");

        context.setRequestControls(null);
        assertNull(context.getRequestControls());

        Control[] controls = new Control[] { new BasicControl("0"),
                new BasicControl("1"), new BasicControl("2"),
                new BasicControl("3") };

        context.setRequestControls(controls);

        Control[] actual = context.getRequestControls();
View Full Code Here

Examples of javax.naming.ldap.BasicControl

   * Test for the class javax.naming.ldap.BasicControl
   *
   */
  public void testBasicControl(){

    BasicControl bc=new BasicControl("test");
    BasicControl bc2=null;
    try{
      ByteArrayOutputStream buffer = new ByteArrayOutputStream();
      ObjectOutput out = new ObjectOutputStream(buffer);
      out.writeObject(bc);
      out.close();
      ObjectInput in = new ObjectInputStream(new ByteArrayInputStream(buffer.toByteArray()));
      bc2 = (BasicControl) in.readObject();
      in.close();
      assertEquals(bc.getID(),bc2.getID());
    }catch (Exception e) {
      fail("Failed with:"+e);
    }
   
  }
View Full Code Here

Examples of javax.naming.ldap.BasicControl

        // controls
        List<Control> controlList = new ArrayList<Control>();
        if ( browserConnection.getRootDSE().isControlSupported(
            org.apache.directory.studio.ldapbrowser.core.model.Control.TREEDELETE_CONTROL.getOid() ) )
        {
            Control treeDeleteControl = new BasicControl(
                org.apache.directory.studio.ldapbrowser.core.model.Control.TREEDELETE_CONTROL.getOid(),
                org.apache.directory.studio.ldapbrowser.core.model.Control.TREEDELETE_CONTROL.isCritical(),
                org.apache.directory.studio.ldapbrowser.core.model.Control.TREEDELETE_CONTROL.getControlValue() );
            controlList.add( treeDeleteControl );
        }
View Full Code Here

Examples of javax.naming.ldap.BasicControl

    {
        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
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.