/** {@inheritDoc} */ @Override protected void loadValidatedSettingsFrom(NodeSettingsRO settings) throws InvalidSettingsException { GoogleApiConnectorNodeConfiguration config = new GoogleApiConnectorNodeConfiguration(); config.loadInModel(settings); m_config = config; }
/** {@inheritDoc} */ @Override protected void validateSettings(NodeSettingsRO settings) throws InvalidSettingsException { GoogleApiConnectorNodeConfiguration config = new GoogleApiConnectorNodeConfiguration(); config.loadInModel(settings); if (StringUtils.isEmpty(config.getRefreshToken())) { throw new InvalidSettingsException("Refresh token is required"); } }
/** * @return The spec of this node, containing the GoogleApiConnection for the current configuration * @throws InvalidSettingsException If the current configuration is not valid */ private GoogleApiConnectionPortObjectSpec createSpec() throws InvalidSettingsException { return new GoogleApiConnectionPortObjectSpec(m_config.createGoogleApiConnection()); }
/** {@inheritDoc} */ @Override protected void saveSettingsTo(NodeSettingsWO settings) { m_config.save(settings); }