public LiferayConnectionProperties getReferencedConnectionProperties() { LiferayConnectionProperties liferayConnectionProperties = referencedComponent.getReference(); if (liferayConnectionProperties != null) { return liferayConnectionProperties; } if (getReferencedComponentId() != null) { _log.error( "Connection has a reference to '{}' but the referenced " + "Object is null", getReferencedComponentId()); } if (_log.isDebugEnabled()) { _log.debug( "Fall back to the actual instance " + "LiferayConnectionProperties for the runtime environment"); } return getLiferayConnectionProperties(); }
@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; }
@Test public void testComponentReferenceProperties() { // basic element ComponentReferenceProperties componentReferenceProperties = new ComponentReferenceProperties("testReference", "foo"); assertEquals("testReference", componentReferenceProperties.getName()); assertEquals(0, componentReferenceProperties.getForms().size()); // init componentReferenceProperties.init(); }
@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; }
public SalesforceConnectionProperties getReferencedConnectionProperties() { SalesforceConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
@Override public void setupProperties() { super.setupProperties(); referencedComponent.setReference(new AnotherProperties("componentProperties").init()); }
/** * Return referenced connection properties. * * @return referenced connection properties or {@code null} */ public GoogleDriveConnectionProperties getReferencedConnectionProperties() { GoogleDriveConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
@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; }
public SnowflakeConnectionProperties getReferencedConnectionProperties() { SnowflakeConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
@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; }
public SnowflakeConnectionProperties getReferencedConnectionProperties() { SnowflakeConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
outputProperties.referencedComponent.setReference(connectionProperties);
public SalesforceConnectionProperties getReferencedConnectionProperties() { SalesforceConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
outputProperties.referencedComponent.setReference(connectionProperties);
/** * Return referenced connection properties. * * @return referenced connection properties or {@code null} */ public GoogleDriveConnectionProperties getReferencedConnectionProperties() { GoogleDriveConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
/** * Return referenced connection properties. * * @return referenced connection properties or {@code null} */ public NetSuiteConnectionProperties getReferencedConnectionProperties() { NetSuiteConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
public TAzureStorageConnectionProperties getReferencedConnectionProperties() { TAzureStorageConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
public SnowflakeConnectionProperties getReferencedConnectionProperties() { SnowflakeConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
/** * Return referenced connection properties. * * @return referenced connection properties or {@code null} */ public NetSuiteConnectionProperties getReferencedConnectionProperties() { NetSuiteConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
public TAzureStorageConnectionProperties getReferencedConnectionProperties() { TAzureStorageConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }