Package javax.naming.ldap

Examples of javax.naming.ldap.BasicControl


    public void decodeValues(Object[] values) {
        String id = Utils.getString((byte[]) values[0]);
        boolean isCritical = ((Boolean) values[1]).booleanValue();
        byte[] encoded = (byte[]) values[2];
        control = new BasicControl(id, isCritical, encoded);
    }
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

    {
        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

        // 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 );
        }
        Control[] controls = controlList.toArray( new Control[controlList.size()] );
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

    {
        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

                  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

            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

        // supply a recursion control such as Oracle's CONNECT_BY (2.16.840.1.113894.1.8.3)
        if (!sUserDN.equals("*") && (recursiveControlId.length() > 0)) {
          if (dirContext instanceof LdapContext) {
            LdapContext ldapContext = (LdapContext)dirContext;
            Control[] aControls = ldapContext.getRequestControls();
            Control recursiveControl = new BasicControl(recursiveControlId);
            List<Control> lControls = new ArrayList<Control>();
            if (aControls != null) {
              for (Control ctl: aControls) {
                lControls.add(ctl);
              }
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.