@Override
public void onOkButtonPressed() {
// TODO: validation
final KeystoreEntry keystoreEntry = initialKeystoreEntry == null ? new KeystoreEntry() : initialKeystoreEntry;
if ( keystoreURLTextField.getText().length() == 0 && keystoreTypeTextField.getText().length() == 0 && keystoreProviderTextField.getText().length() == 0 ) {
// We want no keystore entry!
if ( initialKeystoreEntry != null )
policyEntryList.remove( initialKeystoreEntry );
} else {
keystoreEntry.setUrl ( keystoreURLTextField .getText() );
keystoreEntry.setType ( keystoreTypeTextField .getText() );
keystoreEntry.setProvider( keystoreProviderTextField.getText() );
if ( initialKeystoreEntry == null ) { // If it is a new, we have to add it to the "global" list
// We want to add it to be the first non-comment entry
int index = 0;
for ( ; index < policyEntryList.size(); index++ )