/* (non-Javadoc)
* @see org.apache.directory.studio.apacheds.configuration.editor.SavableWizardPage#save()
*/
public void save()
{
ServerConfigurationV152 configuration = ( ServerConfigurationV152 ) ( ( ServerConfigurationEditor ) getEditor() )
.getServerConfiguration();
// Supported Authentication Mechanisms
if ( ( supportedMechanismsTableViewer != null ) && ( supportedMechanismsTableViewer.getTable() != null )
&& ( !supportedMechanismsTableViewer.getTable().isDisposed() ) )
{
List<SupportedMechanismEnum> supportedMechanismsList = new ArrayList<SupportedMechanismEnum>();
for ( Object supportedMechanism : supportedMechanismsTableViewer.getCheckedElements() )
{
supportedMechanismsList.add( ( SupportedMechanismEnum ) supportedMechanism );
}
configuration.setSupportedMechanisms( supportedMechanismsList );
}
// SASL Host
if ( ( saslHostText != null ) && ( !saslHostText.isDisposed() ) )
{
configuration.setSaslHost( saslHostText.getText() );
}
// SASL Principal
if ( ( saslPrincipalText != null ) && ( !saslPrincipalText.isDisposed() ) )
{
configuration.setSaslPrincipal( saslPrincipalText.getText() );
}
// Search Base DN
if ( ( searchBaseDnText != null ) && ( !searchBaseDnText.isDisposed() ) )
{
configuration.setSearchBaseDn( searchBaseDnText.getText() );
}
// SASL Quality Of Protection
if ( ( saslQualityOfProtectionTableViewer != null ) && ( saslQualityOfProtectionTableViewer.getTable() != null )
&& ( !saslQualityOfProtectionTableViewer.getTable().isDisposed() ) )
{
List<SaslQualityOfProtectionEnum> saslQoPList = new ArrayList<SaslQualityOfProtectionEnum>();
for ( Object qop : saslQualityOfProtectionTableViewer.getCheckedElements() )
{
saslQoPList.add( ( SaslQualityOfProtectionEnum ) qop );
}
configuration.setSaslQops( saslQoPList );
}
// SASL Realms
if ( ( saslRealmsTableViewer != null ) && ( saslRealmsTableViewer.getTable() != null )
&& ( !saslRealmsTableViewer.getTable().isDisposed() ) )
{
configuration.setSaslRealms( saslRealms );
}
}