@Override public void execute() { // Data set definition basic attributes validation. Iterable<ConstraintViolation<?>> basicAttsViolations = validatorProvider.validateBasicAttributes(getDataSetDef()); dataSetDefBasicAttributesDriver.setConstraintViolations(basicAttsViolations); addViolations(basicAttsViolations); Iterable<ConstraintViolation<?>> violations = validate(); driver.setConstraintViolations(violations); addViolations(violations); } };
@Override public void execute() { // Data set definition basic attributes validation. Iterable<ConstraintViolation<?>> basicAttsViolations = validatorProvider.validateBasicAttributes(getDataSetDef()); dataSetDefBasicAttributesDriver.setConstraintViolations(basicAttsViolations); addViolations(basicAttsViolations); Iterable<ConstraintViolation<?>> violations = validate(); driver.setConstraintViolations(violations); addViolations(violations); } };
public DataSetEditWorkflow edit( final T definition, List<DataColumnDef> allColumns ) { clear(); this.dataSetDef = definition; checkDataSetDefNotNull(); this.driver = beanManager.lookupBean( getDriverClass() ).newInstance(); this.editor = beanManager.lookupBean( getEditorClass() ).newInstance(); driver.initialize( editor ); editor.setAcceptableValues( allColumns ); driver.edit( definition ); this.flushCommand = () -> flush(DataSetEditWorkflow.this.driver); this.stepValidator = () -> { final boolean isCacheEnabled = definition.isCacheEnabled(); final boolean isPushEnabled = definition.isPushEnabled(); final boolean isRefreshEnabled = definition.getRefreshTime() != null; Iterable<ConstraintViolation<?>> violations = validate( isCacheEnabled, isPushEnabled, isRefreshEnabled ); driver.setConstraintViolations( violations ); addViolations( violations ); }; // Show data set editor view. view.clearView(); view.add( getWidget() ); return this; }
public DataSetEditWorkflow edit( final T definition, List<DataColumnDef> allColumns ) { clear(); this.dataSetDef = definition; checkDataSetDefNotNull(); this.driver = beanManager.lookupBean( getDriverClass() ).newInstance(); this.editor = beanManager.lookupBean( getEditorClass() ).newInstance(); driver.initialize( editor ); editor.setAcceptableValues( allColumns ); driver.edit( definition ); this.flushCommand = () -> flush(DataSetEditWorkflow.this.driver); this.stepValidator = () -> { final boolean isCacheEnabled = definition.isCacheEnabled(); final boolean isPushEnabled = definition.isPushEnabled(); final boolean isRefreshEnabled = definition.getRefreshTime() != null; Iterable<ConstraintViolation<?>> violations = validate( isCacheEnabled, isPushEnabled, isRefreshEnabled ); driver.setConstraintViolations( violations ); addViolations( violations ); }; // Show data set editor view. view.clearView(); view.add( getWidget() ); return this; }