use of org.talend.daikon.properties.ValidationResultMutable in project components by Talend.
the class MarketoSourceOrSink method validateConnection.
public ValidationResult validateConnection(MarketoProvideConnectionProperties properties) {
ValidationResultMutable vr = new ValidationResultMutable().setStatus(Result.OK);
try {
MarketoSourceOrSink sos = new MarketoSourceOrSink();
sos.initialize(null, (ComponentProperties) properties);
sos.getClientService(null);
vr.setMessage(messages.getMessage("success.validation.connection"));
} catch (IOException e) {
vr.setStatus(Result.ERROR);
vr.setMessage(messages.getMessage("error.validation.connection.testconnection", e.getLocalizedMessage()));
}
return vr;
}
use of org.talend.daikon.properties.ValidationResultMutable in project components by Talend.
the class GoogleDriveValidator method validateListProperties.
public ValidationResult validateListProperties(GoogleDriveListProperties properties) {
ValidationResultMutable vr = new ValidationResultMutable(Result.OK);
if (StringUtils.isEmpty(properties.folder.getValue())) {
vr.setStatus(Result.ERROR);
vr.setMessage(messages.getMessage("error.validation.folder.empty"));
return vr;
}
return vr;
}
use of org.talend.daikon.properties.ValidationResultMutable in project components by Talend.
the class GoogleDriveValidator method validateGetProperties.
public ValidationResult validateGetProperties(GoogleDriveGetProperties properties) {
ValidationResultMutable vr = new ValidationResultMutable(Result.OK);
if (StringUtils.isEmpty(properties.file.getValue())) {
vr.setStatus(Result.ERROR);
vr.setMessage(messages.getMessage("error.validation.filename.empty"));
return vr;
}
return vr;
}
use of org.talend.daikon.properties.ValidationResultMutable in project components by Talend.
the class GoogleDriveValidator method validateDeleteProperties.
public ValidationResult validateDeleteProperties(GoogleDriveDeleteProperties properties) {
ValidationResultMutable vr = new ValidationResultMutable(Result.OK);
if (StringUtils.isEmpty(properties.file.getValue())) {
vr.setStatus(Result.ERROR);
vr.setMessage(messages.getMessage("error.validation.delete.file.empty"));
return vr;
}
return vr;
}
use of org.talend.daikon.properties.ValidationResultMutable in project components by Talend.
the class GoogleDriveValidator method validateCopyProperties.
public ValidationResult validateCopyProperties(GoogleDriveCopyProperties properties) {
ValidationResultMutable vr = new ValidationResultMutable(Result.OK);
if (StringUtils.isEmpty(properties.destinationFolder.getValue())) {
vr.setStatus(Result.ERROR);
vr.setMessage(messages.getMessage("error.validation.destinationFolderName.empty"));
return vr;
}
if (StringUtils.isEmpty(properties.source.getValue())) {
vr.setStatus(Result.ERROR);
vr.setMessage(messages.getMessage("error.validation.source.empty"));
return vr;
}
if (properties.rename.getValue()) {
if (StringUtils.isEmpty(properties.newName.getValue())) {
vr.setStatus(Result.ERROR);
vr.setMessage(messages.getMessage("error.validation.newname.empty"));
return vr;
}
}
return vr;
}
Aggregations