Package org.dom4j

Examples of org.dom4j.Element.attribute()


        // Getting the 'ldapServer' element
        Element ldapServerElement = element.element( ServerXmlIOV155.ELEMENT_LDAP_SERVER );
        if ( ldapServerElement != null )
        {
            // Allow Anonymous Access
            org.dom4j.Attribute allowAnonymousAccessAttribute = ldapServerElement
                .attribute( ServerXmlIOV155.ATTRIBUTE_ALLOW_ANONYMOUS_ACCESS );
            if ( allowAnonymousAccessAttribute == null )
            {
                // If the 'allowAnonymousAccess' attribute does not exists,
                // we throw an exception
View Full Code Here


            {
                serverConfiguration.setAllowAnonymousAccess( parseBoolean( allowAnonymousAccessAttribute.getValue() ) );
            }

            // SaslHost
            org.dom4j.Attribute saslHostAttribute = ldapServerElement.attribute( ServerXmlIOV155.ATTRIBUTE_SASL_HOST );
            if ( saslHostAttribute == null )
            {
                // If the 'saslHost' attribute does not exists,
                // we throw an exception
                throw new ServerXmlIOException( Messages.getString( "ServerXmlIOV155.ErrorSaslHost" ) ); //$NON-NLS-1$
View Full Code Here

            {
                serverConfiguration.setSaslHost( saslHostAttribute.getValue() );
            }

            // SaslPrincipal
            org.dom4j.Attribute saslPrincipalAttribute = ldapServerElement
                .attribute( ServerXmlIOV155.ATTRIBUTE_SASL_PRINCIPAL );
            if ( saslPrincipalAttribute == null )
            {
                // If the 'saslPrincipal' attribute does not exists,
                // we throw an exception
View Full Code Here

            {
                serverConfiguration.setSaslPrincipal( saslPrincipalAttribute.getValue() );
            }

            // SearchBaseDn
            org.dom4j.Attribute searchBaseDnAttribute = ldapServerElement
                .attribute( ServerXmlIOV155.ATTRIBUTE_SEARCH_BASE_DN );
            if ( searchBaseDnAttribute == null )
            {
                // If the 'searchBaseDn' attribute does not exists,
                // we throw an exception
View Full Code Here

            {
                serverConfiguration.setSearchBaseDn( searchBaseDnAttribute.getValue() );
            }

            // MaxTimeLimit
            org.dom4j.Attribute maxTimeLimitAttribute = ldapServerElement
                .attribute( ServerXmlIOV155.ATTRIBUTE_MAX_TIME_LIMIT );
            if ( maxTimeLimitAttribute == null )
            {
                // If the 'maxTimeLimit' attribute does not exists,
                // we throw an exception
View Full Code Here

            {
                serverConfiguration.setMaxTimeLimit( Integer.parseInt( maxTimeLimitAttribute.getValue() ) );
            }

            // MaxSizeLimit
            org.dom4j.Attribute maxSizeLimitAttribute = ldapServerElement
                .attribute( ServerXmlIOV155.ATTRIBUTE_MAX_SIZE_LIMIT );
            if ( maxSizeLimitAttribute == null )
            {
                // If the 'maxSizeLimit' attribute does not exists,
                // we throw an exception
View Full Code Here

                {
                    // Getting the 'tcpTransport' element
                    Element tcpTransportElement = ( Element ) iterator.next();

                    // Getting the 'port' attribute
                    org.dom4j.Attribute portAttribute = tcpTransportElement.attribute( ServerXmlIOV155.ATTRIBUTE_PORT );
                    if ( portAttribute == null )
                    {
                        // If the 'port' attribute does not exists,
                        // we throw an exception
                        throw new ServerXmlIOException( Messages.getString( "ServerXmlIOV155.ErrorLdapServerPort" ) ); //$NON-NLS-1$
View Full Code Here

                        throw new ServerXmlIOException( Messages.getString( "ServerXmlIOV155.ErrorLdapServerPort" ) ); //$NON-NLS-1$
                    }

                    // Getting the 'enableSSL' attribute
                    boolean enableSsl = false;
                    org.dom4j.Attribute enableSslAttribut = tcpTransportElement
                        .attribute( ServerXmlIOV155.ATTRIBUTE_ENABLESSL );
                    if ( enableSslAttribut != null )
                    {
                        enableSsl = parseBoolean( enableSslAttribut.getValue() );
                    }
View Full Code Here

                for ( Iterator<?> iterator = supportedMechanismsElement.elementIterator(); iterator.hasNext(); )
                {
                    // Getting the  element
                    Element supportedMechanismValueElement = ( Element ) iterator.next();
                    String supportedMechanismValue = supportedMechanismValueElement.getName();
                    org.dom4j.Attribute mechNameAttribute = supportedMechanismValueElement
                        .attribute( ServerXmlIOV155.ATTRIBUTE_MECH_NAME );
                    String mechNameValue = ( mechNameAttribute == null ) ? null : mechNameAttribute.getValue();

                    if ( ServerXmlIOV155.ELEMENT_SIMPLE_MECHANISM_HANDLER.equalsIgnoreCase( supportedMechanismValue )
                        && ServerXmlIOV155.SUPPORTED_MECHANISM_SIMPLE.equalsIgnoreCase( mechNameValue ) )
View Full Code Here

                        serverConfiguration.addSupportedMechanism( SupportedMechanismEnum.GSSAPI );
                    }
                    else if ( ServerXmlIOV155.ELEMENT_NTLM_MECHANISM_HANDLER.equalsIgnoreCase( supportedMechanismValue )
                        && ServerXmlIOV155.SUPPORTED_MECHANISM_NTLM.equalsIgnoreCase( mechNameValue ) )
                    {
                        org.dom4j.Attribute ntlmProviderFcqnAttribute = supportedMechanismValueElement
                            .attribute( ServerXmlIOV155.ATTRIBUTE_NTLM_PROVIDER_FQCN );
                        if ( ntlmProviderFcqnAttribute != null )
                        {
                            SupportedMechanismEnum ntlmSupportedMechanism = SupportedMechanismEnum.NTLM;
                            ntlmSupportedMechanism.setNtlmProviderFqcn( ntlmProviderFcqnAttribute.getValue() );
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.