本文整理汇总了Java中org.pentaho.di.trans.steps.validator.Validation类的典型用法代码示例。如果您正苦于以下问题:Java Validation类的具体用法?Java Validation怎么用?Java Validation使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Validation类属于org.pentaho.di.trans.steps.validator包,在下文中一共展示了Validation类的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ValidatorDialog
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
public ValidatorDialog(Shell parent, Object in, TransMeta tr, String sname)
{
super(parent, (BaseStepMeta)in, tr, sname);
input=(ValidatorMeta)in;
// Just to make sure everything is nicely in sync...
//
java.util.List<StreamInterface> infoStreams = input.getStepIOMeta().getInfoStreams();
for (int i=0;i<infoStreams.size();i++) {
input.getValidations().get(i).setSourcingStepName(infoStreams.get(i).getStepname());
}
selectedField = null;
selectionList = new ArrayList<Validation>();
// Copy the data from the input into the map...
//
for (Validation field : input.getValidations()) {
selectionList.add(field.clone());
}
}
示例2: ok
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void ok()
{
if (Const.isEmpty(wStepname.getText())) return;
stepname = wStepname.getText(); // return value
saveChanges();
input.setChanged();
input.setValidatingAll(wValidateAll.getSelection());
input.setConcatenatingErrors(wConcatErrors.getSelection());
input.setConcatenationSeparator(wConcatSeparator.getText());
Validation[] fields = selectionList.toArray(new Validation[selectionList.size()]);
input.setValidations(fields);
dispose();
}
示例3: ValidatorDialog
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
public ValidatorDialog( Shell parent, Object in, TransMeta tr, String sname ) {
super( parent, (BaseStepMeta) in, tr, sname );
input = (ValidatorMeta) in;
// Just to make sure everything is nicely in sync...
//
java.util.List<StreamInterface> infoStreams = input.getStepIOMeta().getInfoStreams();
for ( int i = 0; i < infoStreams.size(); i++ ) {
input.getValidations().get( i ).setSourcingStepName( infoStreams.get( i ).getStepname() );
}
selectedField = null;
selectionList = new ArrayList<Validation>();
// Copy the data from the input into the map...
//
for ( Validation field : input.getValidations() ) {
selectionList.add( field.clone() );
}
}
示例4: ValidatorDialog
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
public ValidatorDialog(Shell parent, Object in, TransMeta tr, String sname)
{
super(parent, (BaseStepMeta)in, tr, sname);
input=(ValidatorMeta)in;
selectedField = null;
selectionList = new ArrayList<Validation>();
// Copy the data from the input into the map...
//
for (Validation field : input.getValidations()) {
selectionList.add(field.clone());
}
}
示例5: getValidatorFieldData
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void getValidatorFieldData(Validation field) {
wDescription.setText(Const.NVL(field.getName(), ""));
wFieldName.setText(Const.NVL(field.getFieldName(), ""));
wErrorCode.setText(Const.NVL(field.getErrorCode(), ""));
wErrorDescription.setText(Const.NVL(field.getErrorDescription(), ""));
wDataTypeVerified.setSelection(field.isDataTypeVerified());
wDataType.setText(ValueMeta.getTypeDesc(field.getDataType()));
wConversionMask.setText(Const.NVL(field.getConversionMask(), ""));
wDecimalSymbol.setText(Const.NVL(field.getDecimalSymbol(), ""));
wGroupingSymbol.setText(Const.NVL(field.getGroupingSymbol(), ""));
wNullAllowed.setSelection(field.isNullAllowed());
wOnlyNullAllowed.setSelection(field.isOnlyNullAllowed());
wOnlyNumeric.setSelection(field.isOnlyNumericAllowed());
if (field.getMaximumLength()>=0) wMaxLength.setText(Integer.toString(field.getMaximumLength())); else wMaxLength.setText("");
if (field.getMinimumLength()>=0) wMinLength.setText(Integer.toString(field.getMinimumLength())); else wMinLength.setText("");
wMaxValue.setText(Const.NVL(field.getMaximumValue(), ""));
wMinValue.setText(Const.NVL(field.getMinimumValue(), ""));
wStartStringExpected.setText(Const.NVL(field.getStartString(), ""));
wEndStringExpected.setText(Const.NVL(field.getEndString(), ""));
wStartStringDisallowed.setText(Const.NVL(field.getStartStringNotAllowed(), ""));
wEndStringDisallowed.setText(Const.NVL(field.getEndStringNotAllowed(), ""));
wRegExpExpected.setText(Const.NVL(field.getRegularExpression(), ""));
wRegExpDisallowed.setText(Const.NVL(field.getRegularExpressionNotAllowed(), ""));
wAllowedValues.removeAll();
if (field.getAllowedValues()!=null) {
for (String allowedValue : field.getAllowedValues()) {
wAllowedValues.add(Const.NVL(allowedValue, ""));
}
}
wSourceValues.setSelection(field.isSourcingValues());
wSourceStep.setText( field.getSourcingStep()!=null ? field.getSourcingStep().getName() : "" );
wSourceField.setText(Const.NVL(field.getSourcingField(), ""));
}
示例6: getData
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
/**
* Copy information from the meta-data input to the dialog fields.
*/
public void getData()
{
// Populate the list of validations...
//
refreshValidationsList();
enableFields();
wValidateAll.setSelection(input.isValidatingAll());
wConcatErrors.setSelection(input.isConcatenatingErrors());
wConcatSeparator.setText(Const.NVL(input.getConcatenationSeparator(), ""));
// Select the first available field...
//
if (input.getValidations().length>0) {
Validation validatorField = input.getValidations()[0];
String description = validatorField.getName();
int index = wValidationsList.indexOf(description);
if (index>=0) {
wValidationsList.select(index);
showSelectedValidatorField(description);
}
}
setFlags();
wStepname.selectAll();
}
示例7: getValidatorFieldData
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void getValidatorFieldData(Validation field) {
wDescription.setText(Const.NVL(field.getName(), ""));
wFieldName.setText(Const.NVL(field.getFieldName(), ""));
wErrorCode.setText(Const.NVL(field.getErrorCode(), ""));
wErrorDescription.setText(Const.NVL(field.getErrorDescription(), ""));
wDataTypeVerified.setSelection(field.isDataTypeVerified());
wDataType.setText(ValueMeta.getTypeDesc(field.getDataType()));
wConversionMask.setText(Const.NVL(field.getConversionMask(), ""));
wDecimalSymbol.setText(Const.NVL(field.getDecimalSymbol(), ""));
wGroupingSymbol.setText(Const.NVL(field.getGroupingSymbol(), ""));
wNullAllowed.setSelection(field.isNullAllowed());
wOnlyNullAllowed.setSelection(field.isOnlyNullAllowed());
wOnlyNumeric.setSelection(field.isOnlyNumericAllowed());
wMaxLength.setText(Const.NVL(field.getMaximumLength(), ""));
wMinLength.setText(Const.NVL(field.getMinimumLength(), ""));
wMaxValue.setText(Const.NVL(field.getMaximumValue(), ""));
wMinValue.setText(Const.NVL(field.getMinimumValue(), ""));
wStartStringExpected.setText(Const.NVL(field.getStartString(), ""));
wEndStringExpected.setText(Const.NVL(field.getEndString(), ""));
wStartStringDisallowed.setText(Const.NVL(field.getStartStringNotAllowed(), ""));
wEndStringDisallowed.setText(Const.NVL(field.getEndStringNotAllowed(), ""));
wRegExpExpected.setText(Const.NVL(field.getRegularExpression(), ""));
wRegExpDisallowed.setText(Const.NVL(field.getRegularExpressionNotAllowed(), ""));
wAllowedValues.removeAll();
if (field.getAllowedValues()!=null) {
for (String allowedValue : field.getAllowedValues()) {
wAllowedValues.add(Const.NVL(allowedValue, ""));
}
}
wSourceValues.setSelection(field.isSourcingValues());
wSourceStep.setText( Const.NVL(field.getSourcingStepName(), "") );
wSourceField.setText(Const.NVL(field.getSourcingField(), ""));
}
示例8: getData
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
/**
* Copy information from the meta-data input to the dialog fields.
*/
public void getData()
{
// Populate the list of validations...
//
refreshValidationsList();
enableFields();
wValidateAll.setSelection(input.isValidatingAll());
wConcatErrors.setSelection(input.isConcatenatingErrors());
wConcatSeparator.setText(Const.NVL(input.getConcatenationSeparator(), ""));
// Select the first available field...
//
if (input.getValidations().size()>0) {
Validation validatorField = input.getValidations().get(0);
String description = validatorField.getName();
int index = wValidationsList.indexOf(description);
if (index>=0) {
wValidationsList.select(index);
showSelectedValidatorField(description);
}
}
setFlags();
wStepname.selectAll();
}
示例9: getValidatorFieldData
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void getValidatorFieldData( Validation field ) {
wDescription.setText( Const.NVL( field.getName(), "" ) );
wFieldName.setText( Const.NVL( field.getFieldName(), "" ) );
wErrorCode.setText( Const.NVL( field.getErrorCode(), "" ) );
wErrorDescription.setText( Const.NVL( field.getErrorDescription(), "" ) );
wDataTypeVerified.setSelection( field.isDataTypeVerified() );
wDataType.setText( ValueMetaFactory.getValueMetaName( field.getDataType() ) );
wConversionMask.setText( Const.NVL( field.getConversionMask(), "" ) );
wDecimalSymbol.setText( Const.NVL( field.getDecimalSymbol(), "" ) );
wGroupingSymbol.setText( Const.NVL( field.getGroupingSymbol(), "" ) );
wNullAllowed.setSelection( field.isNullAllowed() );
wOnlyNullAllowed.setSelection( field.isOnlyNullAllowed() );
wOnlyNumeric.setSelection( field.isOnlyNumericAllowed() );
wMaxLength.setText( Const.NVL( field.getMaximumLength(), "" ) );
wMinLength.setText( Const.NVL( field.getMinimumLength(), "" ) );
wMaxValue.setText( Const.NVL( field.getMaximumValue(), "" ) );
wMinValue.setText( Const.NVL( field.getMinimumValue(), "" ) );
wStartStringExpected.setText( Const.NVL( field.getStartString(), "" ) );
wEndStringExpected.setText( Const.NVL( field.getEndString(), "" ) );
wStartStringDisallowed.setText( Const.NVL( field.getStartStringNotAllowed(), "" ) );
wEndStringDisallowed.setText( Const.NVL( field.getEndStringNotAllowed(), "" ) );
wRegExpExpected.setText( Const.NVL( field.getRegularExpression(), "" ) );
wRegExpDisallowed.setText( Const.NVL( field.getRegularExpressionNotAllowed(), "" ) );
wAllowedValues.removeAll();
if ( field.getAllowedValues() != null ) {
for ( String allowedValue : field.getAllowedValues() ) {
wAllowedValues.add( Const.NVL( allowedValue, "" ) );
}
}
wSourceValues.setSelection( field.isSourcingValues() );
wSourceStep.setText( Const.NVL( field.getSourcingStepName(), "" ) );
wSourceField.setText( Const.NVL( field.getSourcingField(), "" ) );
}
示例10: getData
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
/**
* Copy information from the meta-data input to the dialog fields.
*/
public void getData() {
// Populate the list of validations...
//
refreshValidationsList();
enableFields();
wValidateAll.setSelection( input.isValidatingAll() );
wConcatErrors.setSelection( input.isConcatenatingErrors() );
wConcatSeparator.setText( Const.NVL( input.getConcatenationSeparator(), "" ) );
// Select the first available field...
//
if ( input.getValidations().size() > 0 ) {
Validation validatorField = input.getValidations().get( 0 );
String description = validatorField.getName();
int index = wValidationsList.indexOf( description );
if ( index >= 0 ) {
wValidationsList.select( index );
showSelectedValidatorField( description );
}
}
setFlags();
wStepname.selectAll();
wStepname.setFocus();
}
示例11: refreshValidationsList
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void refreshValidationsList() {
wValidationsList.removeAll();
for (Validation validation : selectionList) {
wValidationsList.add(validation.getName());
}
}
示例12: refreshValidationsList
import org.pentaho.di.trans.steps.validator.Validation; //导入依赖的package包/类
private void refreshValidationsList() {
wValidationsList.removeAll();
for ( Validation validation : selectionList ) {
wValidationsList.add( validation.getName() );
}
}