class FileUploadEditor implements IsWidget, LeafAttributeEditor<String> {

    void onSubmitComplete(final String results) {
        view.clearError();
        view.setFileUploadVisible(true);
        view.setLoadingImageVisible(false);
        onValueChanged(view.getFileName());

        // Show wb notification.
        if ( "OK".equalsIgnoreCase( results ) ) {
            workbenchNotification.fire(new NotificationEvent(DashbuilderCommonConstants.INSTANCE.uploadSuccessful(), SUCCESS));
        } else if ( "FAIL".equalsIgnoreCase( results ) ) {
            workbenchNotification.fire(new NotificationEvent(DashbuilderCommonConstants.INSTANCE.uploadFailed(), ERROR));
        } else if ( "FAIL - ALREADY EXISTS".equalsIgnoreCase( results ) ) {
            workbenchNotification.fire(new NotificationEvent(DashbuilderCommonConstants.INSTANCE.uploadFailedAlreadyExists(), ERROR));
        }
    }

    @Inject public  FileUploadEditor(final Event<org.dashbuilder.common.client.event.ValueChangeEvent<String>> valueChangeEvent,
                            final Event<NotificationEvent> workbenchNotification,
                            final View view);

}