target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void shouldReturnConfigFileValue() { String result = config.getConfigFile(); assertThat(result, is(CONFIG_FILE)); }
public String getConfigFile() { return getExpressionValue(configFileExpression); }
XQueryRunConfig { public String getConfigFile() { return getExpressionValue(configFileExpression); } }
XQueryRunConfig { public String getConfigFile() { return getExpressionValue(configFileExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getConfigFile() { return getExpressionValue(configFileExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariab...
XQueryRunConfig { public String getConfigFile() { return getExpressionValue(configFileExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariab...
@Test public void shouldReturnDatabaseNameValue() { String result = config.getDatabaseName(); assertThat(result, is(DATABASE_NAME)); }
public String getDatabaseName() { return getExpressionValue(databaseNameExpression); }
XQueryRunConfig { public String getDatabaseName() { return getExpressionValue(databaseNameExpression); } }
XQueryRunConfig { public String getDatabaseName() { return getExpressionValue(databaseNameExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getDatabaseName() { return getExpressionValue(databaseNameExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVa...
XQueryRunConfig { public String getDatabaseName() { return getExpressionValue(databaseNameExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVa...
@Test public void shouldReturnContextItemTypeValue() { String result = config.getContextItemType(); assertThat(result, is(CONTEXT_ITEM_TYPE)); }
public String getContextItemType() { return getExpressionValue(contextItemTypeExpression); }
XQueryRunConfig { public String getContextItemType() { return getExpressionValue(contextItemTypeExpression); } }
XQueryRunConfig { public String getContextItemType() { return getExpressionValue(contextItemTypeExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getContextItemType() { return getExpressionValue(contextItemTypeExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable>...
XQueryRunConfig { public String getContextItemType() { return getExpressionValue(contextItemTypeExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable>...
@Test public void shouldAlwaysReturnOutputMethodXml() { OutputMethodFactory outputMethodFactory = new OutputMethodFactory(mock(XQueryRunConfig.class)); Properties result = outputMethodFactory.getOutputMethodProperties(); assertThat(result.keySet().size(), is(1)); assertThat(result.getProperty(METHOD_PROPERTY_NAME), is(...
public Properties getOutputMethodProperties() { Properties props = new Properties(); props.setProperty(METHOD_PROPERTY_NAME, OUTPUT_TYPE_XML); return props; }
OutputMethodFactory { public Properties getOutputMethodProperties() { Properties props = new Properties(); props.setProperty(METHOD_PROPERTY_NAME, OUTPUT_TYPE_XML); return props; } }
OutputMethodFactory { public Properties getOutputMethodProperties() { Properties props = new Properties(); props.setProperty(METHOD_PROPERTY_NAME, OUTPUT_TYPE_XML); return props; } OutputMethodFactory(XQueryRunConfig config); }
OutputMethodFactory { public Properties getOutputMethodProperties() { Properties props = new Properties(); props.setProperty(METHOD_PROPERTY_NAME, OUTPUT_TYPE_XML); return props; } OutputMethodFactory(XQueryRunConfig config); Properties getOutputMethodProperties(); }
OutputMethodFactory { public Properties getOutputMethodProperties() { Properties props = new Properties(); props.setProperty(METHOD_PROPERTY_NAME, OUTPUT_TYPE_XML); return props; } OutputMethodFactory(XQueryRunConfig config); Properties getOutputMethodProperties(); static final String METHOD_PROPERTY_NAME; static final...
@Test public void shouldInvokeGetConnectionWithoutParametersWhenConnectionPropertiesNotSupported() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SAXON); factory.getConnection(dataSource); verify(dataSource).getConnection(); }
public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(), config.getPassword(...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
@Test public void shouldReturnDebugEnabledValue() { boolean result = config.isDebugEnabled(); assertThat(result, is(true)); }
public boolean isDebugEnabled() { return Boolean.parseBoolean(getExpressionValue(debugExpression)); }
XQueryRunConfig { public boolean isDebugEnabled() { return Boolean.parseBoolean(getExpressionValue(debugExpression)); } }
XQueryRunConfig { public boolean isDebugEnabled() { return Boolean.parseBoolean(getExpressionValue(debugExpression)); } XQueryRunConfig(String xml); }
XQueryRunConfig { public boolean isDebugEnabled() { return Boolean.parseBoolean(getExpressionValue(debugExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunner...
XQueryRunConfig { public boolean isDebugEnabled() { return Boolean.parseBoolean(getExpressionValue(debugExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunner...
@Test public void shouldInvokeGetConnectionWithParametersWhenConnectionPropertiesAreSupportedAndSet() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.MARKLOGIC); given(config.getUsername()).willReturn(USER); given(config.getPassword()).willReturn(PASSWORD); factory.getConnection(dat...
public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(), config.getPassword(...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
@Test public void shouldInvokeGetConnectionWithoutParametersWhenConnectionPropertiesAreSupportedAndUsernameNotSet() throws Exception { given(config.getUsername()).willReturn(null); given(config.getDataSourceType()).willReturn(XQueryDataSourceType.MARKLOGIC); factory.getConnection(dataSource); verify(dataSource).getConn...
public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(), config.getPassword(...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
@Test public void shouldInvokeGetConnectionWithoutParametersWhenConnectionPropertiesAreSupportedAndUsernameSetEmpty() throws Exception { given(config.getUsername()).willReturn(""); given(config.getDataSourceType()).willReturn(XQueryDataSourceType.MARKLOGIC); factory.getConnection(dataSource); verify(dataSource).getConn...
public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(), config.getPassword(...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
ConnectionFactory { public XQConnection getConnection(XQDataSource dataSource) throws Exception { XQConnection connection; if (config.getDataSourceType().connectionPropertiesAreSupported() && config.getUsername() != null && config.getUsername().length() > 0) { connection = dataSource.getConnection(config.getUsername(),...
@Test public void shouldGetDataSourceWithoutSettingProperties() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SAXON); factory.getDataSource(); verifyNoMoreInteractions(dataSource); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldSetHostOnDataSourceWhenConnectionPropertiesSupportedAndHostNotEmpty() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getHost()).willReturn(HOST); factory.getDataSource(); verify(dataSource).setProperty(SERVER_NAME, HOST); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldNotSetHostOnDataSourceWhenConnectionPropertiesSupportedAndHostEmpty() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getHost()).willReturn(""); factory.getDataSource(); verifyNoMoreInteractions(dataSource); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldNotSetHostOnDataSourceWhenConnectionPropertiesSupportedAndHostNotSet() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getHost()).willReturn(null); factory.getDataSource(); verifyNoMoreInteractions(dataSource); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldSetPortOnDataSourceWhenConnectionPropertiesSupportedAndPortNotEmpty() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getPort()).willReturn(PORT_VALUE); factory.getDataSource(); verify(dataSource).setProperty(PORT, PORT_VALUE); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldNotSetPortOnDataSourceWhenConnectionPropertiesSupportedAndPortEmpty() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getPort()).willReturn(""); factory.getDataSource(); verifyNoMoreInteractions(dataSource); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldNotSetPortOnDataSourceWhenConnectionPropertiesSupportedAndPortNotSet() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getPort()).willReturn(null); factory.getDataSource(); verifyNoMoreInteractions(dataSource); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldReturnDebugPortValue() { String result = config.getDebugPort(); assertThat(result, is("9000")); }
public String getDebugPort() { return getExpressionValue(debugPortExpression); }
XQueryRunConfig { public String getDebugPort() { return getExpressionValue(debugPortExpression); } }
XQueryRunConfig { public String getDebugPort() { return getExpressionValue(debugPortExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getDebugPort() { return getExpressionValue(debugPortExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariable...
XQueryRunConfig { public String getDebugPort() { return getExpressionValue(debugPortExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable> getVariable...
@Test public void shouldSetDbNameOnDataSourceWhenConnectionPropertiesSupportedAndDbNameNotEmpty() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getDatabaseName()).willReturn(DB_NAME); factory.getDataSource(); verify(dataSource).setProperty(DATABASE_NAME, DB_NA...
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldNotSetDbNameOnDataSourceWhenConnectionPropertiesSupportedAndDbNameEmpty() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getDatabaseName()).willReturn(""); factory.getDataSource(); verifyNoMoreInteractions(dataSource); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldNotSetDbNameOnDataSourceWhenConnectionPropertiesSupportedAndDbNameNotSet() throws Exception { given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getDatabaseName()).willReturn(null); factory.getDataSource(); verifyNoMoreInteractions(dataSource); }
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldGetDataSourceBasedOnDataSourceType() throws Exception { factory = new DataSourceFactory(config); given(config.getDataSourceType()).willReturn(XQueryDataSourceType.SEDNA); given(config.getHost()).willReturn("host"); given(config.getPort()).willReturn("123"); XQDataSource result = factory.getDataS...
public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length() > 0) { dataSource...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
DataSourceFactory { public XQDataSource getDataSource() throws Exception { XQueryDataSourceType dataSourceType = config.getDataSourceType(); XQDataSource dataSource = getXQDataSource(dataSourceType, config); if (dataSourceType.connectionPropertiesAreSupported()) { if (config.getHost() != null && config.getHost().length...
@Test public void shouldPrepareExpressionUsingConnection() throws Exception { InputStream inputStream = mock(InputStream.class); given(contentFactory.getXQueryContentAsStream()).willReturn(inputStream); factory.getExpression(connection); verify(contentFactory).getXQueryContentAsStream(); verify(connection).prepareExpre...
public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(connection, preparedE...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
@Test public void shouldBindContextItem() throws Exception { factory.getExpression(connection); verify(contextItemBinder).bindContextItem(connection, expression); }
public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(connection, preparedE...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
@Test public void shouldBindVariables() throws Exception { factory.getExpression(connection); verify(variablesBinder).bindVariables(connection, expression); }
public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(connection, preparedE...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
ExpressionFactory { public XQPreparedExpression getExpression(XQConnection connection) throws Exception { XQPreparedExpression preparedExpression = connection .prepareExpression(contentFactory.getXQueryContentAsStream()); contextItemBinder.bindContextItem(connection, preparedExpression); variablesBinder.bindVariables(c...
@Test public void shouldCreateAttributeType() throws Exception { binder.bind(expression, connection, qName, VALUE, TYPE); verify(connection).createAttributeType(null, XQItemType.XQBASETYPE_ANYSIMPLETYPE); }
@Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); }
AttributeBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); } }
AttributeBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); } }
AttributeBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); } @Override void bind(XQPreparedExpression expression, XQCon...
AttributeBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); } @Override void bind(XQPreparedExpression expression, XQCon...
@Test public void shouldBindNode() throws Exception { binder.bind(expression, connection, qName, VALUE, TYPE); verify(expression).bindNode(eq(qName), isA(Node.class), eq(xqItemType)); }
@Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); }
AttributeBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); } }
AttributeBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); } }
AttributeBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); } @Override void bind(XQPreparedExpression expression, XQCon...
AttributeBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createAttributeNode(value), getType(connection)); } @Override void bind(XQPreparedExpression expression, XQCon...
@Test public void shouldCreateAtomicTypeUsingConnection() throws Exception { binder.bind(expression, connection, qName, VALUE, TYPE); verify(connection).createAtomicType(anyInt()); }
@Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); }
AtomicValueBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); } }
AtomicValueBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); } }
AtomicValueBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); } @Override void bind(XQPreparedExpression expression, XQConnectio...
AtomicValueBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); } @Override void bind(XQPreparedExpression expression, XQConnectio...
@Test public void shouldReturnContextItemEnabledValue() { boolean result = config.isContextItemEnabled(); assertThat(result, is(CONTEXT_ITEM_ENABLED)); }
public boolean isContextItemEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemEnabledExpression)); }
XQueryRunConfig { public boolean isContextItemEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemEnabledExpression)); } }
XQueryRunConfig { public boolean isContextItemEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemEnabledExpression)); } XQueryRunConfig(String xml); }
XQueryRunConfig { public boolean isContextItemEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemEnabledExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText()...
XQueryRunConfig { public boolean isContextItemEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemEnabledExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText()...
@Test public void shouldBindAtomicValue() throws Exception { binder.bind(expression, connection, qName, VALUE, TYPE); verify(expression).bindAtomicValue(qName, VALUE, xqItemType); }
@Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); }
AtomicValueBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); } }
AtomicValueBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); } }
AtomicValueBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); } @Override void bind(XQPreparedExpression expression, XQConnectio...
AtomicValueBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindAtomicValue(name, value, getType(connection, type)); } @Override void bind(XQPreparedExpression expression, XQConnectio...
@Test public void shouldCreateDocumentTypeUsingConnection() throws Exception { binder.bind(expression, connection, qName, VALUE, TYPE); verify(connection).createTextType(); }
@Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); }
TextBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); } }
TextBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); } }
TextBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); } @Override void bind(XQPreparedExpression expression, XQConnection co...
TextBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); } @Override void bind(XQPreparedExpression expression, XQConnection co...
@Test public void shouldBindNode() throws Exception { binder.bind(expression, connection, qName, VALUE, TYPE); verify(expression).bindNode(eq(qName), isA(Node.class), eq(xqItemType)); }
@Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); }
TextBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); } }
TextBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); } }
TextBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); } @Override void bind(XQPreparedExpression expression, XQConnection co...
TextBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindNode(name, createTextNode(value), getType(connection)); } @Override void bind(XQPreparedExpression expression, XQConnection co...
@Test public void shouldBindDocument() throws Exception { binder.bind(expression, connection, qName, VALUE, TYPE); verify(expression).bindDocument(qName, VALUE, null, null); }
@Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindDocument(name, value, null, null); }
DocumentBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindDocument(name, value, null, null); } }
DocumentBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindDocument(name, value, null, null); } }
DocumentBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindDocument(name, value, null, null); } @Override void bind(XQPreparedExpression expression, XQConnection connection, QName n...
DocumentBinder implements TypeBinder { @Override public void bind(XQPreparedExpression expression, XQConnection connection, QName name, String value, String type) throws Exception { expression.bindDocument(name, value, null, null); } @Override void bind(XQPreparedExpression expression, XQConnection connection, QName n...
@Test(expected = RuntimeException.class) public void shouldThrowExceptionForInvalidNameWithNotEnoughDetails() { extractor.getName(SEPARATOR, ""); }
public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) { namespacePrefix...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
@Test(expected = RuntimeException.class) public void shouldThrowExceptionForInvalidNameWithTooManyColons() { extractor.getName("a:b:c", ""); }
public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) { namespacePrefix...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
@Test public void shouldReturnQNameWithLocalPartOnly() { QName result = extractor.getName(LOCAL_PART, null); assertThat(result.getLocalPart(), is(LOCAL_PART)); assertThat(result.getNamespaceURI(), is(DEFAULT_NS_PREFIX)); assertThat(result.getPrefix(), is(DEFAULT_NS_PREFIX)); }
public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) { namespacePrefix...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
@Test public void shouldReturnQNameWithLocalPartAndPrefix() { QName result = extractor.getName(PREFIX + SEPARATOR + LOCAL_PART, null); assertThat(result.getLocalPart(), is(LOCAL_PART)); assertThat(result.getNamespaceURI(), is(DEFAULT_NS_PREFIX)); assertThat(result.getPrefix(), is(PREFIX)); }
public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) { namespacePrefix...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
@Test public void shouldReturnQNameWithLocalPartAndEmptyNamespace() { QName result = extractor.getName(LOCAL_PART, DEFAULT_NS_PREFIX); assertThat(result.getLocalPart(), is(LOCAL_PART)); assertThat(result.getNamespaceURI(), is(DEFAULT_NS_PREFIX)); assertThat(result.getPrefix(), is(DEFAULT_NS_PREFIX)); }
public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) { namespacePrefix...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
@Test public void shouldReturnQNameWithLocalPartAndPrefixAndEmptyNamespace() { QName result = extractor.getName(PREFIX + SEPARATOR + LOCAL_PART, DEFAULT_NS_PREFIX); assertThat(result.getLocalPart(), is(LOCAL_PART)); assertThat(result.getNamespaceURI(), is(DEFAULT_NS_PREFIX)); assertThat(result.getPrefix(), is(PREFIX));...
public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) { namespacePrefix...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
@Test public void shouldReturnContextItemFromEditorEnabledValue() { boolean result = config.isContextItemFromEditorEnabled(); assertThat(result, is(CONTEXT_ITEM_FROM_EDITOR_ENABLED)); }
public boolean isContextItemFromEditorEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemFromEditorEnabledExpression)); }
XQueryRunConfig { public boolean isContextItemFromEditorEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemFromEditorEnabledExpression)); } }
XQueryRunConfig { public boolean isContextItemFromEditorEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemFromEditorEnabledExpression)); } XQueryRunConfig(String xml); }
XQueryRunConfig { public boolean isContextItemFromEditorEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemFromEditorEnabledExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String ...
XQueryRunConfig { public boolean isContextItemFromEditorEnabled() { return Boolean.parseBoolean(getExpressionValue(contextItemFromEditorEnabledExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String ...
@Test public void shouldReturnQNameWithLocalPartAndNamespace() { QName result = extractor.getName(LOCAL_PART, NAMESPACE); assertThat(result.getLocalPart(), is(LOCAL_PART)); assertThat(result.getNamespaceURI(), is(NAMESPACE)); assertThat(result.getPrefix(), is(DEFAULT_NS_PREFIX)); }
public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) { namespacePrefix...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
@Test public void shouldReturnQNameWithLocalPartAndPrefixAndNamespace() { QName result = extractor.getName(PREFIX + SEPARATOR + LOCAL_PART, NAMESPACE); assertThat(result.getLocalPart(), is(LOCAL_PART)); assertThat(result.getNamespaceURI(), is(NAMESPACE)); assertThat(result.getPrefix(), is(PREFIX)); }
public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) { namespacePrefix...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
NameExtractor { public QName getName(String name, String namespace) { String[] parts = name.split(":"); if (parts.length < 1 || parts.length > 2) { throw new RuntimeException("Variable name '" + name + "' is invalid"); } String namespacePrefix = null; String localPart = parts[parts.length - 1]; if (parts.length == 2) {...
@Test public void shouldReturnContextItemFileValue() { String result = config.getContextItemFile(); assertThat(result, is(CONTEXT_ITEM_FILE_NAME)); }
public String getContextItemFile() { return getExpressionValue(contextItemFileExpression); }
XQueryRunConfig { public String getContextItemFile() { return getExpressionValue(contextItemFileExpression); } }
XQueryRunConfig { public String getContextItemFile() { return getExpressionValue(contextItemFileExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getContextItemFile() { return getExpressionValue(contextItemFileExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable>...
XQueryRunConfig { public String getContextItemFile() { return getExpressionValue(contextItemFileExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable>...
@Test public void shouldReturnContextItemTextValue() { String result = config.getContextItemText(); assertThat(result, is(INNER_XML)); }
public String getContextItemText() { return getExpressionValue(contextItemTextExpression); }
XQueryRunConfig { public String getContextItemText() { return getExpressionValue(contextItemTextExpression); } }
XQueryRunConfig { public String getContextItemText() { return getExpressionValue(contextItemTextExpression); } XQueryRunConfig(String xml); }
XQueryRunConfig { public String getContextItemText() { return getExpressionValue(contextItemTextExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable>...
XQueryRunConfig { public String getContextItemText() { return getExpressionValue(contextItemTextExpression); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String getContextItemText(); List<XQueryRunnerVariable>...
@Test public void shouldReturnZeroVariables() throws Exception { config = new XQueryRunConfig("<run/>"); List<XQueryRunnerVariable> result = config.getVariables(); assertThat(result.size(), is(0)); }
public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { String baseXPath =...
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { ...
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { ...
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { ...
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { ...
@Test public void shouldReturnVariables() { List<XQueryRunnerVariable> result = config.getVariables(); assertThat(result.get(0).ACTIVE, is(VARIABLE_ACTIVE)); assertThat(result.get(0).NAME, is(VARIABLE_NAME)); assertThat(result.get(0).NAMESPACE, is(VARIABLE_NAMESPACE)); assertThat(result.get(0).TYPE, is(VARIABLE_TYPE));...
public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { String baseXPath =...
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { ...
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { ...
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { ...
XQueryRunConfig { public List<XQueryRunnerVariable> getVariables() { String count = getExpressionValue(numberOfVariablesExpression); int numberOfVariables = Integer.valueOf(count); List<XQueryRunnerVariable> result = new ArrayList<XQueryRunnerVariable>(numberOfVariables); for (int i = 1; i <= numberOfVariables; i++) { ...
@Test public void shouldReturnDataSourceType() { XQueryDataSourceType result = config.getDataSourceType(); assertThat(result, is(DATA_SOURCE_TYPE)); }
public XQueryDataSourceType getDataSourceType() { return XQueryDataSourceType.getForName(getExpressionValue(dataSourceTypeExpression)); }
XQueryRunConfig { public XQueryDataSourceType getDataSourceType() { return XQueryDataSourceType.getForName(getExpressionValue(dataSourceTypeExpression)); } }
XQueryRunConfig { public XQueryDataSourceType getDataSourceType() { return XQueryDataSourceType.getForName(getExpressionValue(dataSourceTypeExpression)); } XQueryRunConfig(String xml); }
XQueryRunConfig { public XQueryDataSourceType getDataSourceType() { return XQueryDataSourceType.getForName(getExpressionValue(dataSourceTypeExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String get...
XQueryRunConfig { public XQueryDataSourceType getDataSourceType() { return XQueryDataSourceType.getForName(getExpressionValue(dataSourceTypeExpression)); } XQueryRunConfig(String xml); String getMainFile(); boolean isContextItemEnabled(); boolean isContextItemFromEditorEnabled(); String getContextItemFile(); String get...
@Test public void test() { TaskCallback callback = new TaskCallback() { @Override public void doNotify(Object notify) { System.err.println(JSON.toJSONString(notify)); } }; List list = new ArrayList(); TaskItem taskItem = new TaskItem("asas") { @Override public BusinessWrapper<String> runTask() { return null; } }; list....
public void doInvoke() { if (taskItemList.isEmpty()) { return; } for(TaskItem item : taskItemList) { BusinessWrapper<String> result = item.runTask(); callback.doNotify(result); if (!result.isSuccess()) { logger.warn("run task={} failure, result={}", item.getTaskName(), result.getMsg()); break; } else { logger.info("run...
TaskChain { public void doInvoke() { if (taskItemList.isEmpty()) { return; } for(TaskItem item : taskItemList) { BusinessWrapper<String> result = item.runTask(); callback.doNotify(result); if (!result.isSuccess()) { logger.warn("run task={} failure, result={}", item.getTaskName(), result.getMsg()); break; } else { logg...
TaskChain { public void doInvoke() { if (taskItemList.isEmpty()) { return; } for(TaskItem item : taskItemList) { BusinessWrapper<String> result = item.runTask(); callback.doNotify(result); if (!result.isSuccess()) { logger.warn("run task={} failure, result={}", item.getTaskName(), result.getMsg()); break; } else { logg...
TaskChain { public void doInvoke() { if (taskItemList.isEmpty()) { return; } for(TaskItem item : taskItemList) { BusinessWrapper<String> result = item.runTask(); callback.doNotify(result); if (!result.isSuccess()) { logger.warn("run task={} failure, result={}", item.getTaskName(), result.getMsg()); break; } else { logg...
TaskChain { public void doInvoke() { if (taskItemList.isEmpty()) { return; } for(TaskItem item : taskItemList) { BusinessWrapper<String> result = item.runTask(); callback.doNotify(result); if (!result.isSuccess()) { logger.warn("run task={} failure, result={}", item.getTaskName(), result.getMsg()); break; } else { logg...
@Test public void testdoSendNewTodo() { UserDO sponsorUser = new UserDO(); sponsorUser.setDisplayName("飞雪"); UserDO userDO = new UserDO(); userDO.setMail("xiaozh@net"); userDO.setDisplayName("飞雪"); TodoDailyDO dailyDO = new TodoDailyDO(); TodoConfigDO levelOne = new TodoConfigDO(); levelOne.setConfigName("测试一级类目"); Tod...
public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify(sponsorUser, d...
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify...
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify...
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify...
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify...
@Test public void testdoSendNewTodo2() { UserDO sponsorUser = new UserDO(); sponsorUser.setDisplayName("梁荐"); UserDO userDO = new UserDO(); userDO.setMail("@net"); userDO.setDisplayName("梁荐"); TodoDailyDO dailyDO = new TodoDailyDO(); TodoConfigDO levelOne = new TodoConfigDO(); levelOne.setConfigName("测试一级类目"); TodoConf...
public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify(sponsorUser, d...
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify...
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify...
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify...
EmailService { public boolean doSendNewTodo(UserDO userDO, TodoDailyVO dailyVO, UserDO sponsorUser) { logger.info("send new todo email to:" + userDO.getUsername() + " for id:" + dailyVO.getId()); try { HtmlEmail email = buildHtmlEmail(userDO.getMail(), userDO.getDisplayName()); email.setHtmlMsg(TplUtils.doNewTodoNotify...
@Test public void testQuerListProject() { List<String> projects = aliyunLogManageServiceImpl.queryListProject(); System.err.println("Projects:" + projects.toString() + "\n"); }
private List<Project> queryListProject(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListProjectRequest req = new ListProjectRequest(project, offset, size); List<Project> projects = new ArrayList<>(); try { projects = client.ListProject(req)...
AliyunLogManageServiceImpl implements AliyunLogManageService { private List<Project> queryListProject(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListProjectRequest req = new ListProjectRequest(project, offset, size); List<Project> project...
AliyunLogManageServiceImpl implements AliyunLogManageService { private List<Project> queryListProject(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListProjectRequest req = new ListProjectRequest(project, offset, size); List<Project> project...
AliyunLogManageServiceImpl implements AliyunLogManageService { private List<Project> queryListProject(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListProjectRequest req = new ListProjectRequest(project, offset, size); List<Project> project...
AliyunLogManageServiceImpl implements AliyunLogManageService { private List<Project> queryListProject(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListProjectRequest req = new ListProjectRequest(project, offset, size); List<Project> project...
@Test public void testQuerListLogStores() { List<String> logStores = aliyunLogManageServiceImpl.queryListLogStores("collect-web-service-logs"); System.err.println("ListLogs:" + logStores.toString() + "\n"); }
@Override public List<String> queryListLogStores(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListLogStoresRequest req = new ListLogStoresRequest(project, offset, size, logStoreSubName); ArrayList<String> logStores = new ArrayList<>(); try ...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public List<String> queryListLogStores(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListLogStoresRequest req = new ListLogStoresRequest(project, offset, size, logStore...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public List<String> queryListLogStores(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListLogStoresRequest req = new ListLogStoresRequest(project, offset, size, logStore...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public List<String> queryListLogStores(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListLogStoresRequest req = new ListLogStoresRequest(project, offset, size, logStore...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public List<String> queryListLogStores(String project) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 100; String logStoreSubName = ""; ListLogStoresRequest req = new ListLogStoresRequest(project, offset, size, logStore...
@Test public void testQueryListLogs() { List<String> list = aliyunLogManageServiceImpl.queryListMachineGroup("collect-web-service-logs",""); System.err.println("MachineGroups:" + list.toString() + "\n"); }
@Override public List<String> queryListMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 50; ListMachineGroupRequest req = new ListMachineGroupRequest(project, groupName, offset, size); List<String> machineGroups = new ArrayList<>(); try { machineG...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public List<String> queryListMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 50; ListMachineGroupRequest req = new ListMachineGroupRequest(project, groupName, offset, size);...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public List<String> queryListMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 50; ListMachineGroupRequest req = new ListMachineGroupRequest(project, groupName, offset, size);...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public List<String> queryListMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 50; ListMachineGroupRequest req = new ListMachineGroupRequest(project, groupName, offset, size);...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public List<String> queryListMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); int offset = 0; int size = 50; ListMachineGroupRequest req = new ListMachineGroupRequest(project, groupName, offset, size);...
@Test public void testGetMachineGroup() { MachineGroup mg = aliyunLogManageServiceImpl.getMachineGroup("collect-web-service-logs","group_trade"); System.err.println("MachineGroup:" + mg.toString() + "\n"); }
@Override public MachineGroup getMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); GetMachineGroupRequest req = new GetMachineGroupRequest(project, groupName); MachineGroup machineGroup = new MachineGroup(); try { machineGroup = client.GetMachineGroup(req).GetMachineGroup();...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public MachineGroup getMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); GetMachineGroupRequest req = new GetMachineGroupRequest(project, groupName); MachineGroup machineGroup = new MachineGroup(); try ...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public MachineGroup getMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); GetMachineGroupRequest req = new GetMachineGroupRequest(project, groupName); MachineGroup machineGroup = new MachineGroup(); try ...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public MachineGroup getMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); GetMachineGroupRequest req = new GetMachineGroupRequest(project, groupName); MachineGroup machineGroup = new MachineGroup(); try ...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public MachineGroup getMachineGroup(String project, String groupName) { Client client = aliyunLogService.acqClient(); GetMachineGroupRequest req = new GetMachineGroupRequest(project, groupName); MachineGroup machineGroup = new MachineGroup(); try ...
@Test public void testSaveServerGroupCfg() { ServerGroupDO serverGroupDO = serverGroupDao.queryServerGroupByName("group_member"); LogServiceServerGroupCfgVO cfgVO = new LogServiceServerGroupCfgVO(serverGroupDO); cfgVO.setProject("collect-web-service-logs"); cfgVO.setLogstore("logstore_apps"); System.err.println(aliyunL...
@Override public BusinessWrapper<Boolean> saveServerGroupCfg(LogServiceServerGroupCfgVO cfgVO) { if (StringUtils.isEmpty(cfgVO.getTopic())) cfgVO.setTopic(cfgVO.getServerGroupDO().getName()); if (StringUtils.isEmpty(cfgVO.getServerGroupName())) cfgVO.setServerGroupName(cfgVO.getServerGroupDO().getName()); if (cfgVO.get...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public BusinessWrapper<Boolean> saveServerGroupCfg(LogServiceServerGroupCfgVO cfgVO) { if (StringUtils.isEmpty(cfgVO.getTopic())) cfgVO.setTopic(cfgVO.getServerGroupDO().getName()); if (StringUtils.isEmpty(cfgVO.getServerGroupName())) cfgVO.setSer...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public BusinessWrapper<Boolean> saveServerGroupCfg(LogServiceServerGroupCfgVO cfgVO) { if (StringUtils.isEmpty(cfgVO.getTopic())) cfgVO.setTopic(cfgVO.getServerGroupDO().getName()); if (StringUtils.isEmpty(cfgVO.getServerGroupName())) cfgVO.setSer...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public BusinessWrapper<Boolean> saveServerGroupCfg(LogServiceServerGroupCfgVO cfgVO) { if (StringUtils.isEmpty(cfgVO.getTopic())) cfgVO.setTopic(cfgVO.getServerGroupDO().getName()); if (StringUtils.isEmpty(cfgVO.getServerGroupName())) cfgVO.setSer...
AliyunLogManageServiceImpl implements AliyunLogManageService { @Override public BusinessWrapper<Boolean> saveServerGroupCfg(LogServiceServerGroupCfgVO cfgVO) { if (StringUtils.isEmpty(cfgVO.getTopic())) cfgVO.setTopic(cfgVO.getServerGroupDO().getName()); if (StringUtils.isEmpty(cfgVO.getServerGroupName())) cfgVO.setSer...
@Test public void addUser() { UserDO userDO = new UserDO(); userDO.setUsername("test003"); userDO.setPwd("123456"); userDO.setMail("userTest001@qq.com"); userDO.setDisplayName("测试账户"); System.err.println(authService.addUser(userDO)); }
public BusinessWrapper<Boolean> addUser(UserDO userDO) { if (StringUtils.isEmpty(userDO.getUsername())) return new BusinessWrapper<>(ErrorCode.usernameIsNull); UserDO ldapUserDO = getUserByName(userDO.getUsername()); if (ldapUserDO != null) { userDao.saveUserInfo(ldapUserDO); userService.addUserMobile(ldapUserDO.getId(...
AuthServiceImpl implements AuthService, InitializingBean { public BusinessWrapper<Boolean> addUser(UserDO userDO) { if (StringUtils.isEmpty(userDO.getUsername())) return new BusinessWrapper<>(ErrorCode.usernameIsNull); UserDO ldapUserDO = getUserByName(userDO.getUsername()); if (ldapUserDO != null) { userDao.saveUserIn...
AuthServiceImpl implements AuthService, InitializingBean { public BusinessWrapper<Boolean> addUser(UserDO userDO) { if (StringUtils.isEmpty(userDO.getUsername())) return new BusinessWrapper<>(ErrorCode.usernameIsNull); UserDO ldapUserDO = getUserByName(userDO.getUsername()); if (ldapUserDO != null) { userDao.saveUserIn...
AuthServiceImpl implements AuthService, InitializingBean { public BusinessWrapper<Boolean> addUser(UserDO userDO) { if (StringUtils.isEmpty(userDO.getUsername())) return new BusinessWrapper<>(ErrorCode.usernameIsNull); UserDO ldapUserDO = getUserByName(userDO.getUsername()); if (ldapUserDO != null) { userDao.saveUserIn...
AuthServiceImpl implements AuthService, InitializingBean { public BusinessWrapper<Boolean> addUser(UserDO userDO) { if (StringUtils.isEmpty(userDO.getUsername())) return new BusinessWrapper<>(ErrorCode.usernameIsNull); UserDO ldapUserDO = getUserByName(userDO.getUsername()); if (ldapUserDO != null) { userDao.saveUserIn...
@Test public void testAddMemberToGroup() { UserDO userDO = new UserDO(); userDO.setUsername("liangjian"); System.err.println(authService.addMemberToGroup(userDO, "bamboo-trade")); }
@Override public boolean addMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.ADD_ATTRIBUTE); }
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean addMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.ADD_ATTRIBUTE); } }
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean addMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.ADD_ATTRIBUTE); } }
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean addMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.ADD_ATTRIBUTE); } @Override BusinessWrapper<UserDO> ...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean addMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.ADD_ATTRIBUTE); } @Override BusinessWrapper<UserDO> ...
@Test public void testDelMemberToGroup() { UserDO userDO = new UserDO(); ServerGroupDO serverGroupDO = new ServerGroupDO(); userDO.setUsername("liangjan"); serverGroupDO.setName("group_wmtback"); }
@Override public boolean delMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (!checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.REMOVE_ATTRIBUTE); }
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean delMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (!checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.REMOVE_ATTRIBUTE); } }
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean delMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (!checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.REMOVE_ATTRIBUTE); } }
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean delMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (!checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.REMOVE_ATTRIBUTE); } @Override BusinessWrapper<User...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean delMemberToGroup(UserDO userDO, ServerGroupDO serverGroupDO) { if (!checkUserInLdapGroup(userDO, serverGroupDO)) return true; return chgMemberToGroup(userDO, serverGroupDO, DirContext.REMOVE_ATTRIBUTE); } @Override BusinessWrapper<User...
@Test public void test() { IP ip=new IP("10.100.1.0"); System.err.println(ip.getIPSection()); IP ip2=new IP("10.100.1.0/32"); System.err.println(ip2.getIPSection()); IP ip3=new IP("10.100.1.0/255.255.255.250"); System.err.println(ip3.getIPSection()); IP ip4=new IP("10.100.1.a"); System.err.println(ip4.getIPSection()); ...
public String getIPSection(){ if(ip==null) return null; if(netmask == null || netmask.equals("32")){ return ip; } else{ return ip+"/"+netmask; } }
IP { public String getIPSection(){ if(ip==null) return null; if(netmask == null || netmask.equals("32")){ return ip; } else{ return ip+"/"+netmask; } } }
IP { public String getIPSection(){ if(ip==null) return null; if(netmask == null || netmask.equals("32")){ return ip; } else{ return ip+"/"+netmask; } } IP(String ip); IP(String ip, String netmask); IP(String ip, String netmask, String getway); }
IP { public String getIPSection(){ if(ip==null) return null; if(netmask == null || netmask.equals("32")){ return ip; } else{ return ip+"/"+netmask; } } IP(String ip); IP(String ip, String netmask); IP(String ip, String netmask, String getway); String getIp(); Boolean isPublicIP(); String toString(); String getIPSecti...
IP { public String getIPSection(){ if(ip==null) return null; if(netmask == null || netmask.equals("32")){ return ip; } else{ return ip+"/"+netmask; } } IP(String ip); IP(String ip, String netmask); IP(String ip, String netmask, String getway); String getIp(); Boolean isPublicIP(); String toString(); String getIPSecti...
@Test public void testCheckUserInLdapGroup() { System.err.println(authService.isJiraUsers("xiaozhenxing")); System.err.println(authService.isConfluenceUsers("xiaozhenxing")); }
@Override public boolean checkUserInLdapGroup(UserDO userDO, ServerGroupDO serverGroupDO) { List<String> groups = searchBambooGroupFilter(userDO.getUsername()); for (String groupName : groups) { if (serverGroupDO.getName().equals(groupName)) return true; } return false; }
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean checkUserInLdapGroup(UserDO userDO, ServerGroupDO serverGroupDO) { List<String> groups = searchBambooGroupFilter(userDO.getUsername()); for (String groupName : groups) { if (serverGroupDO.getName().equals(groupName)) return true; } retu...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean checkUserInLdapGroup(UserDO userDO, ServerGroupDO serverGroupDO) { List<String> groups = searchBambooGroupFilter(userDO.getUsername()); for (String groupName : groups) { if (serverGroupDO.getName().equals(groupName)) return true; } retu...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean checkUserInLdapGroup(UserDO userDO, ServerGroupDO serverGroupDO) { List<String> groups = searchBambooGroupFilter(userDO.getUsername()); for (String groupName : groups) { if (serverGroupDO.getName().equals(groupName)) return true; } retu...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean checkUserInLdapGroup(UserDO userDO, ServerGroupDO serverGroupDO) { List<String> groups = searchBambooGroupFilter(userDO.getUsername()); for (String groupName : groups) { if (serverGroupDO.getName().equals(groupName)) return true; } retu...
@Test public void testCheckUserInLdap() { System.err.println(authService.checkUserInLdap("zhangsimeng")); }
@Override public boolean checkUserInLdap(String username) { HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(LdapItemEnum.LDAP_USER_DN.getItemKey()); try { String dn = "cn=" + username + "," + userDN; DirContextAdapter adapter = (DirContextAdapter) ldapFactory.getLdapTemplateInstanceByT...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean checkUserInLdap(String username) { HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(LdapItemEnum.LDAP_USER_DN.getItemKey()); try { String dn = "cn=" + username + "," + userDN; DirContextAdapter adapter =...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean checkUserInLdap(String username) { HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(LdapItemEnum.LDAP_USER_DN.getItemKey()); try { String dn = "cn=" + username + "," + userDN; DirContextAdapter adapter =...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean checkUserInLdap(String username) { HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(LdapItemEnum.LDAP_USER_DN.getItemKey()); try { String dn = "cn=" + username + "," + userDN; DirContextAdapter adapter =...
AuthServiceImpl implements AuthService, InitializingBean { @Override public boolean checkUserInLdap(String username) { HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(LdapItemEnum.LDAP_USER_DN.getItemKey()); try { String dn = "cn=" + username + "," + userDN; DirContextAdapter adapter =...
@Test public void testUnbindUser() { System.err.println(authService.unbindUser("chenhongtu")); System.err.println(authService.checkUserInLdap("chenhongtu")); }
@Override public BusinessWrapper<Boolean> unbindUser(String username) { LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(LdapItemEnum.LDAP_USER_DN.getItemKey()); String dn = "cn=" ...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<Boolean> unbindUser(String username) { LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<Boolean> unbindUser(String username) { LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<Boolean> unbindUser(String username) { LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<Boolean> unbindUser(String username) { LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); HashMap<String, String> configMap = acqConfigMap(); String userDN = configMap.get(...
@Test public void testUserLeaving() { authService.delUser("zhengyan"); }
@Override public BusinessWrapper<Boolean> delUser(String username) { if (invokeEnv.equals("daily")) { return new BusinessWrapper<>(true); } LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); coreLogger.warn("del user for:" + username); UserDO userDO = userDao.getU...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<Boolean> delUser(String username) { if (invokeEnv.equals("daily")) { return new BusinessWrapper<>(true); } LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); coreLogger.war...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<Boolean> delUser(String username) { if (invokeEnv.equals("daily")) { return new BusinessWrapper<>(true); } LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); coreLogger.war...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<Boolean> delUser(String username) { if (invokeEnv.equals("daily")) { return new BusinessWrapper<>(true); } LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); coreLogger.war...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<Boolean> delUser(String username) { if (invokeEnv.equals("daily")) { return new BusinessWrapper<>(true); } LdapTemplate ldapTemplate = ldapFactory.getLdapTemplateInstanceByType(LdapDO.LdapTypeEnum.cmdb.getDesc()); coreLogger.war...
@Test public void testSearchBambooGroup() { List<String> groups = authService.searchBambooGroup(); for (String group : groups) { System.err.println(group); } }
@Override public List<String> searchBambooGroup() { HashMap<String, String> configMap = acqConfigMap(); String groupDN = configMap.get(LdapItemEnum.LDAP_GROUP_DN.getItemKey()); String groupFilter = configMap.get(LdapItemEnum.LDAP_GROUP_FILTER.getItemKey()); List<String> groups = Collections.EMPTY_LIST; try { groups = l...
AuthServiceImpl implements AuthService, InitializingBean { @Override public List<String> searchBambooGroup() { HashMap<String, String> configMap = acqConfigMap(); String groupDN = configMap.get(LdapItemEnum.LDAP_GROUP_DN.getItemKey()); String groupFilter = configMap.get(LdapItemEnum.LDAP_GROUP_FILTER.getItemKey()); Lis...
AuthServiceImpl implements AuthService, InitializingBean { @Override public List<String> searchBambooGroup() { HashMap<String, String> configMap = acqConfigMap(); String groupDN = configMap.get(LdapItemEnum.LDAP_GROUP_DN.getItemKey()); String groupFilter = configMap.get(LdapItemEnum.LDAP_GROUP_FILTER.getItemKey()); Lis...
AuthServiceImpl implements AuthService, InitializingBean { @Override public List<String> searchBambooGroup() { HashMap<String, String> configMap = acqConfigMap(); String groupDN = configMap.get(LdapItemEnum.LDAP_GROUP_DN.getItemKey()); String groupFilter = configMap.get(LdapItemEnum.LDAP_GROUP_FILTER.getItemKey()); Lis...
AuthServiceImpl implements AuthService, InitializingBean { @Override public List<String> searchBambooGroup() { HashMap<String, String> configMap = acqConfigMap(); String groupDN = configMap.get(LdapItemEnum.LDAP_GROUP_DN.getItemKey()); String groupFilter = configMap.get(LdapItemEnum.LDAP_GROUP_FILTER.getItemKey()); Lis...
@Test public void testLogin() { String username = "aaaa"; String password = "1234"; System.err.println(authService.loginCredentialCheck(username, password)); }
@Override public BusinessWrapper<UserDO> loginCredentialCheck(String username, String password) { logger.info("user :" + username + " try login!"); if (org.springframework.util.StringUtils.isEmpty(username)) return new BusinessWrapper<>(ErrorCode.serverFailure); if (org.springframework.util.StringUtils.isEmpty(password...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<UserDO> loginCredentialCheck(String username, String password) { logger.info("user :" + username + " try login!"); if (org.springframework.util.StringUtils.isEmpty(username)) return new BusinessWrapper<>(ErrorCode.serverFailure)...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<UserDO> loginCredentialCheck(String username, String password) { logger.info("user :" + username + " try login!"); if (org.springframework.util.StringUtils.isEmpty(username)) return new BusinessWrapper<>(ErrorCode.serverFailure)...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<UserDO> loginCredentialCheck(String username, String password) { logger.info("user :" + username + " try login!"); if (org.springframework.util.StringUtils.isEmpty(username)) return new BusinessWrapper<>(ErrorCode.serverFailure)...
AuthServiceImpl implements AuthService, InitializingBean { @Override public BusinessWrapper<UserDO> loginCredentialCheck(String username, String password) { logger.info("user :" + username + " try login!"); if (org.springframework.util.StringUtils.isEmpty(username)) return new BusinessWrapper<>(ErrorCode.serverFailure)...
@Test public void testReadLog() { aliyunLogServiceImpl.readLog("collect-nginx-logs","ka-www"); }
public void readLog(String project, String logstore) { Client client = acqClient(); int shard_id = 0; long curTimeInSec = System.currentTimeMillis() / 1000; try { GetCursorResponse cursorRes = client.GetCursor(project, logstore, shard_id, curTimeInSec - 3600); String beginCursor = cursorRes.GetCursor(); cursorRes = cli...
AliyunLogServiceImpl implements AliyunLogService { public void readLog(String project, String logstore) { Client client = acqClient(); int shard_id = 0; long curTimeInSec = System.currentTimeMillis() / 1000; try { GetCursorResponse cursorRes = client.GetCursor(project, logstore, shard_id, curTimeInSec - 3600); String b...
AliyunLogServiceImpl implements AliyunLogService { public void readLog(String project, String logstore) { Client client = acqClient(); int shard_id = 0; long curTimeInSec = System.currentTimeMillis() / 1000; try { GetCursorResponse cursorRes = client.GetCursor(project, logstore, shard_id, curTimeInSec - 3600); String b...
AliyunLogServiceImpl implements AliyunLogService { public void readLog(String project, String logstore) { Client client = acqClient(); int shard_id = 0; long curTimeInSec = System.currentTimeMillis() / 1000; try { GetCursorResponse cursorRes = client.GetCursor(project, logstore, shard_id, curTimeInSec - 3600); String b...
AliyunLogServiceImpl implements AliyunLogService { public void readLog(String project, String logstore) { Client client = acqClient(); int shard_id = 0; long curTimeInSec = System.currentTimeMillis() / 1000; try { GetCursorResponse cursorRes = client.GetCursor(project, logstore, shard_id, curTimeInSec - 3600); String b...
@Test public void testdoScanRepoAndTransRemote() { ExplainInfo explainInfo = new ExplainInfo(); explainInfo.setRepo("http: explainInfo.setScanPath(JSON.toJSONString(Arrays.asList("cmdb/cmdb-service/src/main/resources/sql"))); explainInfo.setNotifyEmails(JSON.toJSONString(Arrays.asList("xiaozhenxing@net"))); ExplainDTO ...
@Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git.getRepository()); refSet.remove("HEAD"); refSet...
ExplainServiceImpl implements ExplainService { @Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git....
ExplainServiceImpl implements ExplainService { @Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git....
ExplainServiceImpl implements ExplainService { @Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git....
ExplainServiceImpl implements ExplainService { @Override public Set<String> doScanRepo(ExplainDTO explainDTO) { try { Git git = GitProcessor.cloneRepository(localPath + "/explain/" + explainDTO.getId() + "/", explainDTO.getRepo(), username, pwd, Collections.EMPTY_LIST); Set<String> refSet = GitProcessor.getRefList(git....
@Test public void test() { List<TodoDetailVO> list = todoServiceImpl.queryMyTodoJob("by"); }
public List<TodoDetailVO> queryMyTodoJob(String username) { List<UserDO> users = authService.queryUsersByRoleName(TodoDO.TodoTypeEnum.devops.getDesc()); boolean isDevops = false; List<TodoDetailDO> todoDetailList = new ArrayList<>(); for (UserDO userDO : users) { if (userDO.getUsername().equals(username)) { todoDetailL...
TodoServiceImpl implements TodoService { public List<TodoDetailVO> queryMyTodoJob(String username) { List<UserDO> users = authService.queryUsersByRoleName(TodoDO.TodoTypeEnum.devops.getDesc()); boolean isDevops = false; List<TodoDetailDO> todoDetailList = new ArrayList<>(); for (UserDO userDO : users) { if (userDO.getU...
TodoServiceImpl implements TodoService { public List<TodoDetailVO> queryMyTodoJob(String username) { List<UserDO> users = authService.queryUsersByRoleName(TodoDO.TodoTypeEnum.devops.getDesc()); boolean isDevops = false; List<TodoDetailDO> todoDetailList = new ArrayList<>(); for (UserDO userDO : users) { if (userDO.getU...
TodoServiceImpl implements TodoService { public List<TodoDetailVO> queryMyTodoJob(String username) { List<UserDO> users = authService.queryUsersByRoleName(TodoDO.TodoTypeEnum.devops.getDesc()); boolean isDevops = false; List<TodoDetailDO> todoDetailList = new ArrayList<>(); for (UserDO userDO : users) { if (userDO.getU...
TodoServiceImpl implements TodoService { public List<TodoDetailVO> queryMyTodoJob(String username) { List<UserDO> users = authService.queryUsersByRoleName(TodoDO.TodoTypeEnum.devops.getDesc()); boolean isDevops = false; List<TodoDetailDO> todoDetailList = new ArrayList<>(); for (UserDO userDO : users) { if (userDO.getU...
@Test public void test2() { TodoDetailDO todoDetailDO = todoDao.queryTodoDetailById(24l); TodoDetailVO todoDetailVO = new TodoDetailVO(todoDetailDO); todoServiceImpl.invokeTodoDetailVO(todoDetailVO); System.err.println(todoDetailVO); emailService.doSendSubmitTodo(todoDetailVO); }
public void invokeTodoDetailVO(TodoDetailVO todoDetailVO) { int id = (int) todoDetailVO.getTodoId(); switch (id) { case 1: List<TodoKeyboxDetailDO> todoKeyboxDetailList = todoDao.queryTodoKeyboxDetailByTodoDetailId(todoDetailVO.getId()); List<TodoKeyboxDetailVO> todoKeyboxDetailVOList = new ArrayList<>(); for (TodoKeyb...
TodoServiceImpl implements TodoService { public void invokeTodoDetailVO(TodoDetailVO todoDetailVO) { int id = (int) todoDetailVO.getTodoId(); switch (id) { case 1: List<TodoKeyboxDetailDO> todoKeyboxDetailList = todoDao.queryTodoKeyboxDetailByTodoDetailId(todoDetailVO.getId()); List<TodoKeyboxDetailVO> todoKeyboxDetail...
TodoServiceImpl implements TodoService { public void invokeTodoDetailVO(TodoDetailVO todoDetailVO) { int id = (int) todoDetailVO.getTodoId(); switch (id) { case 1: List<TodoKeyboxDetailDO> todoKeyboxDetailList = todoDao.queryTodoKeyboxDetailByTodoDetailId(todoDetailVO.getId()); List<TodoKeyboxDetailVO> todoKeyboxDetail...
TodoServiceImpl implements TodoService { public void invokeTodoDetailVO(TodoDetailVO todoDetailVO) { int id = (int) todoDetailVO.getTodoId(); switch (id) { case 1: List<TodoKeyboxDetailDO> todoKeyboxDetailList = todoDao.queryTodoKeyboxDetailByTodoDetailId(todoDetailVO.getId()); List<TodoKeyboxDetailVO> todoKeyboxDetail...
TodoServiceImpl implements TodoService { public void invokeTodoDetailVO(TodoDetailVO todoDetailVO) { int id = (int) todoDetailVO.getTodoId(); switch (id) { case 1: List<TodoKeyboxDetailDO> todoKeyboxDetailList = todoDao.queryTodoKeyboxDetailByTodoDetailId(todoDetailVO.getId()); List<TodoKeyboxDetailVO> todoKeyboxDetail...
@Test public void test() { IptablesRule ir = new IptablesRule("80", "HTTP/NGINX"); System.err.println(ir.getRule()); List<IP> ipList = new ArrayList<IP>(); ipList.add(new IP("10.17.0.0/8")); IptablesRule ir2 = new IptablesRule(ipList, "内网"); System.err.println(ir2.getRule()); ipList.add(new IP("192.168.0.0/16")); ipLis...
public String getRule() { buildRuleByType(); return getDesc() + getRuleHead() + ruleBody; }
IptablesRule { public String getRule() { buildRuleByType(); return getDesc() + getRuleHead() + ruleBody; } }
IptablesRule { public String getRule() { buildRuleByType(); return getDesc() + getRuleHead() + ruleBody; } IptablesRule(String port, List<IP> ips, int ruleType, String desc); IptablesRule(String port, List<IP> ips, String desc); IptablesRule(String port, String desc); IptablesRule(List<IP> ips, String desc); }
IptablesRule { public String getRule() { buildRuleByType(); return getDesc() + getRuleHead() + ruleBody; } IptablesRule(String port, List<IP> ips, int ruleType, String desc); IptablesRule(String port, List<IP> ips, String desc); IptablesRule(String port, String desc); IptablesRule(List<IP> ips, String desc); String ...
IptablesRule { public String getRule() { buildRuleByType(); return getDesc() + getRuleHead() + ruleBody; } IptablesRule(String port, List<IP> ips, int ruleType, String desc); IptablesRule(String port, List<IP> ips, String desc); IptablesRule(String port, String desc); IptablesRule(List<IP> ips, String desc); String ...
@Test public void testQueryServerGroupByName() { ServerGroupDO serverGroupDO=serverGroupDao.queryServerGroupByName("group_zsearch-solr-engine"); System.err.println(zabbixHistoryServiceImpl.queryHistory(serverGroupDO)); }
@Override public List<Map<String, Object>> queryHistory(ServerGroupDO serverGroupDO) { List result = new ArrayList<>(); List<ServerDO> listServerDO = serverDao.acqServersByGroupId(serverGroupDO.getId()); if (listServerDO == null || listServerDO.size() == 0) { return result; } for (ServerDO serverDO : listServerDO) { if...
ZabbixHistoryServiceImpl implements ZabbixHistoryService { @Override public List<Map<String, Object>> queryHistory(ServerGroupDO serverGroupDO) { List result = new ArrayList<>(); List<ServerDO> listServerDO = serverDao.acqServersByGroupId(serverGroupDO.getId()); if (listServerDO == null || listServerDO.size() == 0) { r...
ZabbixHistoryServiceImpl implements ZabbixHistoryService { @Override public List<Map<String, Object>> queryHistory(ServerGroupDO serverGroupDO) { List result = new ArrayList<>(); List<ServerDO> listServerDO = serverDao.acqServersByGroupId(serverGroupDO.getId()); if (listServerDO == null || listServerDO.size() == 0) { r...
ZabbixHistoryServiceImpl implements ZabbixHistoryService { @Override public List<Map<String, Object>> queryHistory(ServerGroupDO serverGroupDO) { List result = new ArrayList<>(); List<ServerDO> listServerDO = serverDao.acqServersByGroupId(serverGroupDO.getId()); if (listServerDO == null || listServerDO.size() == 0) { r...
ZabbixHistoryServiceImpl implements ZabbixHistoryService { @Override public List<Map<String, Object>> queryHistory(ServerGroupDO serverGroupDO) { List result = new ArrayList<>(); List<ServerDO> listServerDO = serverDao.acqServersByGroupId(serverGroupDO.getId()); if (listServerDO == null || listServerDO.size() == 0) { r...
@Test public void testQueryCpuUser() { ServerDO serverDO = serverDao.getServerInfoById(31); JSONObject response=zabbixHistoryService.queryCpuUser(serverDO, 1); String value=zabbixHistoryService.acqResultValue(response); System.err.println(value); }
@Override public JSONObject queryCpuUser(ServerDO serverDO, int limit) { return historyGet(serverDO, null, ZabbixHistoryItemEnum.CPU_USER.getItemKey(), historyTypeNumericFloat, limit); }
ZabbixHistoryServiceImpl implements ZabbixHistoryService { @Override public JSONObject queryCpuUser(ServerDO serverDO, int limit) { return historyGet(serverDO, null, ZabbixHistoryItemEnum.CPU_USER.getItemKey(), historyTypeNumericFloat, limit); } }
ZabbixHistoryServiceImpl implements ZabbixHistoryService { @Override public JSONObject queryCpuUser(ServerDO serverDO, int limit) { return historyGet(serverDO, null, ZabbixHistoryItemEnum.CPU_USER.getItemKey(), historyTypeNumericFloat, limit); } }
ZabbixHistoryServiceImpl implements ZabbixHistoryService { @Override public JSONObject queryCpuUser(ServerDO serverDO, int limit) { return historyGet(serverDO, null, ZabbixHistoryItemEnum.CPU_USER.getItemKey(), historyTypeNumericFloat, limit); } @Override String acqResultValue(JSONObject response); @Override JSONObjec...
ZabbixHistoryServiceImpl implements ZabbixHistoryService { @Override public JSONObject queryCpuUser(ServerDO serverDO, int limit) { return historyGet(serverDO, null, ZabbixHistoryItemEnum.CPU_USER.getItemKey(), historyTypeNumericFloat, limit); } @Override String acqResultValue(JSONObject response); @Override JSONObjec...
@Test public void testUsergroupCreate() { ServerGroupDO serverGroupDO = serverGroupDao.queryServerGroupByName("group_baoherp"); System.err.println(zabbixServiceImpl.usergroupCreate(serverGroupDO)); }
@Override public int usergroupCreate(ServerGroupDO serverGroupDO) { String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int id = usergroupGet(usergrpName); if (id != 0) return id; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("usergroup.create").build(); request.putParam("name"...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int usergroupCreate(ServerGroupDO serverGroupDO) { String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int id = usergroupGet(usergrpName); if (id != 0) return id; ZabbixRequest request = ZabbixRequestBuilder.newBuilder...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int usergroupCreate(ServerGroupDO serverGroupDO) { String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int id = usergroupGet(usergrpName); if (id != 0) return id; ZabbixRequest request = ZabbixRequestBuilder.newBuilder...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int usergroupCreate(ServerGroupDO serverGroupDO) { String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int id = usergroupGet(usergrpName); if (id != 0) return id; ZabbixRequest request = ZabbixRequestBuilder.newBuilder...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int usergroupCreate(ServerGroupDO serverGroupDO) { String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int id = usergroupGet(usergrpName); if (id != 0) return id; ZabbixRequest request = ZabbixRequestBuilder.newBuilder...
@Test public void testUserCreate() { UserDO userDO = userDao.getUserByName("zhonghongsheng"); System.err.println(userDO); System.err.println(zabbixServiceImpl.userCreate(userDO)); }
@Override public BusinessWrapper<Boolean> userCreate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("user.create").build(); request.putParam("alias", userDO.getUsernam...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userCreate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("use...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userCreate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("use...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userCreate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("use...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userCreate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("use...
@Test public void testUserDelete() { UserDO userDO = userDao.getUserByName("chenyuyu"); System.err.println(userDO); System.err.println(zabbixServiceImpl.userDelete(userDO)); }
@Override public BusinessWrapper<Boolean> userDelete(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); int userid = this.userGet(userDO); if (userid == 0) return new BusinessWrapper<>(true); ZabbixRequest request = ZabbixRequestBuilder....
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userDelete(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); int userid = this.userGet(userDO); if (userid == 0) return new Busines...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userDelete(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); int userid = this.userGet(userDO); if (userid == 0) return new Busines...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userDelete(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); int userid = this.userGet(userDO); if (userid == 0) return new Busines...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userDelete(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); int userid = this.userGet(userDO); if (userid == 0) return new Busines...
@Test public void testSyncUser() { zabbixServiceImpl.syncUser(); }
@Override public BusinessWrapper<Boolean> syncUser() { List<UserDO> listUserDO = userDao.getAllUser(); for (UserDO userDO : listUserDO) { if (userDO.getAuthed() == UserDO.AuthType.noAuth.getCode()) continue; if (userGet(userDO) != 0) { userDO.setZabbixAuthed(UserDO.AuthType.authed.getCode()); userDao.updateUserZabbixAu...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> syncUser() { List<UserDO> listUserDO = userDao.getAllUser(); for (UserDO userDO : listUserDO) { if (userDO.getAuthed() == UserDO.AuthType.noAuth.getCode()) continue; if (userGet(userDO) != 0) { userDO.setZabbixAuthe...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> syncUser() { List<UserDO> listUserDO = userDao.getAllUser(); for (UserDO userDO : listUserDO) { if (userDO.getAuthed() == UserDO.AuthType.noAuth.getCode()) continue; if (userGet(userDO) != 0) { userDO.setZabbixAuthe...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> syncUser() { List<UserDO> listUserDO = userDao.getAllUser(); for (UserDO userDO : listUserDO) { if (userDO.getAuthed() == UserDO.AuthType.noAuth.getCode()) continue; if (userGet(userDO) != 0) { userDO.setZabbixAuthe...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> syncUser() { List<UserDO> listUserDO = userDao.getAllUser(); for (UserDO userDO : listUserDO) { if (userDO.getAuthed() == UserDO.AuthType.noAuth.getCode()) continue; if (userGet(userDO) != 0) { userDO.setZabbixAuthe...
@Test public void testUserUpdate() { UserDO userDO = userDao.getUserByName("chenyuyu"); zabbixServiceImpl.userUpdate(userDO); }
@Override public BusinessWrapper<Boolean> userUpdate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("user.update").build(); request.putParam("userid", userGet(userDO))...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userUpdate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("use...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userUpdate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("use...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userUpdate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("use...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> userUpdate(UserDO userDO) { if (userDO == null) return new BusinessWrapper<>(ErrorCode.userNotExist.getCode(), ErrorCode.userNotExist.getMsg()); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("use...
@Test public void testCi() { zabbixServiceImpl.ci("7ab6ed9458b3cb477ecee026d85e5b42",ZabbixServiceImpl.hostStatusEnable, "trade","trade-production-1", "production",11111112L, "release-1", 1,"trade-master",false, "liangjian",0,"master",0); }
@Override public BusinessWrapper<Boolean> ci(String key, int type, String project, String group, String env, Long deployId, String bambooDeployVersion, int bambooBuildNumber, String bambooDeployProject, boolean bambooDeployRollback, String bambooManualBuildTriggerReasonUserName, int errorCode, String branchName, int de...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> ci(String key, int type, String project, String group, String env, Long deployId, String bambooDeployVersion, int bambooBuildNumber, String bambooDeployProject, boolean bambooDeployRollback, String bambooManualBuild...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> ci(String key, int type, String project, String group, String env, Long deployId, String bambooDeployVersion, int bambooBuildNumber, String bambooDeployProject, boolean bambooDeployRollback, String bambooManualBuild...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> ci(String key, int type, String project, String group, String env, Long deployId, String bambooDeployVersion, int bambooBuildNumber, String bambooDeployProject, boolean bambooDeployRollback, String bambooManualBuild...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public BusinessWrapper<Boolean> ci(String key, int type, String project, String group, String env, Long deployId, String bambooDeployVersion, int bambooBuildNumber, String bambooDeployProject, boolean bambooDeployRollback, String bambooManualBuild...
@Test public void testActionGet() { }
private int actionGet(ServerGroupDO serverGroupDO) { if (serverGroupDO == null) return 0; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("action.get").build(); request.putParam("output", "extend"); request.putParam("selectOpera...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private int actionGet(ServerGroupDO serverGroupDO) { if (serverGroupDO == null) return 0; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("action.get").build(); requ...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private int actionGet(ServerGroupDO serverGroupDO) { if (serverGroupDO == null) return 0; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("action.get").build(); requ...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private int actionGet(ServerGroupDO serverGroupDO) { if (serverGroupDO == null) return 0; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("action.get").build(); requ...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private int actionGet(ServerGroupDO serverGroupDO) { if (serverGroupDO == null) return 0; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("action.get").build(); requ...
@Test public void testActionCreate() { ServerGroupDO serverGroupDO = new ServerGroupDO(); serverGroupDO.setName("group_sdop"); System.err.println(zabbixServiceImpl.actionCreate(serverGroupDO)); }
@Override public int actionCreate(ServerGroupDO serverGroupDO) { int actionid = actionGet(serverGroupDO); if (actionid != 0) return actionid; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("action.create").build(); request.putP...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int actionCreate(ServerGroupDO serverGroupDO) { int actionid = actionGet(serverGroupDO); if (actionid != 0) return actionid; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuil...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int actionCreate(ServerGroupDO serverGroupDO) { int actionid = actionGet(serverGroupDO); if (actionid != 0) return actionid; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuil...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int actionCreate(ServerGroupDO serverGroupDO) { int actionid = actionGet(serverGroupDO); if (actionid != 0) return actionid; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuil...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int actionCreate(ServerGroupDO serverGroupDO) { int actionid = actionGet(serverGroupDO); if (actionid != 0) return actionid; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); ZabbixRequest request = ZabbixRequestBuil...
@Test public void test() { Iptables i = new Iptables(buildRules(),"测试规则"); System.err.println(i.toBody()); }
public String toBody() { body = getInfo(); body = body + getDesc(); for (IptablesRule ir : irList) { body = body + ir.getRule() +"\n"; } return body; }
Iptables { public String toBody() { body = getInfo(); body = body + getDesc(); for (IptablesRule ir : irList) { body = body + ir.getRule() +"\n"; } return body; } }
Iptables { public String toBody() { body = getInfo(); body = body + getDesc(); for (IptablesRule ir : irList) { body = body + ir.getRule() +"\n"; } return body; } Iptables(List<IptablesRule> irList, String desc); Iptables(IptablesRule ir, String desc); }
Iptables { public String toBody() { body = getInfo(); body = body + getDesc(); for (IptablesRule ir : irList) { body = body + ir.getRule() +"\n"; } return body; } Iptables(List<IptablesRule> irList, String desc); Iptables(IptablesRule ir, String desc); String toBody(); }
Iptables { public String toBody() { body = getInfo(); body = body + getDesc(); for (IptablesRule ir : irList) { body = body + ir.getRule() +"\n"; } return body; } Iptables(List<IptablesRule> irList, String desc); Iptables(IptablesRule ir, String desc); String toBody(); }
@Test public void testHostDelete() { System.err.println("hostCreate : " + zabbixServiceImpl.delMonitor(336)); }
private boolean hostDelete(ServerDO serverDO) { if (serverDO == null) return false; int hostid = hostGet(serverDO); if (hostid == 0) return true; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.delete").paramEntry("params", new int[]{ hostid }).build(); JSONObject getResponse = call(request); in...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private boolean hostDelete(ServerDO serverDO) { if (serverDO == null) return false; int hostid = hostGet(serverDO); if (hostid == 0) return true; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.delete").paramEntry("params", new int[]...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private boolean hostDelete(ServerDO serverDO) { if (serverDO == null) return false; int hostid = hostGet(serverDO); if (hostid == 0) return true; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.delete").paramEntry("params", new int[]...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private boolean hostDelete(ServerDO serverDO) { if (serverDO == null) return false; int hostid = hostGet(serverDO); if (hostid == 0) return true; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.delete").paramEntry("params", new int[]...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private boolean hostDelete(ServerDO serverDO) { if (serverDO == null) return false; int hostid = hostGet(serverDO); if (hostid == 0) return true; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.delete").paramEntry("params", new int[]...
@Test public void testHostCreate() { System.err.println("hostCreate : " + zabbixServiceImpl.addMonitor(510)); }
private boolean hostCreate(ServerDO serverDO) { if (hostExists(serverDO)) return true; if (!hostgroupCreate(serverDO)) return false; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.create").build(); request.putParam("host", acqZabbixServerName(serverDO)); request.putParam("interfaces", acqInterf...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private boolean hostCreate(ServerDO serverDO) { if (hostExists(serverDO)) return true; if (!hostgroupCreate(serverDO)) return false; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.create").build(); request.putParam("host", acqZabbix...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private boolean hostCreate(ServerDO serverDO) { if (hostExists(serverDO)) return true; if (!hostgroupCreate(serverDO)) return false; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.create").build(); request.putParam("host", acqZabbix...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private boolean hostCreate(ServerDO serverDO) { if (hostExists(serverDO)) return true; if (!hostgroupCreate(serverDO)) return false; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.create").build(); request.putParam("host", acqZabbix...
ZabbixServiceImpl implements ZabbixService, InitializingBean { private boolean hostCreate(ServerDO serverDO) { if (hostExists(serverDO)) return true; if (!hostgroupCreate(serverDO)) return false; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("host.create").build(); request.putParam("host", acqZabbix...
@Test public void testHostExists() { ServerDO serverDO = serverDao.getServerInfoById(336); System.err.println("hostExists : " + zabbixServiceImpl.hostExists(serverDO)); }
@Override public boolean hostExists(ServerDO serverDO) { if (hostGet(serverDO) == 0) return false; return true; }
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public boolean hostExists(ServerDO serverDO) { if (hostGet(serverDO) == 0) return false; return true; } }
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public boolean hostExists(ServerDO serverDO) { if (hostGet(serverDO) == 0) return false; return true; } }
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public boolean hostExists(ServerDO serverDO) { if (hostGet(serverDO) == 0) return false; return true; } @Override String getApiVersion(); @Override boolean hostExists(ServerDO serverDO); @Override int hostGetStatus(ServerDO serverDO); @Deprecated...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public boolean hostExists(ServerDO serverDO) { if (hostGet(serverDO) == 0) return false; return true; } @Override String getApiVersion(); @Override boolean hostExists(ServerDO serverDO); @Override int hostGetStatus(ServerDO serverDO); @Deprecated...
@Test public void testHostGetStatus() { ServerDO serverDO = serverDao.getServerInfoById(336); System.err.println("hostGetStatus : " + zabbixServiceImpl.hostGetStatus(serverDO)); }
@Override public int hostGetStatus(ServerDO serverDO) { if (serverDO == null) return 0; JSONObject filter = new JSONObject(); filter.put("ip", acqServerMonitorIp(serverDO)); JSONObject getResponse = call(ZabbixRequestBuilder.newBuilder() .method("host.get").paramEntry("filter", filter) .build()); return getResultId(get...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int hostGetStatus(ServerDO serverDO) { if (serverDO == null) return 0; JSONObject filter = new JSONObject(); filter.put("ip", acqServerMonitorIp(serverDO)); JSONObject getResponse = call(ZabbixRequestBuilder.newBuilder() .method("host.get")...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int hostGetStatus(ServerDO serverDO) { if (serverDO == null) return 0; JSONObject filter = new JSONObject(); filter.put("ip", acqServerMonitorIp(serverDO)); JSONObject getResponse = call(ZabbixRequestBuilder.newBuilder() .method("host.get")...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int hostGetStatus(ServerDO serverDO) { if (serverDO == null) return 0; JSONObject filter = new JSONObject(); filter.put("ip", acqServerMonitorIp(serverDO)); JSONObject getResponse = call(ZabbixRequestBuilder.newBuilder() .method("host.get")...
ZabbixServiceImpl implements ZabbixService, InitializingBean { @Override public int hostGetStatus(ServerDO serverDO) { if (serverDO == null) return 0; JSONObject filter = new JSONObject(); filter.put("ip", acqServerMonitorIp(serverDO)); JSONObject getResponse = call(ZabbixRequestBuilder.newBuilder() .method("host.get")...
@Test public void testItems() { ServerDO serverDO = serverDao.getServerInfoById(31); System.err.println("itemGet : " + zabbixServiceImpl.itemGet(serverDO,"CPU", "system.cpu.util[,user]")); }
public int itemGet(ServerDO serverDO, String itemName, String itemKey) { if (serverDO == null) return 0; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("item.get").build(); request.putParam("output", "extend"); request.putParam("hostids", hostGet(serverDO)); if (itemName != null) { JSONObject name = ...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public int itemGet(ServerDO serverDO, String itemName, String itemKey) { if (serverDO == null) return 0; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("item.get").build(); request.putParam("output", "extend"); request.putParam("hostids",...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public int itemGet(ServerDO serverDO, String itemName, String itemKey) { if (serverDO == null) return 0; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("item.get").build(); request.putParam("output", "extend"); request.putParam("hostids",...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public int itemGet(ServerDO serverDO, String itemName, String itemKey) { if (serverDO == null) return 0; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("item.get").build(); request.putParam("output", "extend"); request.putParam("hostids",...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public int itemGet(ServerDO serverDO, String itemName, String itemKey) { if (serverDO == null) return 0; ZabbixRequest request = ZabbixRequestBuilder.newBuilder() .method("item.get").build(); request.putParam("output", "extend"); request.putParam("hostids",...
@Test public void testApi() { zabbixServiceImpl.api(0, "7ab6ed9458b3cb477ecee026d85e5b42", "trade", "trade-gray", "gray"); }
public void api(int statusType, String key, String project, String group, String env) { if (!apiCheckKey(key)) return; ServerGroupDO serverGroupDO = serverGroupDao.queryServerGroupByName("group_" + project); if (serverGroupDO == null) return; List<ServerDO> servers = serverDao.acqServersByGroupId(serverGroupDO.getId())...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public void api(int statusType, String key, String project, String group, String env) { if (!apiCheckKey(key)) return; ServerGroupDO serverGroupDO = serverGroupDao.queryServerGroupByName("group_" + project); if (serverGroupDO == null) return; List<ServerDO>...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public void api(int statusType, String key, String project, String group, String env) { if (!apiCheckKey(key)) return; ServerGroupDO serverGroupDO = serverGroupDao.queryServerGroupByName("group_" + project); if (serverGroupDO == null) return; List<ServerDO>...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public void api(int statusType, String key, String project, String group, String env) { if (!apiCheckKey(key)) return; ServerGroupDO serverGroupDO = serverGroupDao.queryServerGroupByName("group_" + project); if (serverGroupDO == null) return; List<ServerDO>...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public void api(int statusType, String key, String project, String group, String env) { if (!apiCheckKey(key)) return; ServerGroupDO serverGroupDO = serverGroupDao.queryServerGroupByName("group_" + project); if (serverGroupDO == null) return; List<ServerDO>...
@Test public void testUser() { UserDO userDO = new UserDO(); userDO.setUsername("liangjian"); ServerGroupDO serverGroupDO= new ServerGroupDO(); serverGroupDO.setName("group_ci"); System.err.println(zabbixServiceImpl.checkUserInUsergroup(userDO,serverGroupDO)); }
public int checkUserInUsergroup(UserDO userDO, ServerGroupDO serverGroupDO) { int userid = this.userGet(userDO); if (userid == 0) return 2; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int usrgrpid = usergroupGet(usergrpName); if (usrgrpid == 0) return 3; ZabbixRequest request = ZabbixReque...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public int checkUserInUsergroup(UserDO userDO, ServerGroupDO serverGroupDO) { int userid = this.userGet(userDO); if (userid == 0) return 2; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int usrgrpid = usergroupGet(usergrpName); i...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public int checkUserInUsergroup(UserDO userDO, ServerGroupDO serverGroupDO) { int userid = this.userGet(userDO); if (userid == 0) return 2; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int usrgrpid = usergroupGet(usergrpName); i...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public int checkUserInUsergroup(UserDO userDO, ServerGroupDO serverGroupDO) { int userid = this.userGet(userDO); if (userid == 0) return 2; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int usrgrpid = usergroupGet(usergrpName); i...
ZabbixServiceImpl implements ZabbixService, InitializingBean { public int checkUserInUsergroup(UserDO userDO, ServerGroupDO serverGroupDO) { int userid = this.userGet(userDO); if (userid == 0) return 2; String usergrpName = serverGroupDO.getName().replace("group_", "users_"); int usrgrpid = usergroupGet(usergrpName); i...
@Test public void testRemoteInvoke() { HostSystem hostSystem = new HostSystem(); hostSystem.setInstanceId("1"); hostSystem.setHost("10.17.1.120"); hostSystem.setPort(22); hostSystem.setUser("manage"); for(int i = 0; i < 10; i++) { ConnectionSession connectionSession = RemoteInvokeHandler.getSession(keyboxDao.getApplica...
public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + "", EncryptionUtil.decry...
RemoteInvokeHandler { public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + ""...
RemoteInvokeHandler { public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + ""...
RemoteInvokeHandler { public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + ""...
RemoteInvokeHandler { public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + ""...
@Test public void testRemoteInvoke2() { HostSystem hostSystem = new HostSystem(); hostSystem.setInstanceId("1"); hostSystem.setHost("10.17.1.120"); hostSystem.setPort(22); hostSystem.setUser("manage"); ConnectionSession connectionSession = RemoteInvokeHandler.getSession(keyboxDao.getApplicationKey(), hostSystem); conne...
public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + "", EncryptionUtil.decry...
RemoteInvokeHandler { public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + ""...
RemoteInvokeHandler { public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + ""...
RemoteInvokeHandler { public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + ""...
RemoteInvokeHandler { public static ConnectionSession getSession(ApplicationKeyDO applicationKeyDO, HostSystem hostSystem) { JSch jSch = new JSch(); String passphrase = applicationKeyDO.getPassphrase(); if (StringUtils.isEmpty(passphrase)) { passphrase = ""; } try { jSch.addIdentity(applicationKeyDO.getSessionId() + ""...
@Test public void testGetway() { List<UserDO> userDOList = authDao.getLoginUsers(); if (userDOList.isEmpty()) { return; } UserDO userDO = userDOList.get(0); ServerGroupDO serverGroupDO = serverGroupService.queryServerGroupByName("group_trade"); ServerGroupDO serverGroupDO2 = serverGroupService.queryServerGroupByName("g...
public Getway() { }
Getway { public Getway() { } }
Getway { public Getway() { } Getway(); Getway(UserDO userDO, List<ServerGroupDO> serverGroups); Getway(List<ServerGroupDO> serverGroups, Map<String, List<ServerDO>> servers); }
Getway { public Getway() { } Getway(); Getway(UserDO userDO, List<ServerGroupDO> serverGroups); Getway(List<ServerGroupDO> serverGroups, Map<String, List<ServerDO>> servers); String getPath(); void addUser(UserDO userDO); void addServerGroup(List<ServerGroupDO> serverGroups); void addServers(Map<String, List<ServerDO...
Getway { public Getway() { } Getway(); Getway(UserDO userDO, List<ServerGroupDO> serverGroups); Getway(List<ServerGroupDO> serverGroups, Map<String, List<ServerDO>> servers); String getPath(); void addUser(UserDO userDO); void addServerGroup(List<ServerGroupDO> serverGroups); void addServers(Map<String, List<ServerDO...
@Test public void test() { CommandLine cmd =new CommandLine("ps"); cmd.addArgument("-ef"); String rt=CmdUtils.run(cmd); System.err.println(rt); }
public static String run(CommandLine commandline) { try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream errorStream = new ByteArrayOutputStream(); DefaultExecutor exec = new DefaultExecutor(); ExecuteWatchdog watchdog = new ExecuteWatchdog(60*1000); exec.setWatchdog(watchdog); ...
CmdUtils { public static String run(CommandLine commandline) { try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream errorStream = new ByteArrayOutputStream(); DefaultExecutor exec = new DefaultExecutor(); ExecuteWatchdog watchdog = new ExecuteWatchdog(60*1000); exec.setWatchdog(...
CmdUtils { public static String run(CommandLine commandline) { try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream errorStream = new ByteArrayOutputStream(); DefaultExecutor exec = new DefaultExecutor(); ExecuteWatchdog watchdog = new ExecuteWatchdog(60*1000); exec.setWatchdog(...
CmdUtils { public static String run(CommandLine commandline) { try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream errorStream = new ByteArrayOutputStream(); DefaultExecutor exec = new DefaultExecutor(); ExecuteWatchdog watchdog = new ExecuteWatchdog(60*1000); exec.setWatchdog(...
CmdUtils { public static String run(CommandLine commandline) { try { ByteArrayOutputStream outputStream = new ByteArrayOutputStream(); ByteArrayOutputStream errorStream = new ByteArrayOutputStream(); DefaultExecutor exec = new DefaultExecutor(); ExecuteWatchdog watchdog = new ExecuteWatchdog(60*1000); exec.setWatchdog(...
@Test public void test() { try{ SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:m:s"); Date date = format.parse("2017-09-08 08:35:35"); System.out.println(TimeViewUtils.format(date)); }catch (Exception e){ } }
public static String format(Date date) { long delta = new Date().getTime() - date.getTime(); if (delta < 1L * ONE_MINUTE) { long seconds = toSeconds(delta); return (seconds <= 0 ? 1 : seconds) + ONE_SECOND_AGO; } if (delta < 45L * ONE_MINUTE) { long minutes = toMinutes(delta); return (minutes <= 0 ? 1 : minutes) + ONE_...
TimeViewUtils { public static String format(Date date) { long delta = new Date().getTime() - date.getTime(); if (delta < 1L * ONE_MINUTE) { long seconds = toSeconds(delta); return (seconds <= 0 ? 1 : seconds) + ONE_SECOND_AGO; } if (delta < 45L * ONE_MINUTE) { long minutes = toMinutes(delta); return (minutes <= 0 ? 1 :...
TimeViewUtils { public static String format(Date date) { long delta = new Date().getTime() - date.getTime(); if (delta < 1L * ONE_MINUTE) { long seconds = toSeconds(delta); return (seconds <= 0 ? 1 : seconds) + ONE_SECOND_AGO; } if (delta < 45L * ONE_MINUTE) { long minutes = toMinutes(delta); return (minutes <= 0 ? 1 :...
TimeViewUtils { public static String format(Date date) { long delta = new Date().getTime() - date.getTime(); if (delta < 1L * ONE_MINUTE) { long seconds = toSeconds(delta); return (seconds <= 0 ? 1 : seconds) + ONE_SECOND_AGO; } if (delta < 45L * ONE_MINUTE) { long minutes = toMinutes(delta); return (minutes <= 0 ? 1 :...
TimeViewUtils { public static String format(Date date) { long delta = new Date().getTime() - date.getTime(); if (delta < 1L * ONE_MINUTE) { long seconds = toSeconds(delta); return (seconds <= 0 ? 1 : seconds) + ONE_SECOND_AGO; } if (delta < 45L * ONE_MINUTE) { long minutes = toMinutes(delta); return (minutes <= 0 ? 1 :...
@Test public void test() { String p=IOUtils.getPath("/data/www/ROOT/1.txt"); System.out.println(p); }
public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; }
IOUtils { public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; } }
IOUtils { public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; } IOUtils(String body, String path); }
IOUtils { public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; } IOUtils(String body, String path); void setPath(String path); void setBody(String body); static void createDir(String path); static vo...
IOUtils { public static String getPath( String path){ if(path == null || path.equals("") ) return ""; String[] a = path.split("\\/"); path=path.replace(a[a.length-1],""); return path; } IOUtils(String body, String path); void setPath(String path); void setBody(String body); static void createDir(String path); static vo...
@Test public void testencrypt() { String pwd = EncryptionUtil.encrypt("-----BEGIN RSA PRIVATE KEY-----\n" + "FUCKogIBAAKCAQEAzuswWPArXG6aShTC3ax63+pYOgYYe51YeICqBzOmcAv8MXWD\n" + "wIQR/xlpzLQVlW198RKiOnvAt/8YWIJ261XnxhGM/zNpKM0ZWBRCNqsAC6XKJbPC\n" + "sY9SQASaKAmhB9m8IQzQvKOd0MxVmZ8FGDQdggYEtXqaUI3ypcc79A0bY53CJJI3\n" +...
public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encodeBase64(encVal));...
EncryptionUtil { public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encod...
EncryptionUtil { public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encod...
EncryptionUtil { public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encod...
EncryptionUtil { public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encod...
@Test public void testencryptByToy() { String pwd = EncryptionUtil.encrypt("-----BEGIN RSA PRIVATE KEY-----\n" + "FUCKoQIBAAKCAQEAsYyt2cnUkg3CcUtgWtTlb9MWXc/ub5dTgF4HjJferQp6NHzl\n" + "DvTZzVM3AUi2ZCoz7KuFZ22yRvAN69/1lUs4sk/V73kxFmuN/6ZziquAptypqoEN\n" + "L8FypPSpcfAU1d1HMtbI/XKQcMbHkxI9jyiAFHHHJkzwYB7LYEWUcTr0iJbBgYO6...
public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encodeBase64(encVal));...
EncryptionUtil { public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encod...
EncryptionUtil { public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encod...
EncryptionUtil { public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encod...
EncryptionUtil { public static String encrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.ENCRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] encVal = c.doFinal(str.getBytes()); retVal = new String(Base64.encod...
@Test public void testdecrypt() { String pwd = "Yzb0133WhYWxqN1JG7MRuoJCzuEVrIZ1Et+UZZabG5XSc+qGpby8tOtzLlRUgHY4Etqy/2mUzr9CcHRz2fqlNrf52R+0Ki1Yohao+eq7BdRiKYbPh02Oait5iVB4eZwiUL+NXR0u7hLckh5hArNhsa+AU5jCZ+6k7QJZdSpGy9+j0xnC6FawnzgCzex5AItqBprTzR2oC8AkQAiHRC2VPc08OCaLWEfxBfEky/1S8ZsMzAFkd3+n2wqYgSHdqCb64boLRrzKw0/xfnYE...
public static String decrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] decodedVal = Base64.decodeBase64(str.getBytes()); retVal = new String(c.doFinal(decod...
EncryptionUtil { public static String decrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] decodedVal = Base64.decodeBase64(str.getBytes()); retVal = new Strin...
EncryptionUtil { public static String decrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] decodedVal = Base64.decodeBase64(str.getBytes()); retVal = new Strin...
EncryptionUtil { public static String decrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] decodedVal = Base64.decodeBase64(str.getBytes()); retVal = new Strin...
EncryptionUtil { public static String decrypt(String str) { String retVal = null; if (str != null && str.length() > 0) { try { Cipher c = Cipher.getInstance(CRYPT_ALGORITHM); c.init(Cipher.DECRYPT_MODE, new SecretKeySpec(key, CRYPT_ALGORITHM)); byte[] decodedVal = Base64.decodeBase64(str.getBytes()); retVal = new Strin...
@Test public void findByIdShouldReturnResultWhenIsPresent() throws Exception { String processInstanceId = "5"; ProcessInstanceEntity processInstanceEntity = mock(ProcessInstanceEntity.class); given(repository.findById(processInstanceId)).willReturn(Optional.of(processInstanceEntity)); ProcessInstanceEntity retrieveProc...
public <T, ID> T findById(CrudRepository<T, ID> repository, ID id, String notFoundMessage) { Optional<T> findResult = repository.findById(id); return getEntity(findResult, notFoundMessage); }
EntityFinder { public <T, ID> T findById(CrudRepository<T, ID> repository, ID id, String notFoundMessage) { Optional<T> findResult = repository.findById(id); return getEntity(findResult, notFoundMessage); } }
EntityFinder { public <T, ID> T findById(CrudRepository<T, ID> repository, ID id, String notFoundMessage) { Optional<T> findResult = repository.findById(id); return getEntity(findResult, notFoundMessage); } }
EntityFinder { public <T, ID> T findById(CrudRepository<T, ID> repository, ID id, String notFoundMessage) { Optional<T> findResult = repository.findById(id); return getEntity(findResult, notFoundMessage); } T findById(CrudRepository<T, ID> repository, ID id, ...
EntityFinder { public <T, ID> T findById(CrudRepository<T, ID> repository, ID id, String notFoundMessage) { Optional<T> findResult = repository.findById(id); return getEntity(findResult, notFoundMessage); } T findById(CrudRepository<T, ID> repository, ID id, ...
@Test public void getCollectionResourceRelForShouldReturnProcessInstancesWhenIsProcessInstanceEntity() { String collectionResourceRel = relProvider.getCollectionResourceRelFor(ProcessInstanceEntity.class); assertThat(collectionResourceRel).isEqualTo("processInstances"); }
@Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); @Override String getItemResourceRelFor(Class<?> aClass); @Override String getCollectionResourceRelFor(Class<?>...
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); @Override String getItemResourceRelFor(Class<?> aClass); @Override String getCollectionResourceRelFor(Class<?>...
@Test public void getCollectionResourceRelForShouldReturnTasksWhenIsTaskEntity() { String collectionResourceRel = relProvider.getCollectionResourceRelFor(TaskEntity.class); assertThat(collectionResourceRel).isEqualTo("tasks"); }
@Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); @Override String getItemResourceRelFor(Class<?> aClass); @Override String getCollectionResourceRelFor(Class<?>...
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); @Override String getItemResourceRelFor(Class<?> aClass); @Override String getCollectionResourceRelFor(Class<?>...
@Test public void getCollectionResourceRelForShouldReturnVariablesWhenIsProcessVariableEntity() { String collectionResourceRel = relProvider.getCollectionResourceRelFor(ProcessVariableEntity.class); assertThat(collectionResourceRel).isEqualTo("variables"); }
@Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); }
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); @Override String getItemResourceRelFor(Class<?> aClass); @Override String getCollectionResourceRelFor(Class<?>...
QueryRelProvider implements RelProvider { @Override public String getCollectionResourceRelFor(Class<?> aClass) { return resourceRelationDescriptors.get(aClass).getCollectionResourceRel(); } QueryRelProvider(); @Override String getItemResourceRelFor(Class<?> aClass); @Override String getCollectionResourceRelFor(Class<?>...