/** * Gets the output schema from the properties * * @param componentProperties * @return Schema * @review */ public static Schema getOutputSchema( ComponentProperties componentProperties) { Set<? extends Connector> outputConnectors = componentProperties.getPossibleConnectors(true); if (outputConnectors == null) { return null; } for (Connector connector : outputConnectors) { if (Connector.MAIN_NAME.equals(connector.getName())) { return componentProperties.getSchema(connector, true); } } return null; }
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 void setupLayout() { super.setupLayout(); Form siteForm = Form.create(this, Form.MAIN); Widget webSitePropertyWizardWidget = Widget.widget( wizardWebSiteProperty); webSitePropertyWizardWidget.setWidgetType( Widget.NAME_SELECTION_AREA_WIDGET_TYPE); siteForm.addRow(webSitePropertyWizardWidget); refreshLayout(siteForm); }
@Override public void setupProperties() { super.setupProperties(); referencedComponent.setReference(new AnotherProperties("componentProperties").init()); }
@Override public void setupProperties() { super.setupProperties(); endpoint.setValue(_HOST); followRedirects.setValue(true); forceHttps.setValue(false); loginType.setValue(LoginType.Basic); password.setValue(_PASSWORD); siteFilter.setValue(false); userId.setValue(_USER_ID); webSiteName.setValue(""); webSiteProperty.setHost(endpoint.getValue()); webSiteProperty.setValue(""); }
@Override public void refreshLayout(Form form) { super.refreshLayout(form); String referencedComponentId = getReferencedComponentId(); boolean useOtherConnection = false; if ((referencedComponentId != null) && referencedComponentId.startsWith( TLiferayConnectionDefinition.COMPONENT_NAME)) { useOtherConnection = true; } PropertiesUtils.setHidden(form, anonymousLogin, useOtherConnection); PropertiesUtils.setHidden(form, endpoint, useOtherConnection); PropertiesUtils.setHidden(form, loginType, useOtherConnection); PropertiesUtils.setHidden(form, password, useOtherConnection); PropertiesUtils.setHidden(form, siteFilter, useOtherConnection); PropertiesUtils.setHidden(form, userId, useOtherConnection); PropertiesUtils.setHidden(form, webSiteName, useOtherConnection); PropertiesUtils.setHidden(form, webSiteProperty, useOtherConnection); if (!useOtherConnection && anonymousLogin.getValue()) { PropertiesUtils.setHidden(form, userId, true); PropertiesUtils.setHidden(form, password, true); } if (!useOtherConnection && !siteFilter.getValue()) { PropertiesUtils.setHidden(form, webSiteName, true); PropertiesUtils.setHidden(form, webSiteProperty, true); } }
@Override public Set<? extends Connector> getAvailableConnectors(ComponentProperties componentProperties, Set<? extends Connector> connectedConnetor, boolean isOuput) { return componentProperties.getAvailableConnectors(connectedConnetor, isOuput); }
public SalesforceConnectionProperties getReferencedConnectionProperties() { SalesforceConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
@Override public void setupLayout() { super.setupLayout();
@Override public void setupProperties() { super.setupProperties(); }
/** * Gets the main schema from the input connector of output components. * * @param componentProperties * @return Schema * @review */ public static Schema getMainSchemaFromInputConnector( ComponentProperties componentProperties) { Set<? extends Connector> inputConnectors = componentProperties.getPossibleConnectors(false); if (inputConnectors == null) { return null; } for (Connector connector : inputConnectors) { if (Connector.MAIN_NAME.equals(connector.getName())) { return componentProperties.getSchema(connector, false); } } return null; }
@Override public Set<? extends Connector> getAvailableConnectors(ComponentProperties componentProperties, Set<? extends Connector> connectedConnetor, boolean isOuput) { return componentProperties.getAvailableConnectors(connectedConnetor, isOuput); }
/** * 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; }
/** * Gets the reject schema from the given properties * * @param componentProperties * @return * @review */ public static Schema getRejectSchema( ComponentProperties componentProperties) { Set<? extends Connector> outputConnectors = componentProperties.getPossibleConnectors(true); if (outputConnectors == null) { return null; } for (Connector connector : outputConnectors) { if (Connector.REJECT_NAME.equals(connector.getName())) { return componentProperties.getSchema(connector, true); } } return null; }
public SnowflakeConnectionProperties getReferencedConnectionProperties() { SnowflakeConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
public SnowflakeConnectionProperties getReferencedConnectionProperties() { SnowflakeConnectionProperties refProps = referencedComponent.getReference(); if (refProps != null) { return refProps; } return null; }
public SalesforceConnectionProperties getReferencedConnectionProperties() { SalesforceConnectionProperties 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; }