public String getReferencedComponentId() { return referencedComponent.componentInstanceId.getStringValue(); }
@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 setupProperties() { super.setupProperties(); condition.setValue(""); resourceProperty.setValue(null); }
@Override public void setupLayout() { super.setupLayout(); Form mainForm = getForm(Form.MAIN); operations.setRequired(); Widget operationsWidget = Widget.widget(operations); operationsWidget.setLongRunning(true); operationsWidget.setWidgetType(Widget.ENUMERATION_WIDGET_TYPE); mainForm.addRow(operationsWidget); Widget calculateSchemaWidget = Widget.widget(calculateSchema); calculateSchemaWidget.setLongRunning(true); calculateSchemaWidget.setWidgetType(Widget.BUTTON_WIDGET_TYPE); mainForm.addRow(calculateSchemaWidget); Form advancedForm = new Form(this, Form.ADVANCED); advancedForm.addRow(dieOnError); }
public RESTClient(LiferayConnectionProperties liferayConnectionProperties) { this( liferayConnectionProperties.endpoint.getValue(), liferayConnectionProperties); }
private void _updateOutputSchemas() { if (_log.isDebugEnabled()) { _log.debug("Update output schemas"); } Schema inputSchema = resource.main.schema.getValue(); schemaFlow.schema.setValue(inputSchema); Schema rejectSchema = createRejectSchema(inputSchema); schemaReject.schema.setValue(rejectSchema); }
private Map<String, String> _getQueryParametersMap() { Map<String, String> parameters = new HashMap<>(); parameters.put( JSONLDConstants.PER_PAGE, _liferayConnectionProperties.itemsPerPage.getStringValue()); return parameters; }
public LiferayInputReader( RuntimeContainer runtimeContainer, LiferaySource liferaySource, TLiferayInputProperties tLiferayInputProperties) { super(runtimeContainer, liferaySource); liferayConnectionResourceBaseProperties = tLiferayInputProperties; _queryCondition = tLiferayInputProperties.resource.condition.getValue(); }
/** * We have to reset the schema because of a Talend's internal * mechanism. @see https://github.com/Talend/tdi-studio-se/blob/737243fcdf1591970536d46edad98d2992b16593/main/plugins/org.talend.designer.core.generic/src/main/java/org/talend/designer/core/generic/model/GenericElementParameter.java#L319 * @review */ @Override public void afterSchema() { Schema schema = resource.main.schema.getValue(); if (_log.isTraceEnabled()) { _log.trace("Schema details:\n" + schema.toString()); DebugUtils.logCurrentStackTrace(_log); } if (schema.equals(SchemaProperties.EMPTY_SCHEMA)) { resource.main.schema.setValue(temporaryMainSchema); } }
public Schema getSchema() { return resource.main.schema.getValue(); }
public String getEndpoint() { boolean forceHttps = _liferayConnectionProperties.forceHttps.getValue(); if (forceHttps) { return _replaceHttpSchemeWithHttps(_endpoint); } return _endpoint; }
public void afterEndpoint() { webSiteProperty.setHost(endpoint.getValue()); }
@SuppressWarnings("unused") private List<String> _getSchemaFieldNames(Property<Schema> schemaProperty) { Schema schema = schemaProperty.getValue(); List<String> fieldNames = new ArrayList<>(); for (Schema.Field field : schema.getFields()) { fieldNames.add(field.name()); } return fieldNames; }
public LiferayWriter( LiferayWriteOperation writeOperation, RuntimeContainer runtimeContainer, TLiferayOutputProperties tLiferayOutputProperties) { _liferayWriteOperation = writeOperation; _runtimeContainer = runtimeContainer; _tLiferayOutputProperties = tLiferayOutputProperties; _dieOnError = tLiferayOutputProperties.dieOnError.getValue(); _liferaySink = writeOperation.getSink(); _rejectWrites = new ArrayList<>(); _rejectSchema = TLiferayOutputProperties.createRejectSchema( tLiferayOutputProperties.resource.main.schema.getValue()); _successWrites = new ArrayList<>(); }
private ClientConfig _getClientConfig() { ClientConfig clientConfig = _setCredentials(_userId, _password); clientConfig = clientConfig.property( ClientProperties.CONNECT_TIMEOUT, _liferayConnectionProperties.connectTimeout.getValue() * 1000); clientConfig = clientConfig.property( ClientProperties.READ_TIMEOUT, _liferayConnectionProperties.readTimeout.getValue() * 1000); return clientConfig; }
public void setupResourceURLPrefix() { LiferayConnectionProperties liferayConnectionProperties = getEffectiveLiferayConnectionProperties(); liferayConnectionProperties.webSiteProperty.setHost( liferayConnectionProperties.endpoint.getValue()); resourceProperty.setHost( liferayConnectionProperties.endpoint.getValue()); if (liferayConnectionProperties.siteFilter.getValue()) { resourceProperty.setUriPrefix( liferayConnectionProperties.webSiteProperty.getWebSiteURL()); return; } resourceProperty.setUriPrefix( liferayConnectionProperties.endpoint.getValue()); }
public void afterOperations() { if (_log.isDebugEnabled()) { Action action = operations.getValue(); _log.debug("Selected method: " + action.getMethodName()); } refreshLayout(getForm(Form.MAIN)); refreshLayout(getForm(Form.REFERENCE)); }
public ValidationResult validateValidateCondition() { ValidationResultMutable validationResultMutable = new ValidationResultMutable(); validationResultMutable.setStatus(ValidationResult.Result.OK); LiferayConnectionProperties liferayConnectionProperties = getEffectiveLiferayConnectionProperties(); String endpointUrl = liferayConnectionProperties.endpoint.getValue(); try { URIUtils.addQueryConditionToURL(endpointUrl, condition.getValue()); } catch (Exception exception) { return ExceptionUtils.exceptionToValidationResult(exception); } return validationResultMutable; }
private Response _handleResponse( String httpMethod, Invocation.Builder builder, Entity<String> entity) { boolean followRedirects = _liferayConnectionProperties.followRedirects.getValue(); Response response; if (entity == null) { if (followRedirects) { response = _follow3Redirects(builder.method(httpMethod)); } else { response = builder.method(httpMethod); } } else { if (followRedirects) { response = _follow3Redirects( builder.method(httpMethod, entity)); } else { response = builder.method(httpMethod, entity); } } return response; }