Package org.apache.directory.server.config.beans

Examples of org.apache.directory.server.config.beans.DirectoryServiceBean


     * @param configuration the configuration
     * @return the NTP port
     */
    public static int getNtpPort( ConfigBean configuration )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            NtpServerBean ntpServerBean = directoryServiceBean.getNtpServerBean();

            if ( ntpServerBean != null )
            {
                // Looking for the transport in the list
                TransportBean[] ntpServerTransportBeans = ntpServerBean.getTransports();
View Full Code Here


     * @param configuration the configuration
     * @return the Change Password port
     */
    public static int getChangePasswordPort( ConfigBean configuration )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            ChangePasswordServerBean changePasswordServerBean = directoryServiceBean.getChangePasswordServerBean();

            if ( changePasswordServerBean != null )
            {
                // Looking for the transport in the list
                TransportBean[] changePasswordServerTransportBeans = changePasswordServerBean.getTransports();
View Full Code Here

     */
    protected void refreshUI()
    {
        removeListeners();

        DirectoryServiceBean directoryServiceBean = getDirectoryServiceBean();

        // LDAP Server
        TransportBean ldapServerTransportBean = LdapLdapsServersPage.getLdapServerTransportBean( directoryServiceBean );
        setSelection( enableLdapCheckbox, ldapServerTransportBean.isEnabled() );
        setEnabled( ldapPortText, enableLdapCheckbox.getSelection() );
        setText( ldapPortText, ldapServerTransportBean.getSystemPort() + "" ); //$NON-NLS-1$

        // LDAPS Server
        TransportBean ldapsServerTransportBean = LdapLdapsServersPage
            .getLdapsServerTransportBean( directoryServiceBean );
        setSelection( enableLdapsCheckbox, ldapsServerTransportBean.isEnabled() );
        setEnabled( ldapsPortText, enableLdapsCheckbox.getSelection() );
        setText( ldapsPortText, ldapsServerTransportBean.getSystemPort() + "" ); //$NON-NLS-1$

        // Kerberos Server
        KdcServerBean kdcServerBean = KerberosServerPage.getKdcServerBean( directoryServiceBean );
        setSelection( enableKerberosCheckbox, kdcServerBean.isEnabled() );
        setEnabled( kerberosPortText, enableKerberosCheckbox.getSelection() );
        setText( kerberosPortText, "" + kdcServerBean.getTransports()[0].getSystemPort() ); //$NON-NLS-1$

        // Change Password Server
        ChangePasswordServerBean changePasswordServerBean = KerberosServerPage
            .getChangePasswordServerBean( directoryServiceBean );
        setSelection( enableChangePasswordCheckbox, changePasswordServerBean.isEnabled() );
        setEnabled( changePasswordPortText, enableChangePasswordCheckbox.getSelection() );
        setText( changePasswordPortText, "" + changePasswordServerBean.getTransports()[0].getSystemPort() ); //$NON-NLS-1$

        // Partitions
        List<PartitionBean> partitions = directoryServiceBean.getPartitions();
        if ( partitions.size() == 1 )
        {
            partitionsLabel.setText( Messages.getString( "OverviewPage.ThereIsOnePartitionDefined" ) ); //$NON-NLS-1$
        }
        else
        {
            partitionsLabel.setText( NLS.bind(
                Messages.getString( "OverviewPage.ThereAreXPartitionsDefined" ), partitions.size() ) ); //$NON-NLS-1$
        }
        partitionsTableViewer.setInput( partitions.toArray() );

        // Options
        allowAnonymousAccessCheckbox.setSelection( directoryServiceBean.isDsAllowAnonymousAccess() );
        enableAccessControlCheckbox.setSelection( directoryServiceBean.isDsAccessControlEnabled() );

        addListeners();
    }
View Full Code Here

     * @param id the id
     * @return the corresponding LDAP Server transport bean.
     */
    private static TransportBean getLdapServerTransportBean( ConfigBean configuration, String id )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            LdapServerBean ldapServerBean = directoryServiceBean.getLdapServerBean();

            if ( ldapServerBean != null )
            {
                // Looking for the transport in the list
                TransportBean[] ldapServerTransportBeans = ldapServerBean.getTransports();
View Full Code Here

     * @return <code>true</code> if the Kerberos Server is enabled,
     *         <code>false</code> if not.
     */
    public static boolean isEnableKerberos( ConfigBean configuration )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            KdcServerBean kdcServerBean = directoryServiceBean.getKdcServerBean();

            if ( kdcServerBean != null )
            {
                kdcServerBean.isEnabled();
            }
View Full Code Here

     * @return <code>true</code> if the DNS Server is enabled,
     *         <code>false</code> if not.
     */
    public static boolean isEnableDns( ConfigBean configuration )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            DnsServerBean dnsServerBean = directoryServiceBean.getDnsServerBean();

            if ( dnsServerBean != null )
            {
                dnsServerBean.isEnabled();
            }
View Full Code Here

     * @return <code>true</code> if the NTP Server is enabled,
     *         <code>false</code> if not.
     */
    public static boolean isEnableNtp( ConfigBean configuration )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            NtpServerBean ntpServerBean = directoryServiceBean.getNtpServerBean();

            if ( ntpServerBean != null )
            {
                ntpServerBean.isEnabled();
            }
View Full Code Here

     * @return <code>true</code> if the Change Password Server is enabled,
     *         <code>false</code> if not.
     */
    public static boolean isEnableChangePassword( ConfigBean configuration )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            ChangePasswordServerBean changePasswordServerBean = directoryServiceBean.getChangePasswordServerBean();

            if ( changePasswordServerBean != null )
            {
                changePasswordServerBean.isEnabled();
            }
View Full Code Here

     * @param configuration the configuration
     * @return the Kerberos port
     */
    public static int getKerberosPort( ConfigBean configuration )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            KdcServerBean kdcServerBean = directoryServiceBean.getKdcServerBean();

            if ( kdcServerBean != null )
            {
                // Looking for the transport in the list
                TransportBean[] kdcServerTransportBeans = kdcServerBean.getTransports();
View Full Code Here

     * @param configuration the configuration
     * @return the DNS port
     */
    public static int getDnsPort( ConfigBean configuration )
    {
        DirectoryServiceBean directoryServiceBean = configuration.getDirectoryServiceBean();

        if ( directoryServiceBean != null )
        {
            DnsServerBean dnsServerBean = directoryServiceBean.getDnsServerBean();

            if ( dnsServerBean != null )
            {
                // Looking for the transport in the list
                TransportBean[] dnsServerTransportBeans = dnsServerBean.getTransports();
View Full Code Here

TOP

Related Classes of org.apache.directory.server.config.beans.DirectoryServiceBean

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.