@Override public boolean deletedField(String fieldName, Object value) { boolean modified = false; if ("componentType".equals(fieldName)) { @SuppressWarnings("unchecked") Property<String> compTypeProp = (Property<String>) value; referenceDefinitionName.setValue(compTypeProp.getValue()); modified = true; } else if ("componentProperties".equals(fieldName)) { Properties oldRef = (Properties) value; setReference(oldRef); modified = true; } return modified; }
@Override public boolean deletedField(String fieldName, Object value) { boolean modified = false; if ("componentType".equals(fieldName)) { @SuppressWarnings("unchecked") Property<String> compTypeProp = (Property<String>) value; referenceDefinitionName.setValue(compTypeProp.getValue()); modified = true; } else if ("componentProperties".equals(fieldName)) { Properties oldRef = (Properties) value; setReference(oldRef); modified = true; } return modified; }
@Override public void setupProperties() { super.setupProperties(); referencedComponent.setReference(new AnotherProperties("componentProperties").init()); }
@Override public ComponentProperties getOutputComponentProperties() { TSalesforceBulkExecProperties bulkExecProperties = new TSalesforceBulkExecProperties("bulkExecProperties"); bulkExecProperties.init(); bulkExecProperties.copyValuesFrom(this, true, true); // we need to pass also the possible values, only way from the studio to know it comes from a combo box (need to // add quotes for generation) bulkExecProperties.upsertRelationTable.columnName .setPossibleValues(upsertRelationTable.columnName.getPossibleValues()); bulkExecProperties.connection.referencedComponent.componentInstanceId .setTaggedValue(UpsertRelationTable.ADD_QUOTES, true); bulkExecProperties.module.connection.referencedComponent.componentInstanceId .setTaggedValue(UpsertRelationTable.ADD_QUOTES, true); // Seems that properties copy can't copy the reference properties if (isUseExistConnection()) { bulkExecProperties.connection.referencedComponent .setReference(connection.getReferencedConnectionProperties()); } for (Form form : bulkExecProperties.getForms()) { bulkExecProperties.refreshLayout(form); } return bulkExecProperties; }
@Override public ComponentProperties getOutputComponentProperties() { TSalesforceBulkExecProperties bulkExecProperties = new TSalesforceBulkExecProperties("bulkExecProperties"); bulkExecProperties.init(); bulkExecProperties.copyValuesFrom(this, true, true); // we need to pass also the possible values, only way from the studio to know it comes from a combo box (need to // add quotes for generation) bulkExecProperties.upsertRelationTable.columnName .setPossibleValues(upsertRelationTable.columnName.getPossibleValues()); bulkExecProperties.connection.referencedComponent.componentInstanceId .setTaggedValue(UpsertRelationTable.ADD_QUOTES, true); bulkExecProperties.module.connection.referencedComponent.componentInstanceId .setTaggedValue(UpsertRelationTable.ADD_QUOTES, true); // Seems that properties copy can't copy the reference properties if (isUseExistConnection()) { bulkExecProperties.connection.referencedComponent .setReference(connection.getReferencedConnectionProperties()); } for (Form form : bulkExecProperties.getForms()) { bulkExecProperties.refreshLayout(form); } return bulkExecProperties; }
outputProperties.referencedComponent.setReference(connectionProperties);
outputProperties.referencedComponent.setReference(connectionProperties);