if ( provider instanceof Store )
{
options.add( "Add encryption." );
options.add( "Remove encryption." );
}
MenuItemResponse response = ConfigFrameUtil.getMenuSelection( writer, reader, error, options );
switch ( response.getResponseType( ) )
{
case BACK:
output.setGoBack( true );
return;
case QUIT:
output.setQuit( true );
return;
case VALUE:
if ( response.getVal( ) == 3 )
{
deleteProvider( config, provider );
}
else if ( response.getVal( ) == 2 )
{
setDefaultProvider( config, provider );
}
else if ( response.getVal( ) == 1 )
{
editProperties( parent, output, config, provider, writer, reader, error );
}
else if ( response.getVal( ) == 4 )
{
setupEncryption( parent, output, config, provider, writer, reader, error );
}
else if ( response.getVal( ) == 5 )
{
provider.setEncrypted( false );
}
break;
default:
throw new IllegalStateException("Unknown response type '" + response.getResponseType() + "'.");
}
}