Examples of ControlFactory


Examples of org.apache.beehive.controls.spi.bean.ControlFactory

    {
        try
        {
            DiscoverClass discoverer = new DiscoverClass();
            Class factoryClass = discoverer.find( ControlFactory.class, DEFAULT_FACTORY_CLASS );
            ControlFactory factory = (ControlFactory)factoryClass.newInstance();
            return factory.instantiate( beanClass, props, context, id );
        }
        catch ( Exception e )
        {
            throw new ControlException( "Exception creating ControlBean", e );
        }
View Full Code Here

Examples of org.apache.beehive.controls.spi.bean.ControlFactory

    {
        try
        {
            DiscoverClass discoverer = new DiscoverClass();
            Class factoryClass = discoverer.find( ControlFactory.class, DEFAULT_FACTORY_CLASS );
            ControlFactory factory = (ControlFactory)factoryClass.newInstance();
            return factory.instantiate( beanClass, props, context, id );
        }
        catch ( Exception e )
        {
            throw new ControlException( "Exception creating ControlBean", e );
        }
View Full Code Here

Examples of org.apache.beehive.controls.spi.bean.ControlFactory

    {
        try
        {
            DiscoverClass discoverer = new DiscoverClass();
            Class factoryClass = discoverer.find( ControlFactory.class, DEFAULT_FACTORY_CLASS );
            ControlFactory factory = (ControlFactory)factoryClass.newInstance();
            return factory.instantiate( beanClass, props, context, id );
        }
        catch ( Exception e )
        {
            throw new ControlException( "Exception creating ControlBean", e );
        }
View Full Code Here

Examples of org.apache.directory.api.ldap.codec.api.ControlFactory

        if ( control instanceof CodecControl )
        {
            return ( org.apache.directory.api.ldap.codec.api.CodecControl<?> ) control;
        }

        @SuppressWarnings("rawtypes")
        ControlFactory factory = controlFactories.get( control.getOid() );

        if ( factory == null )
        {
            return new BasicControlDecorator<Control>( this, control );
        }

        return factory.newCodecControl( control );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.codec.api.ControlFactory

    /**
     * {@inheritDoc}
     */
    public Control fromJndiControl( javax.naming.ldap.Control control ) throws DecoderException
    {
        @SuppressWarnings("rawtypes")
        ControlFactory factory = controlFactories.get( control.getID() );

        if ( factory == null )
        {
            OpaqueControl ourControl = new OpaqueControl( control.getID() );
            ourControl.setCritical( control.isCritical() );
            BasicControlDecorator<Control> decorator =
                new BasicControlDecorator<Control>( this, ourControl );
            decorator.setValue( control.getEncodedValue() );
            return decorator;
        }

        @SuppressWarnings("unchecked")
        CodecControl<? extends Control> ourControl = factory.newCodecControl();
        ourControl.setCritical( control.isCritical() );
        ourControl.setValue( control.getEncodedValue() );
        ourControl.decode( control.getEncodedValue() );

        return ourControl;
View Full Code Here

Examples of org.apache.directory.api.ldap.codec.api.ControlFactory

        if ( control instanceof CodecControl )
        {
            return ( CodecControl<?> ) control;
        }

        @SuppressWarnings("rawtypes")
        ControlFactory factory = controlFactories.get( control.getOid() );

        if ( factory == null )
        {
            return new BasicControlDecorator<Control>( this, control );
        }

        return factory.newCodecControl( control );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.codec.api.ControlFactory

    /**
     * {@inheritDoc}
     */
    public Control fromJndiControl( javax.naming.ldap.Control control ) throws DecoderException
    {
        @SuppressWarnings("rawtypes")
        ControlFactory factory = controlFactories.get( control.getID() );

        if ( factory == null )
        {
            OpaqueControl ourControl = new OpaqueControl( control.getID() );
            ourControl.setCritical( control.isCritical() );
            BasicControlDecorator<Control> decorator =
                new BasicControlDecorator<Control>( this, ourControl );
            decorator.setValue( control.getEncodedValue() );
            return decorator;
        }

        @SuppressWarnings("unchecked")
        CodecControl<? extends Control> ourControl = factory.newCodecControl();
        ourControl.setCritical( control.isCritical() );
        ourControl.setValue( control.getEncodedValue() );
        ourControl.decode( control.getEncodedValue() );
        return ourControl;
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.codec.api.ControlFactory

        if ( control instanceof CodecControl )
        {
            return ( org.apache.directory.api.ldap.codec.api.CodecControl<?> ) control;
        }

        @SuppressWarnings("rawtypes")
        ControlFactory factory = controlFactories.get( control.getOid() );

        if ( factory == null )
        {
            return new BasicControlDecorator<Control>( this, control );
        }

        return factory.newCodecControl( control );
    }
View Full Code Here

Examples of org.apache.directory.api.ldap.codec.api.ControlFactory

    /**
     * {@inheritDoc}
     */
    public Control fromJndiControl( javax.naming.ldap.Control control ) throws DecoderException
    {
        @SuppressWarnings("rawtypes")
        ControlFactory factory = controlFactories.get( control.getID() );

        if ( factory == null )
        {
            OpaqueControl ourControl = new OpaqueControl( control.getID() );
            ourControl.setCritical( control.isCritical() );
            BasicControlDecorator<Control> decorator =
                new BasicControlDecorator<Control>( this, ourControl );
            decorator.setValue( control.getEncodedValue() );
            return decorator;
        }

        @SuppressWarnings("unchecked")
        CodecControl<? extends Control> ourControl = factory.newCodecControl();
        ourControl.setCritical( control.isCritical() );
        ourControl.setValue( control.getEncodedValue() );
        ourControl.decode( control.getEncodedValue() );

        return ourControl;
View Full Code Here

Examples of org.apache.directory.api.ldap.codec.api.ControlFactory

        if ( control instanceof CodecControl )
        {
            return ( org.apache.directory.api.ldap.codec.api.CodecControl<?> ) control;
        }

        @SuppressWarnings("rawtypes")
        ControlFactory factory = controlFactories.get( control.getOid() );

        if ( factory == null )
        {
            return new BasicControlDecorator<Control>( this, control );
        }

        return factory.newCodecControl( control );
    }
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.