public class DeleteProxyConnectorAction
extends AbstractProxyConnectorAction
{
- private String sourceId;
+ private String source;
- private String targetId;
+ private String target;
private ProxyConnectorConfiguration proxyConfig;
public String confirmDelete()
{
- this.proxyConfig = findProxyConnector( sourceId, targetId );
+ this.proxyConfig = findProxyConnector( source, target );
// Not set? Then there is nothing to delete.
if ( this.proxyConfig == null )
{
- addActionError( "Unable to delete proxy configuration, configuration with source [" + sourceId
- + "], and target [" + targetId + "] does not exist." );
+ addActionError( "Unable to delete proxy configuration, configuration with source [" + source
+ + "], and target [" + target + "] does not exist." );
return ERROR;
}
public String delete()
{
- this.proxyConfig = findProxyConnector( sourceId, targetId );
+ this.proxyConfig = findProxyConnector( source, target );
// Not set? Then there is nothing to delete.
if ( this.proxyConfig == null )
{
- addActionError( "Unable to delete proxy configuration, configuration with source [" + sourceId
- + "], and target [" + targetId + "] does not exist." );
+ addActionError( "Unable to delete proxy configuration, configuration with source [" + source
+ + "], and target [" + target + "] does not exist." );
return ERROR;
}
}
removeProxyConnector( proxyConfig );
- addActionMessage( "Successfully removed proxy connector [" + sourceId + " , " + targetId + " ]" );
+ addActionMessage( "Successfully removed proxy connector [" + source + " , " + target + " ]" );
- setSourceId( null );
- setTargetId( null );
+ setSource( null );
+ setTarget( null );
return saveConfiguration();
}
- public String getSourceId()
+ public String getSource()
{
- return sourceId;
+ return source;
}
- public void setSourceId( String sourceId )
+ public void setSource( String id )
{
- this.sourceId = sourceId;
+ this.source = id;
}
- public String getTargetId()
+ public String getTarget()
{
- return targetId;
+ return target;
}
- public void setTargetId( String targetId )
+ public void setTarget( String id )
{
- this.targetId = targetId;
+ this.target = id;
}
public ProxyConnectorConfiguration getProxyConfig()
// Show the confirm the delete of proxy connector screen.
preRequest( action );
- action.setSourceId( TEST_SOURCE_ID );
- action.setTargetId( TEST_TARGET_ID );
+ action.setSource( TEST_SOURCE_ID );
+ action.setTarget( TEST_TARGET_ID );
String status = action.confirmDelete();
assertEquals( Action.INPUT, status );
assertNoErrors( action );
// a bad source id or target id to actually delete
preRequest( action );
- action.setSourceId( "bad-source" ); // id doesn't exist.
- action.setTargetId( "bad-target" ); // id doesn't exist.
+ action.setSource( "bad-source" ); // id doesn't exist.
+ action.setTarget( "bad-target" ); // id doesn't exist.
String status = action.confirmDelete();
// Should have resulted in an error.
assertEquals( Action.ERROR, status );
assertHasErrors( action );
preRequest( action );
- action.setSourceId( "bad" ); // Bad doesn't exist.
- action.setTargetId( TEST_TARGET_ID );
+ action.setSource( "bad" ); // Bad doesn't exist.
+ action.setTarget( TEST_TARGET_ID );
status = action.confirmDelete();
// Should have resulted in an error.
assertEquals( Action.ERROR, status );
assertHasErrors( action );
preRequest( action );
- action.setSourceId( TEST_SOURCE_ID );
- action.setTargetId( "bad" ); // Bad doesn't exist.
+ action.setSource( TEST_SOURCE_ID );
+ action.setTarget( "bad" ); // Bad doesn't exist.
status = action.confirmDelete();
// Should have resulted in an error.
assertEquals( Action.ERROR, status );
// the source id or target id to actually delete
preRequest( action );
- action.setSourceId( null ); // No source Id.
- action.setTargetId( null ); // No target Id.
+ action.setSource( null ); // No source Id.
+ action.setTarget( null ); // No target Id.
String status = action.confirmDelete();
// Should have resulted in an error.
assertEquals( Action.ERROR, status );
assertHasErrors( action );
preRequest( action );
- action.setSourceId( TEST_SOURCE_ID );
- action.setTargetId( null ); // No target Id.
+ action.setSource( TEST_SOURCE_ID );
+ action.setTarget( null ); // No target Id.
status = action.confirmDelete();
// Should have resulted in an error.
assertEquals( Action.ERROR, status );
assertHasErrors( action );
preRequest( action );
- action.setSourceId( null ); // No source Id.
- action.setTargetId( TEST_TARGET_ID );
+ action.setSource( null ); // No source Id.
+ action.setTarget( TEST_TARGET_ID );
status = action.confirmDelete();
// Should have resulted in an error.
assertEquals( Action.ERROR, status );
// Show the confirm the delete of proxy connector screen.
preRequest( action );
- action.setSourceId( TEST_SOURCE_ID );
- action.setTargetId( TEST_TARGET_ID );
+ action.setSource( TEST_SOURCE_ID );
+ action.setTarget( TEST_TARGET_ID );
String status = action.confirmDelete();
assertEquals( Action.INPUT, status );
assertNoErrors( action );