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 getLayoutId() throws Exception { }
@Override protected int getLayoutId() { return R.layout.fragment_hot; }
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected int getLayoutId() { return R.layout.fragment_hot; } }
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected int getLayoutId() { return R.layout.fragment_hot; } }
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected int getLayoutId() { return R.layout.fragment_hot; } static HotFragment getInstance(); @Override void onBindPage(); @OnClick({R.id.tv_city, R.id.dcl_search}) void onViewClicked(View view); @Override void onActivityResult(int requ...
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected int getLayoutId() { return R.layout.fragment_hot; } static HotFragment getInstance(); @Override void onBindPage(); @OnClick({R.id.tv_city, R.id.dcl_search}) void onViewClicked(View view); @Override void onActivityResult(int requ...
@Test public void initView() throws Exception { }
@Override protected void initView() { mainActivity = (MainActivity) getActivity(); mPresent = new HotPresenterImp(this, getChildFragmentManager()); mHotTl.setTabMode(TabLayout.MODE_FIXED); mPresent.initPage(mHotVp); }
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected void initView() { mainActivity = (MainActivity) getActivity(); mPresent = new HotPresenterImp(this, getChildFragmentManager()); mHotTl.setTabMode(TabLayout.MODE_FIXED); mPresent.initPage(mHotVp); } }
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected void initView() { mainActivity = (MainActivity) getActivity(); mPresent = new HotPresenterImp(this, getChildFragmentManager()); mHotTl.setTabMode(TabLayout.MODE_FIXED); mPresent.initPage(mHotVp); } }
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected void initView() { mainActivity = (MainActivity) getActivity(); mPresent = new HotPresenterImp(this, getChildFragmentManager()); mHotTl.setTabMode(TabLayout.MODE_FIXED); mPresent.initPage(mHotVp); } static HotFragment getInstance...
HotFragment extends BaseFragment<HotPresenterImp> implements HotView { @Override protected void initView() { mainActivity = (MainActivity) getActivity(); mPresent = new HotPresenterImp(this, getChildFragmentManager()); mHotTl.setTabMode(TabLayout.MODE_FIXED); mPresent.initPage(mHotVp); } static HotFragment getInstance...
@Test public void union() { StringBuilder result = SqlStringUtils.<String>union(list(), (x, b) -> b.append("hi " + x), true); assertThat(result.toString(), is("")); result = SqlStringUtils.union(list("a"), (x, b) -> b.append("hi " + x), true); assertThat(result.toString(), is("( hi a )")); result = SqlStringUtils.union...
public static <A> void union(StringBuilder b, Iterable<A> xs, Effect2<A, StringBuilder> singleSql, boolean unionAll) { String joinClause = unionAll ? " UNION ALL " : " UNION "; for (A x : xs) { b.append("( "); singleSql.f(x, b); b.append(" )"); b.append(joinClause); } int replaceIdx = b.length() - joinClause.length(); ...
SqlStringUtils { public static <A> void union(StringBuilder b, Iterable<A> xs, Effect2<A, StringBuilder> singleSql, boolean unionAll) { String joinClause = unionAll ? " UNION ALL " : " UNION "; for (A x : xs) { b.append("( "); singleSql.f(x, b); b.append(" )"); b.append(joinClause); } int replaceIdx = b.length() - join...
SqlStringUtils { public static <A> void union(StringBuilder b, Iterable<A> xs, Effect2<A, StringBuilder> singleSql, boolean unionAll) { String joinClause = unionAll ? " UNION ALL " : " UNION "; for (A x : xs) { b.append("( "); singleSql.f(x, b); b.append(" )"); b.append(joinClause); } int replaceIdx = b.length() - join...
SqlStringUtils { public static <A> void union(StringBuilder b, Iterable<A> xs, Effect2<A, StringBuilder> singleSql, boolean unionAll) { String joinClause = unionAll ? " UNION ALL " : " UNION "; for (A x : xs) { b.append("( "); singleSql.f(x, b); b.append(" )"); b.append(joinClause); } int replaceIdx = b.length() - join...
SqlStringUtils { public static <A> void union(StringBuilder b, Iterable<A> xs, Effect2<A, StringBuilder> singleSql, boolean unionAll) { String joinClause = unionAll ? " UNION ALL " : " UNION "; for (A x : xs) { b.append("( "); singleSql.f(x, b); b.append(" )"); b.append(joinClause); } int replaceIdx = b.length() - join...
@Test public void placeholders() { assertThat(SqlStringUtils.placeholders(1), is("?")); assertThat(SqlStringUtils.placeholders(5).replaceAll(" ", ""), is("?,?,?,?,?")); }
public static String placeholders(int length) { return placeholdersBuilder(length, new StringBuilder()).toString(); }
SqlStringUtils { public static String placeholders(int length) { return placeholdersBuilder(length, new StringBuilder()).toString(); } }
SqlStringUtils { public static String placeholders(int length) { return placeholdersBuilder(length, new StringBuilder()).toString(); } }
SqlStringUtils { public static String placeholders(int length) { return placeholdersBuilder(length, new StringBuilder()).toString(); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int numRows, int numColumns); static Strin...
SqlStringUtils { public static String placeholders(int length) { return placeholdersBuilder(length, new StringBuilder()).toString(); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int numRows, int numColumns); static Strin...
@Test public void placeholderRows() { assertThat(SqlStringUtils.placeholderRows(3, 2).replaceAll(" ", ""), is("(?,?),(?,?),(?,?)")); }
public static String placeholderRows(int numRows, int numColumns) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < numRows; i++) { sb.append("("); sb = placeholdersBuilder(numColumns, sb); sb.append("), "); } sb.delete(sb.length() - 2, sb.length()); return sb.toString(); }
SqlStringUtils { public static String placeholderRows(int numRows, int numColumns) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < numRows; i++) { sb.append("("); sb = placeholdersBuilder(numColumns, sb); sb.append("), "); } sb.delete(sb.length() - 2, sb.length()); return sb.toString(); } }
SqlStringUtils { public static String placeholderRows(int numRows, int numColumns) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < numRows; i++) { sb.append("("); sb = placeholdersBuilder(numColumns, sb); sb.append("), "); } sb.delete(sb.length() - 2, sb.length()); return sb.toString(); } }
SqlStringUtils { public static String placeholderRows(int numRows, int numColumns) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < numRows; i++) { sb.append("("); sb = placeholdersBuilder(numColumns, sb); sb.append("), "); } sb.delete(sb.length() - 2, sb.length()); return sb.toString(); } static String p...
SqlStringUtils { public static String placeholderRows(int numRows, int numColumns) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < numRows; i++) { sb.append("("); sb = placeholdersBuilder(numColumns, sb); sb.append("), "); } sb.delete(sb.length() - 2, sb.length()); return sb.toString(); } static String p...
@Test public void literal() { assertThat(SqlStringUtils.literal("foo"), is("'foo'")); }
public static String literal(String str) { return "'" + str + "'"; }
SqlStringUtils { public static String literal(String str) { return "'" + str + "'"; } }
SqlStringUtils { public static String literal(String str) { return "'" + str + "'"; } }
SqlStringUtils { public static String literal(String str) { return "'" + str + "'"; } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int numRows, int numColumns); static String literal(String str); static StringBuilder setEx...
SqlStringUtils { public static String literal(String str) { return "'" + str + "'"; } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int numRows, int numColumns); static String literal(String str); static StringBuilder setEx...
@Test public void setExpressionWithPlaceholders() { assertThat( SqlStringUtils.setExpressionWithPlaceholders(asList("CITY", "ADDRESS")).toString() .replaceAll(" ", ""), is("CITY=?,ADDRESS=?") ); }
public static StringBuilder setExpressionWithPlaceholders(Iterable<String> colNames) { return expressionWithPlaceholders(colNames, ", "); }
SqlStringUtils { public static StringBuilder setExpressionWithPlaceholders(Iterable<String> colNames) { return expressionWithPlaceholders(colNames, ", "); } }
SqlStringUtils { public static StringBuilder setExpressionWithPlaceholders(Iterable<String> colNames) { return expressionWithPlaceholders(colNames, ", "); } }
SqlStringUtils { public static StringBuilder setExpressionWithPlaceholders(Iterable<String> colNames) { return expressionWithPlaceholders(colNames, ", "); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int numRows, int num...
SqlStringUtils { public static StringBuilder setExpressionWithPlaceholders(Iterable<String> colNames) { return expressionWithPlaceholders(colNames, ", "); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); static String placeholderRows(int numRows, int num...
@Test public void whereExpressionWithPlaceholders() { assertThat( SqlStringUtils.whereExpressionWithPlaceholders(asList("CITY", "ADDRESS"), AND).toString(), is("CITY=? AND ADDRESS=?") ); assertThat( SqlStringUtils.whereExpressionWithPlaceholders(asList("X", "Y", "Z"), OR).toString(), is("X=? OR Y=? OR Z=?") ); }
public static StringBuilder whereExpressionWithPlaceholders(Iterable<String> colNames, LogicalOperator op) { return expressionWithPlaceholders(colNames, format(" {0} ", op.name()) ); }
SqlStringUtils { public static StringBuilder whereExpressionWithPlaceholders(Iterable<String> colNames, LogicalOperator op) { return expressionWithPlaceholders(colNames, format(" {0} ", op.name()) ); } }
SqlStringUtils { public static StringBuilder whereExpressionWithPlaceholders(Iterable<String> colNames, LogicalOperator op) { return expressionWithPlaceholders(colNames, format(" {0} ", op.name()) ); } }
SqlStringUtils { public static StringBuilder whereExpressionWithPlaceholders(Iterable<String> colNames, LogicalOperator op) { return expressionWithPlaceholders(colNames, format(" {0} ", op.name()) ); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); stati...
SqlStringUtils { public static StringBuilder whereExpressionWithPlaceholders(Iterable<String> colNames, LogicalOperator op) { return expressionWithPlaceholders(colNames, format(" {0} ", op.name()) ); } static String placeholders(int length); static StringBuilder placeholdersBuilder(int length, StringBuilder sb); stati...
@Test public void statementKind() { assertThat( SqlStringUtils.getStatementKind(" SELECT * FROM FOO"), is(SELECT) ); assertThat( SqlStringUtils.getStatementKind("insert into alabalanicafoorbar values ()"), is(INSERT) ); assertThat(SqlStringUtils.getStatementKind("update x set y=? where z=?"), is(UPDATE) ); assertThat(S...
public static StatementKind getStatementKind(String sql) { String prefix = sql.trim(); prefix = prefix.length() < 10 ? prefix : prefix.substring(0, 10); prefix = prefix.toLowerCase(); if (prefix.startsWith("select")) { return SELECT; } else if (prefix.startsWith("insert")) { return INSERT; } else if (prefix.startsWith(...
SqlStringUtils { public static StatementKind getStatementKind(String sql) { String prefix = sql.trim(); prefix = prefix.length() < 10 ? prefix : prefix.substring(0, 10); prefix = prefix.toLowerCase(); if (prefix.startsWith("select")) { return SELECT; } else if (prefix.startsWith("insert")) { return INSERT; } else if (p...
SqlStringUtils { public static StatementKind getStatementKind(String sql) { String prefix = sql.trim(); prefix = prefix.length() < 10 ? prefix : prefix.substring(0, 10); prefix = prefix.toLowerCase(); if (prefix.startsWith("select")) { return SELECT; } else if (prefix.startsWith("insert")) { return INSERT; } else if (p...
SqlStringUtils { public static StatementKind getStatementKind(String sql) { String prefix = sql.trim(); prefix = prefix.length() < 10 ? prefix : prefix.substring(0, 10); prefix = prefix.toLowerCase(); if (prefix.startsWith("select")) { return SELECT; } else if (prefix.startsWith("insert")) { return INSERT; } else if (p...
SqlStringUtils { public static StatementKind getStatementKind(String sql) { String prefix = sql.trim(); prefix = prefix.length() < 10 ? prefix : prefix.substring(0, 10); prefix = prefix.toLowerCase(); if (prefix.startsWith("select")) { return SELECT; } else if (prefix.startsWith("insert")) { return INSERT; } else if (p...
@Test public void readLogFiles() { dispatcher.push(StaticDmrResponse.ok(logFileNodes("server.log", "server.log.2014.-08-01", "server.log.2014.-08-02"))); store.readLogFiles(NoopChannel.INSTANCE); assertNull(store.getActiveLogFile()); assertEquals(3, store.getLogFiles().size()); }
@Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught); } @Override public void onSucce...
LogStore extends ChangeSupport { @Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught)...
LogStore extends ChangeSupport { @Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught)...
LogStore extends ChangeSupport { @Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught)...
LogStore extends ChangeSupport { @Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught)...
@Test public void append() { AddressTemplate at = AddressTemplate.of("a=b"); at = at.append("c=d"); assertEquals("a=b/c=d", at.getTemplate()); at = AddressTemplate.of("a=b"); at = at.append("/c=d"); assertEquals("a=b/c=d", at.getTemplate()); }
public AddressTemplate append(String template) { String slashTemplate = template.startsWith("/") ? template : "/" + template; return AddressTemplate.of(this.template + slashTemplate); }
AddressTemplate { public AddressTemplate append(String template) { String slashTemplate = template.startsWith("/") ? template : "/" + template; return AddressTemplate.of(this.template + slashTemplate); } }
AddressTemplate { public AddressTemplate append(String template) { String slashTemplate = template.startsWith("/") ? template : "/" + template; return AddressTemplate.of(this.template + slashTemplate); } private AddressTemplate(String template); }
AddressTemplate { public AddressTemplate append(String template) { String slashTemplate = template.startsWith("/") ? template : "/" + template; return AddressTemplate.of(this.template + slashTemplate); } private AddressTemplate(String template); static AddressTemplate of(String template); int getNumTokens(); @Override...
AddressTemplate { public AddressTemplate append(String template) { String slashTemplate = template.startsWith("/") ? template : "/" + template; return AddressTemplate.of(this.template + slashTemplate); } private AddressTemplate(String template); static AddressTemplate of(String template); int getNumTokens(); @Override...
@Test public void subTemplate() { AddressTemplate at = AddressTemplate.of("{a}/b=c/{d}=e/f=g"); assertEquals("", at.subTemplate(0, 0).getTemplate()); assertEquals("", at.subTemplate(2, 2).getTemplate()); assertEquals("b=c", at.subTemplate(1, 2).getTemplate()); assertEquals("{d}=e/f=g", at.subTemplate(2, 4).getTemplate(...
public AddressTemplate subTemplate(int fromIndex, int toIndex) { LinkedList<Token> subTokens = new LinkedList<>(); subTokens.addAll(this.tokens.subList(fromIndex, toIndex)); return AddressTemplate.of(join(this.optional, subTokens)); }
AddressTemplate { public AddressTemplate subTemplate(int fromIndex, int toIndex) { LinkedList<Token> subTokens = new LinkedList<>(); subTokens.addAll(this.tokens.subList(fromIndex, toIndex)); return AddressTemplate.of(join(this.optional, subTokens)); } }
AddressTemplate { public AddressTemplate subTemplate(int fromIndex, int toIndex) { LinkedList<Token> subTokens = new LinkedList<>(); subTokens.addAll(this.tokens.subList(fromIndex, toIndex)); return AddressTemplate.of(join(this.optional, subTokens)); } private AddressTemplate(String template); }
AddressTemplate { public AddressTemplate subTemplate(int fromIndex, int toIndex) { LinkedList<Token> subTokens = new LinkedList<>(); subTokens.addAll(this.tokens.subList(fromIndex, toIndex)); return AddressTemplate.of(join(this.optional, subTokens)); } private AddressTemplate(String template); static AddressTemplate o...
AddressTemplate { public AddressTemplate subTemplate(int fromIndex, int toIndex) { LinkedList<Token> subTokens = new LinkedList<>(); subTokens.addAll(this.tokens.subList(fromIndex, toIndex)); return AddressTemplate.of(join(this.optional, subTokens)); } private AddressTemplate(String template); static AddressTemplate o...
@Test public void replaceWildcards() { AddressTemplate at = AddressTemplate.of("a=b"); at = at.replaceWildcards(null); assertEquals("a=b", at.getTemplate()); at = AddressTemplate.of("a=b"); at = at.replaceWildcards(null, null); assertEquals("a=b", at.getTemplate()); at = AddressTemplate.of("a=b"); at = at.replaceWildca...
public AddressTemplate replaceWildcards(String wildcard, String... wildcards) { List<String> allWildcards = new ArrayList<>(); allWildcards.add(wildcard); if (wildcards != null) { allWildcards.addAll(Arrays.asList(wildcards)); } LinkedList<Token> replacedTokens = new LinkedList<>(); Iterator<String> wi = allWildcards.i...
AddressTemplate { public AddressTemplate replaceWildcards(String wildcard, String... wildcards) { List<String> allWildcards = new ArrayList<>(); allWildcards.add(wildcard); if (wildcards != null) { allWildcards.addAll(Arrays.asList(wildcards)); } LinkedList<Token> replacedTokens = new LinkedList<>(); Iterator<String> w...
AddressTemplate { public AddressTemplate replaceWildcards(String wildcard, String... wildcards) { List<String> allWildcards = new ArrayList<>(); allWildcards.add(wildcard); if (wildcards != null) { allWildcards.addAll(Arrays.asList(wildcards)); } LinkedList<Token> replacedTokens = new LinkedList<>(); Iterator<String> w...
AddressTemplate { public AddressTemplate replaceWildcards(String wildcard, String... wildcards) { List<String> allWildcards = new ArrayList<>(); allWildcards.add(wildcard); if (wildcards != null) { allWildcards.addAll(Arrays.asList(wildcards)); } LinkedList<Token> replacedTokens = new LinkedList<>(); Iterator<String> w...
AddressTemplate { public AddressTemplate replaceWildcards(String wildcard, String... wildcards) { List<String> allWildcards = new ArrayList<>(); allWildcards.add(wildcard); if (wildcards != null) { allWildcards.addAll(Arrays.asList(wildcards)); } LinkedList<Token> replacedTokens = new LinkedList<>(); Iterator<String> w...
@Test public void resolve() { AddressTemplate at = AddressTemplate.of("{a}/b={c}"); ResourceAddress resolved = at.resolve(new EchoContext()); assertResolved(new String[][]{{"a", "a"}, {"b", "c"}}, resolved); }
public ResourceAddress resolve(StatementContext context, List<String> wildcards) { Resolution<ModelNode> resolution = new Resolution<ModelNode>() { private ModelNode modelNode; @Override public void init() { this.modelNode = new ModelNode(); } @Override public void addKeyValue(String key, String value) { this.modelNode...
AddressTemplate { public ResourceAddress resolve(StatementContext context, List<String> wildcards) { Resolution<ModelNode> resolution = new Resolution<ModelNode>() { private ModelNode modelNode; @Override public void init() { this.modelNode = new ModelNode(); } @Override public void addKeyValue(String key, String value...
AddressTemplate { public ResourceAddress resolve(StatementContext context, List<String> wildcards) { Resolution<ModelNode> resolution = new Resolution<ModelNode>() { private ModelNode modelNode; @Override public void init() { this.modelNode = new ModelNode(); } @Override public void addKeyValue(String key, String value...
AddressTemplate { public ResourceAddress resolve(StatementContext context, List<String> wildcards) { Resolution<ModelNode> resolution = new Resolution<ModelNode>() { private ModelNode modelNode; @Override public void init() { this.modelNode = new ModelNode(); } @Override public void addKeyValue(String key, String value...
AddressTemplate { public ResourceAddress resolve(StatementContext context, List<String> wildcards) { Resolution<ModelNode> resolution = new Resolution<ModelNode>() { private ModelNode modelNode; @Override public void init() { this.modelNode = new ModelNode(); } @Override public void addKeyValue(String key, String value...
@Test public void testToString() { ModelNode address = new ModelNode(); address.add("subsystem", "test"); address.add("resource", "name"); String s = AddressUtils.toString(address, true); Assert.assertEquals("subsystem=test/resource=name", s); }
public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(escapeValue(...
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.appe...
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.appe...
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.appe...
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.appe...
@Test public void testToStringValueContainsSlash() { ModelNode address = new ModelNode(); address.add("subsystem", "test"); address.add("resource", "java:/global/a"); String s = AddressUtils.toString(address, true); Assert.assertEquals("subsystem=test/resource=java\\:\\/global\\/a", s); }
public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(escapeValue(...
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.appe...
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.appe...
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.appe...
AddressUtils { public static String toString(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.appe...
@Test public void testAsKey() { ModelNode address = new ModelNode(); address.add("subsystem", "test"); address.add("resource", "name"); String s = AddressUtils.asKey(address, true); Assert.assertEquals("subsystem=test/resource=name", s); }
public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(escapeValue(tup...
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(...
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(...
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(...
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(...
@Test public void testAsKeyValueContainsSlash() { ModelNode address = new ModelNode(); address.add("subsystem", "test"); address.add("resource", "java:/global/a"); String s = AddressUtils.asKey(address, true); Assert.assertEquals("subsystem=test/resource=java\\:\\/global\\/a", s); }
public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(escapeValue(tup...
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(...
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(...
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(...
AddressUtils { public static String asKey(ModelNode address, boolean fq) { List<Property> tuples = address.asPropertyList(); StringBuilder sb = new StringBuilder(); int i=0; for (final Property tuple : tuples) { if(i>0) sb.append("/"); sb.append(tuple.getName()); sb.append("="); if(i==tuples.size()-1) if(fq) sb.append(...
@Test public void findMapping() { Container basicAttributes = new Container(NAMESPACE, "basicAttributes", "Basic Attributes"); InteractionUnit root = new Builder() .start(new Container(NAMESPACE, "root", "Root", OrderIndependance)) .mappedBy(new DMRMapping().setAddress("root")) .add(new Select(NAMESPACE, "table", "Tabl...
public <T extends Mapping> T findMapping(MappingType type) { return (T) this.findMapping(type, DEFAULT_PREDICATE); }
InteractionUnit implements Consumer, Producer { public <T extends Mapping> T findMapping(MappingType type) { return (T) this.findMapping(type, DEFAULT_PREDICATE); } }
InteractionUnit implements Consumer, Producer { public <T extends Mapping> T findMapping(MappingType type) { return (T) this.findMapping(type, DEFAULT_PREDICATE); } protected InteractionUnit(QName id, final String label); protected InteractionUnit(final QName id, final String label, S stereotype); }
InteractionUnit implements Consumer, Producer { public <T extends Mapping> T findMapping(MappingType type) { return (T) this.findMapping(type, DEFAULT_PREDICATE); } protected InteractionUnit(QName id, final String label); protected InteractionUnit(final QName id, final String label, S stereotype); S getStereotype(); ...
InteractionUnit implements Consumer, Producer { public <T extends Mapping> T findMapping(MappingType type) { return (T) this.findMapping(type, DEFAULT_PREDICATE); } protected InteractionUnit(QName id, final String label); protected InteractionUnit(final QName id, final String label, S stereotype); S getStereotype(); ...
@Test public void testProcedureEquality() { Procedure proc1 = new TestProcedure(QName.valueOf("foo.bar:proc")) {}; Procedure proc2 = new TestProcedure(QName.valueOf("foo.bar:proc")) {}; Procedure proc3 = new TestProcedure(QName.valueOf("foo.bar:proc"), QName.valueOf("some:origin")) {}; Procedure proc4 = new TestProcedu...
@Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; }
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } }
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } protected InteractionUnit(QName ...
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } protected InteractionUnit(QName ...
InteractionUnit implements Consumer, Producer { @Override public boolean equals(final Object o) { if (this == o) { return true; } if (!(o instanceof InteractionUnit)) { return false; } InteractionUnit that = (InteractionUnit) o; if (!id.equals(that.id)) { return false; } return true; } protected InteractionUnit(QName ...
@Test public void readLogFilesAndVerifyStale() { LogFile stale = new LogFile("stale.log", Collections.<String>emptyList(), 0); store.states.put(stale.getName(), stale); dispatcher.push(StaticDmrResponse.ok(logFileNodes("server.log"))); store.readLogFiles(NoopChannel.INSTANCE); assertTrue(store.states.get(stale.getName(...
@Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught); } @Override public void onSucce...
LogStore extends ChangeSupport { @Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught)...
LogStore extends ChangeSupport { @Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught)...
LogStore extends ChangeSupport { @Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught)...
LogStore extends ChangeSupport { @Process(actionType = ReadLogFiles.class) public void readLogFiles(final Dispatcher.Channel channel) { final ModelNode op = listLogFilesOp(); dispatcher.execute(new DMRAction(op), new AsyncCallback<DMRResponse>() { @Override public void onFailure(Throwable caught) { channel.nack(caught)...
@Test public void openLogFile() { dispatcher.push(StaticDmrResponse.ok(comp(logFileNodes("server.log"), linesNode(2)))); store.logFiles.add(logFileNode("server.log")); store.openLogFile(new OpenLogFile("server.log"), NoopChannel.INSTANCE); assertFalse(store.pauseFollow); LogFile activeLogFile = store.getActiveLogFile()...
@Process(actionType = OpenLogFile.class) public void openLogFile(final OpenLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { final ModelNode op = readLogFileOp(action.getName()); op.get("tail").set(true); dispatcher.execute(new DMRAction(wra...
LogStore extends ChangeSupport { @Process(actionType = OpenLogFile.class) public void openLogFile(final OpenLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { final ModelNode op = readLogFileOp(action.getName()); op.get("tail").set(true); dis...
LogStore extends ChangeSupport { @Process(actionType = OpenLogFile.class) public void openLogFile(final OpenLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { final ModelNode op = readLogFileOp(action.getName()); op.get("tail").set(true); dis...
LogStore extends ChangeSupport { @Process(actionType = OpenLogFile.class) public void openLogFile(final OpenLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { final ModelNode op = readLogFileOp(action.getName()); op.get("tail").set(true); dis...
LogStore extends ChangeSupport { @Process(actionType = OpenLogFile.class) public void openLogFile(final OpenLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { final ModelNode op = readLogFileOp(action.getName()); op.get("tail").set(true); dis...
@Test public void selectLogFile() { LogFile logFile = new LogFile("server.log", lines(0), 0); store.states.put(logFile.getName(), logFile); store.activate(logFile); assertFalse(store.pauseFollow); store.selectLogFile(new SelectLogFile("server.log"), NoopChannel.INSTANCE); LogFile activeLogFile = store.getActiveLogFile(...
@Process(actionType = SelectLogFile.class) public void selectLogFile(final SelectLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { channel.nack(new IllegalStateException("Cannot select unknown log file " + action.getName() + ". " + "Please o...
LogStore extends ChangeSupport { @Process(actionType = SelectLogFile.class) public void selectLogFile(final SelectLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { channel.nack(new IllegalStateException("Cannot select unknown log file " + ac...
LogStore extends ChangeSupport { @Process(actionType = SelectLogFile.class) public void selectLogFile(final SelectLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { channel.nack(new IllegalStateException("Cannot select unknown log file " + ac...
LogStore extends ChangeSupport { @Process(actionType = SelectLogFile.class) public void selectLogFile(final SelectLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { channel.nack(new IllegalStateException("Cannot select unknown log file " + ac...
LogStore extends ChangeSupport { @Process(actionType = SelectLogFile.class) public void selectLogFile(final SelectLogFile action, final Dispatcher.Channel channel) { final LogFile logFile = states.get(action.getName()); if (logFile == null) { channel.nack(new IllegalStateException("Cannot select unknown log file " + ac...
@Test public void closeLogFile() { LogFile foo = new LogFile("foo.log", Collections.<String>emptyList(), 0); LogFile bar = new LogFile("bar.log", Collections.<String>emptyList(), 0); store.states.put(foo.getName(), foo); store.states.put(bar.getName(), bar); store.activate(foo); store.closeLogFile(new CloseLogFile("bar...
@Process(actionType = CloseLogFile.class) public void closeLogFile(final CloseLogFile action, final Dispatcher.Channel channel) { LogFile removed = states.remove(action.getName()); if (removed == activeLogFile) { activeLogFile = null; pauseFollow = true; } channel.ack(); }
LogStore extends ChangeSupport { @Process(actionType = CloseLogFile.class) public void closeLogFile(final CloseLogFile action, final Dispatcher.Channel channel) { LogFile removed = states.remove(action.getName()); if (removed == activeLogFile) { activeLogFile = null; pauseFollow = true; } channel.ack(); } }
LogStore extends ChangeSupport { @Process(actionType = CloseLogFile.class) public void closeLogFile(final CloseLogFile action, final Dispatcher.Channel channel) { LogFile removed = states.remove(action.getName()); if (removed == activeLogFile) { activeLogFile = null; pauseFollow = true; } channel.ack(); } @Inject LogS...
LogStore extends ChangeSupport { @Process(actionType = CloseLogFile.class) public void closeLogFile(final CloseLogFile action, final Dispatcher.Channel channel) { LogFile removed = states.remove(action.getName()); if (removed == activeLogFile) { activeLogFile = null; pauseFollow = true; } channel.ack(); } @Inject LogS...
LogStore extends ChangeSupport { @Process(actionType = CloseLogFile.class) public void closeLogFile(final CloseLogFile action, final Dispatcher.Channel channel) { LogFile removed = states.remove(action.getName()); if (removed == activeLogFile) { activeLogFile = null; pauseFollow = true; } channel.ack(); } @Inject LogS...
@Test public void changePageSize() { store.changePageSize(new ChangePageSize(42), NoopChannel.INSTANCE); assertEquals(42, store.pageSize); }
@Process(actionType = ChangePageSize.class) public void changePageSize(final ChangePageSize action, final Dispatcher.Channel channel) { if (action.getPageSize() == pageSize) { channel.ack(); } else { pageSize = action.getPageSize(); if (activeLogFile != null) { final ModelNode op = readLogFileOp(activeLogFile.getName()...
LogStore extends ChangeSupport { @Process(actionType = ChangePageSize.class) public void changePageSize(final ChangePageSize action, final Dispatcher.Channel channel) { if (action.getPageSize() == pageSize) { channel.ack(); } else { pageSize = action.getPageSize(); if (activeLogFile != null) { final ModelNode op = read...
LogStore extends ChangeSupport { @Process(actionType = ChangePageSize.class) public void changePageSize(final ChangePageSize action, final Dispatcher.Channel channel) { if (action.getPageSize() == pageSize) { channel.ack(); } else { pageSize = action.getPageSize(); if (activeLogFile != null) { final ModelNode op = read...
LogStore extends ChangeSupport { @Process(actionType = ChangePageSize.class) public void changePageSize(final ChangePageSize action, final Dispatcher.Channel channel) { if (action.getPageSize() == pageSize) { channel.ack(); } else { pageSize = action.getPageSize(); if (activeLogFile != null) { final ModelNode op = read...
LogStore extends ChangeSupport { @Process(actionType = ChangePageSize.class) public void changePageSize(final ChangePageSize action, final Dispatcher.Channel channel) { if (action.getPageSize() == pageSize) { channel.ack(); } else { pageSize = action.getPageSize(); if (activeLogFile != null) { final ModelNode op = read...
@Test public void follow() { LogFile logFile = new LogFile("server.log", Collections.<String>emptyList(), 0); store.states.put(logFile.getName(), logFile); store.activate(logFile); store.follow(NoopChannel.INSTANCE); assertFalse(store.pauseFollow); LogFile activeLogFile = store.getActiveLogFile(); assertNotNull(activeL...
@Process(actionType = FollowLogFile.class) public void follow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to follow: No active log file!")); return; } navigate(new NavigateInLogFile(TAIL), channel); activeLogFile.setFollow(true); startFollowing(activeL...
LogStore extends ChangeSupport { @Process(actionType = FollowLogFile.class) public void follow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to follow: No active log file!")); return; } navigate(new NavigateInLogFile(TAIL), channel); activeLogFile.setFol...
LogStore extends ChangeSupport { @Process(actionType = FollowLogFile.class) public void follow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to follow: No active log file!")); return; } navigate(new NavigateInLogFile(TAIL), channel); activeLogFile.setFol...
LogStore extends ChangeSupport { @Process(actionType = FollowLogFile.class) public void follow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to follow: No active log file!")); return; } navigate(new NavigateInLogFile(TAIL), channel); activeLogFile.setFol...
LogStore extends ChangeSupport { @Process(actionType = FollowLogFile.class) public void follow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to follow: No active log file!")); return; } navigate(new NavigateInLogFile(TAIL), channel); activeLogFile.setFol...
@Test public void pauseFollow() { LogFile logFile = new LogFile("server.log", Collections.<String>emptyList(), 0); logFile.setFollow(true); store.states.put(logFile.getName(), logFile); store.activate(logFile); store.pauseFollow(NoopChannel.INSTANCE); assertTrue(store.pauseFollow); LogFile activeLogFile = store.getActi...
@Process(actionType = PauseFollowLogFile.class) public void pauseFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to pause follow: No active log file!")); return; } pauseFollow = true; channel.ack(); }
LogStore extends ChangeSupport { @Process(actionType = PauseFollowLogFile.class) public void pauseFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to pause follow: No active log file!")); return; } pauseFollow = true; channel.ack(); } }
LogStore extends ChangeSupport { @Process(actionType = PauseFollowLogFile.class) public void pauseFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to pause follow: No active log file!")); return; } pauseFollow = true; channel.ack(); } @Inject LogSto...
LogStore extends ChangeSupport { @Process(actionType = PauseFollowLogFile.class) public void pauseFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to pause follow: No active log file!")); return; } pauseFollow = true; channel.ack(); } @Inject LogSto...
LogStore extends ChangeSupport { @Process(actionType = PauseFollowLogFile.class) public void pauseFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to pause follow: No active log file!")); return; } pauseFollow = true; channel.ack(); } @Inject LogSto...
@Test public void unFollow() { LogFile logFile = new LogFile("server.log", Collections.<String>emptyList(), 0); logFile.setFollow(true); store.states.put(logFile.getName(), logFile); store.activate(logFile); store.unFollow(NoopChannel.INSTANCE); assertFalse(store.pauseFollow); LogFile activeLogFile = store.getActiveLog...
@Process(actionType = UnFollowLogFile.class) public void unFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to unfollow: No active log file!")); return; } activeLogFile.setFollow(false); channel.ack(); }
LogStore extends ChangeSupport { @Process(actionType = UnFollowLogFile.class) public void unFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to unfollow: No active log file!")); return; } activeLogFile.setFollow(false); channel.ack(); } }
LogStore extends ChangeSupport { @Process(actionType = UnFollowLogFile.class) public void unFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to unfollow: No active log file!")); return; } activeLogFile.setFollow(false); channel.ack(); } @Inject LogS...
LogStore extends ChangeSupport { @Process(actionType = UnFollowLogFile.class) public void unFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to unfollow: No active log file!")); return; } activeLogFile.setFollow(false); channel.ack(); } @Inject LogS...
LogStore extends ChangeSupport { @Process(actionType = UnFollowLogFile.class) public void unFollow(final Dispatcher.Channel channel) { if (activeLogFile == null) { channel.nack(new IllegalStateException("Unable to unfollow: No active log file!")); return; } activeLogFile.setFollow(false); channel.ack(); } @Inject LogS...
@Test(expected = AssertionError.class) public void nil() { AddressTemplate.of(null); }
public static AddressTemplate of(String template) { return new AddressTemplate(template); }
AddressTemplate { public static AddressTemplate of(String template) { return new AddressTemplate(template); } }
AddressTemplate { public static AddressTemplate of(String template) { return new AddressTemplate(template); } private AddressTemplate(String template); }
AddressTemplate { public static AddressTemplate of(String template) { return new AddressTemplate(template); } private AddressTemplate(String template); static AddressTemplate of(String template); int getNumTokens(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); AddressTempl...
AddressTemplate { public static AddressTemplate of(String template) { return new AddressTemplate(template); } private AddressTemplate(String template); static AddressTemplate of(String template); int getNumTokens(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); AddressTempl...
@Test public void testDifferentLoggerSuppliersSameNameExplicit(TestInfo info) { final String loggerName = info.getDisplayName(); final Logger logEventLogger = LoggerFactory.getLogger(loggerName); logEventLogger.debug(e -> String.format("Logger %s for LogEvents", loggerName)); final Logger<SpecializedLogEvent> specializ...
public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); }
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } }
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } }
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> build...
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> build...
@Test public void testDifferentLoggerSuppliersSameNameImplicit() { final Logger logEventLogger = LoggerFactory.getLogger(); logEventLogger.debug(e -> String.format("Logger %s ", logEventLogger.getName())); final Logger<SpecializedLogEvent> specializedLogEventLogger = LoggerFactory.getLogger(new SpecializedLogEventSuppl...
public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); }
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } }
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } }
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> build...
LoggerRegistry { public <T extends LogEvent> Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> builder) { final String name = getLoggerName(); return getLogger(name, supplier, builder); } Logger<T> getLogger(Supplier<?> supplier, Function<? super LoggerKey, ? extends Logger> build...
@Test public final void verifyGetAuthorizationTokenDeserialisesBearerToken() { final Key key = Key.generateKey(random); final Token token = Token.generate(random, key, "hello"); final ContainerRequest request = mock(ContainerRequest.class); given(request.getHeaderString("Authorization")).willReturn("Bearer " + token.se...
@SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationString.trim(); final St...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
@Test public final void verifyTestClearsIntermediateSecret() { final byte[] secretBytes = new byte[32]; for (byte i = 32; --i >= 0; secretBytes[i] = i); final ByteBuffer secretByteBuffer = ByteBuffer.wrap(secretBytes); assertTrue(Arrays.equals(secretByteBuffer.array(), secretBytes)); given(secretsManager.getSecretVersi...
protected void testSecret(final String secretId, final String clientRequestToken) { final ByteBuffer buffer = getSecretsManager().getSecretVersion(secretId, clientRequestToken); try { if (buffer.remaining() != fernetKeySize) { throw new IllegalStateException("Fernet key must be exactly " + fernetKeySize + " bytes"); } ...
SimpleFernetKeyRotator extends AbstractFernetKeyRotator { protected void testSecret(final String secretId, final String clientRequestToken) { final ByteBuffer buffer = getSecretsManager().getSecretVersion(secretId, clientRequestToken); try { if (buffer.remaining() != fernetKeySize) { throw new IllegalStateException("Fe...
SimpleFernetKeyRotator extends AbstractFernetKeyRotator { protected void testSecret(final String secretId, final String clientRequestToken) { final ByteBuffer buffer = getSecretsManager().getSecretVersion(secretId, clientRequestToken); try { if (buffer.remaining() != fernetKeySize) { throw new IllegalStateException("Fe...
SimpleFernetKeyRotator extends AbstractFernetKeyRotator { protected void testSecret(final String secretId, final String clientRequestToken) { final ByteBuffer buffer = getSecretsManager().getSecretVersion(secretId, clientRequestToken); try { if (buffer.remaining() != fernetKeySize) { throw new IllegalStateException("Fe...
SimpleFernetKeyRotator extends AbstractFernetKeyRotator { protected void testSecret(final String secretId, final String clientRequestToken) { final ByteBuffer buffer = getSecretsManager().getSecretVersion(secretId, clientRequestToken); try { if (buffer.remaining() != fernetKeySize) { throw new IllegalStateException("Fe...
@Test public final void verifyFinishSecretDoesNothing() { final Map<String, List<String>> versions = new HashMap<>(); versions.put("version", singletonList("AWSCURRENT")); rotator.finishSecret("secret", "version", versions); verifyNoMoreInteractions(secretsManager); }
@SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(entry -> { final Collection<? extends String> versionStages...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
@Test public final void verifyFinishSecretFails() { final Map<String, List<String>> versions = new HashMap<>(); versions.put("version", singletonList("AWSPENDING")); assertThrows(RuntimeException.class, () -> rotator.finishSecret("secret", "version", versions)); }
@SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(entry -> { final Collection<? extends String> versionStages...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
@Test public final void verifyFinishSecretRotatesSecret() { final Map<String, List<String>> versions = new HashMap<>(); versions.put("newVersion", singletonList("AWSPENDING")); versions.put("oldVersion", singletonList("AWSCURRENT")); rotator.finishSecret("secret", "newVersion", versions); verify(secretsManager).rotateS...
@SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(entry -> { final Collection<? extends String> versionStages...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
AbstractFernetKeyRotator implements RequestStreamHandler { @SuppressWarnings("PMD.DataflowAnomalyAnalysis") protected void finishSecret(final String secretId, final String clientRequestToken, final Map<String, List<String>> versions) { final Entry<? extends String, ?> currentEntry = versions.entrySet().stream().filter(...
@Test public final void verifySeedOnlyRunsOnce() { final GenerateRandomResult randomResult = new GenerateRandomResult(); final byte[] bytes = new byte[512]; Arrays.fill(bytes, (byte)17); randomResult.setPlaintext(ByteBuffer.wrap(bytes)); given(kms.generateRandom(any(GenerateRandomRequest.class))).willReturn(randomResul...
protected void seed() { if (!seeded.get()) { synchronized (random) { if (!seeded.get()) { getLogger().debug("Seeding random number generator"); final GenerateRandomRequest request = new GenerateRandomRequest(); request.setNumberOfBytes(512); final GenerateRandomResult result = getKms().generateRandom(request); final By...
AbstractFernetKeyRotator implements RequestStreamHandler { protected void seed() { if (!seeded.get()) { synchronized (random) { if (!seeded.get()) { getLogger().debug("Seeding random number generator"); final GenerateRandomRequest request = new GenerateRandomRequest(); request.setNumberOfBytes(512); final GenerateRando...
AbstractFernetKeyRotator implements RequestStreamHandler { protected void seed() { if (!seeded.get()) { synchronized (random) { if (!seeded.get()) { getLogger().debug("Seeding random number generator"); final GenerateRandomRequest request = new GenerateRandomRequest(); request.setNumberOfBytes(512); final GenerateRando...
AbstractFernetKeyRotator implements RequestStreamHandler { protected void seed() { if (!seeded.get()) { synchronized (random) { if (!seeded.get()) { getLogger().debug("Seeding random number generator"); final GenerateRandomRequest request = new GenerateRandomRequest(); request.setNumberOfBytes(512); final GenerateRando...
AbstractFernetKeyRotator implements RequestStreamHandler { protected void seed() { if (!seeded.get()) { synchronized (random) { if (!seeded.get()) { getLogger().debug("Seeding random number generator"); final GenerateRandomRequest request = new GenerateRandomRequest(); request.setNumberOfBytes(512); final GenerateRando...
@Test public final void verifyAssertCurrentStageExistsThrowsException() { final GetSecretValueRequest request = new GetSecretValueRequest(); request.setSecretId("secret"); request.setVersionStage("AWSCURRENT"); given(delegate.getSecretValue(eq(request))).willThrow(new ResourceNotFoundException("not found")); assertThro...
public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }...
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }...
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }...
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }...
@Test public final void verifyAssertDoesNothing() { final GetSecretValueRequest request = new GetSecretValueRequest(); request.setSecretId("secret"); request.setVersionStage("AWSCURRENT"); given(delegate.getSecretValue(eq(request))).willReturn(new GetSecretValueResult()); manager.assertCurrentStageExists("secret"); }
public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }...
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }...
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }...
SecretsManager { public void assertCurrentStageExists(final String secretId) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(CURRENT.getAwsName()); getDelegate().getSecretValue(getSecretValueRequest); }...
@Test public final void verifyDescribeSecretPassesThrough() { final DescribeSecretRequest request = new DescribeSecretRequest(); request.setSecretId("secret"); final DescribeSecretResult sampleResult = new DescribeSecretResult(); sampleResult.setRotationEnabled(true); sampleResult.addVersionIdsToStagesEntry("version", ...
public DescribeSecretResult describeSecret(final String secretId) { final DescribeSecretRequest describeSecretRequest = new DescribeSecretRequest(); describeSecretRequest.setSecretId(secretId); return getDelegate().describeSecret(describeSecretRequest); }
SecretsManager { public DescribeSecretResult describeSecret(final String secretId) { final DescribeSecretRequest describeSecretRequest = new DescribeSecretRequest(); describeSecretRequest.setSecretId(secretId); return getDelegate().describeSecret(describeSecretRequest); } }
SecretsManager { public DescribeSecretResult describeSecret(final String secretId) { final DescribeSecretRequest describeSecretRequest = new DescribeSecretRequest(); describeSecretRequest.setSecretId(secretId); return getDelegate().describeSecret(describeSecretRequest); } SecretsManager(final AWSSecretsManager delegate...
SecretsManager { public DescribeSecretResult describeSecret(final String secretId) { final DescribeSecretRequest describeSecretRequest = new DescribeSecretRequest(); describeSecretRequest.setSecretId(secretId); return getDelegate().describeSecret(describeSecretRequest); } SecretsManager(final AWSSecretsManager delegate...
SecretsManager { public DescribeSecretResult describeSecret(final String secretId) { final DescribeSecretRequest describeSecretRequest = new DescribeSecretRequest(); describeSecretRequest.setSecretId(secretId); return getDelegate().describeSecret(describeSecretRequest); } SecretsManager(final AWSSecretsManager delegate...
@Test public final void verifyGetSecretVersionRetrievesBinary() throws UnsupportedEncodingException { final GetSecretValueRequest request = new GetSecretValueRequest(); request.setSecretId("secret"); request.setVersionId("version"); final GetSecretValueResult response = new GetSecretValueResult(); response.setSecretBin...
public ByteBuffer getSecretVersion(final String secretId, final String clientRequestToken) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionId(clientRequestToken); final GetSecretValueResult result = getDelega...
SecretsManager { public ByteBuffer getSecretVersion(final String secretId, final String clientRequestToken) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionId(clientRequestToken); final GetSecretValueResult r...
SecretsManager { public ByteBuffer getSecretVersion(final String secretId, final String clientRequestToken) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionId(clientRequestToken); final GetSecretValueResult r...
SecretsManager { public ByteBuffer getSecretVersion(final String secretId, final String clientRequestToken) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionId(clientRequestToken); final GetSecretValueResult r...
SecretsManager { public ByteBuffer getSecretVersion(final String secretId, final String clientRequestToken) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionId(clientRequestToken); final GetSecretValueResult r...
@Test public final void verifyGetSecretStageRetrievesBinary() throws UnsupportedEncodingException { final GetSecretValueRequest request = new GetSecretValueRequest(); request.setSecretId("secret"); request.setVersionStage("AWSPENDING"); final GetSecretValueResult response = new GetSecretValueResult(); response.setSecre...
public ByteBuffer getSecretStage(final String secretId, final Stage stage) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(stage.getAwsName()); final GetSecretValueResult result = getDelegate().getSecre...
SecretsManager { public ByteBuffer getSecretStage(final String secretId, final Stage stage) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(stage.getAwsName()); final GetSecretValueResult result = getDe...
SecretsManager { public ByteBuffer getSecretStage(final String secretId, final Stage stage) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(stage.getAwsName()); final GetSecretValueResult result = getDe...
SecretsManager { public ByteBuffer getSecretStage(final String secretId, final Stage stage) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(stage.getAwsName()); final GetSecretValueResult result = getDe...
SecretsManager { public ByteBuffer getSecretStage(final String secretId, final Stage stage) { final GetSecretValueRequest getSecretValueRequest = new GetSecretValueRequest(); getSecretValueRequest.setSecretId(secretId); getSecretValueRequest.setVersionStage(stage.getAwsName()); final GetSecretValueResult result = getDe...
@Test public final void verifyGetAuthorizationTokenRejectsMalformedHeader() { final ContainerRequest request = mock(ContainerRequest.class); given(request.getHeaderString("Authorization")).willReturn("Basic YWxpY2U6cGFzc3dvcmQ= 76bd6d14-0148-43c4-8ea0-8368336ce9f1"); assertThrows(NotAuthorizedException.class, () -> uti...
@SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationString.trim(); final St...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
@Test public final void verifyRotateSecretTagsNewKeyAndUntagsOldKey() { manager.rotateSecret("secret", "new", "old"); final UpdateSecretVersionStageRequest request = new UpdateSecretVersionStageRequest(); request.setSecretId("secret"); request.setVersionStage("AWSCURRENT"); request.setMoveToVersionId("new"); request.se...
public void rotateSecret(final String secretId, final String clientRequestToken, final String currentVersion) { final UpdateSecretVersionStageRequest updateSecretVersionStageRequest = new UpdateSecretVersionStageRequest(); updateSecretVersionStageRequest.setSecretId(secretId); updateSecretVersionStageRequest.setVersion...
SecretsManager { public void rotateSecret(final String secretId, final String clientRequestToken, final String currentVersion) { final UpdateSecretVersionStageRequest updateSecretVersionStageRequest = new UpdateSecretVersionStageRequest(); updateSecretVersionStageRequest.setSecretId(secretId); updateSecretVersionStageR...
SecretsManager { public void rotateSecret(final String secretId, final String clientRequestToken, final String currentVersion) { final UpdateSecretVersionStageRequest updateSecretVersionStageRequest = new UpdateSecretVersionStageRequest(); updateSecretVersionStageRequest.setSecretId(secretId); updateSecretVersionStageR...
SecretsManager { public void rotateSecret(final String secretId, final String clientRequestToken, final String currentVersion) { final UpdateSecretVersionStageRequest updateSecretVersionStageRequest = new UpdateSecretVersionStageRequest(); updateSecretVersionStageRequest.setSecretId(secretId); updateSecretVersionStageR...
SecretsManager { public void rotateSecret(final String secretId, final String clientRequestToken, final String currentVersion) { final UpdateSecretVersionStageRequest updateSecretVersionStageRequest = new UpdateSecretVersionStageRequest(); updateSecretVersionStageRequest.setSecretId(secretId); updateSecretVersionStageR...
@Test public final void verifyPutSecretValueStoresKey() throws IOException { final String expected = "expected"; final Key key = mock(Key.class); final Answer<?> answer = new Answer<Void>() { public Void answer(final InvocationOnMock invocation) throws Throwable { final OutputStream stream = invocation.getArgument(0); ...
public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); }
SecretsManager { public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); } }
SecretsManager { public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); } SecretsManager(final AWSSecretsManager delegate); }
SecretsManager { public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); } SecretsManager(final AWSSecretsManager delegate); void shutdown(); void assertCurrentStageExists(final String...
SecretsManager { public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); } SecretsManager(final AWSSecretsManager delegate); void shutdown(); void assertCurrentStageExists(final String...
@Test public final void verifyPutSecretValueStoresKeys() throws IOException { final String expected = "expected"; final Key key0 = mock(Key.class); final Key key1 = mock(Key.class); final Answer<?> answer = new Answer<Void>() { public Void answer(final InvocationOnMock invocation) throws Throwable { final OutputStream ...
public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); }
SecretsManager { public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); } }
SecretsManager { public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); } SecretsManager(final AWSSecretsManager delegate); }
SecretsManager { public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); } SecretsManager(final AWSSecretsManager delegate); void shutdown(); void assertCurrentStageExists(final String...
SecretsManager { public void putSecretValue(final String secretId, final String clientRequestToken, final Key key, final Stage stage) { putSecretValue(secretId, clientRequestToken, singletonList(key), stage); } SecretsManager(final AWSSecretsManager delegate); void shutdown(); void assertCurrentStageExists(final String...
@Test public void testFromString() { final String string = "gAAAAAAdwJ6wAAECAwQFBgcICQoLDA0ODy021cpGVWKZ_eEwCGM4BLLF_5CV9dOPmrhuVUPgJobwOz7JcbmrR64jVmpU4IwqDA=="; final Token result = Token.fromString(string); assertEquals((byte) 0x80, result.getVersion()); assertEquals(Instant.from(formatter.parse("1985-10-26T01:20:00...
public static Token fromString(final String string) { return fromBytes(decoder.decode(string)); }
Token { public static Token fromString(final String string) { return fromBytes(decoder.decode(string)); } }
Token { public static Token fromString(final String string) { return fromBytes(decoder.decode(string)); } @SuppressWarnings({"PMD.ArrayIsStoredDirectly", "PMD.CyclomaticComplexity"}) protected Token(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipher...
Token { public static Token fromString(final String string) { return fromBytes(decoder.decode(string)); } @SuppressWarnings({"PMD.ArrayIsStoredDirectly", "PMD.CyclomaticComplexity"}) protected Token(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipher...
Token { public static Token fromString(final String string) { return fromBytes(decoder.decode(string)); } @SuppressWarnings({"PMD.ArrayIsStoredDirectly", "PMD.CyclomaticComplexity"}) protected Token(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipher...
@Test public void testGenerate() { final SecureRandom deterministicRandom = new SecureRandom() { private static final long serialVersionUID = 3075400891983079965L; public void nextBytes(final byte[] bytes) { for (int i = bytes.length; --i >= 0; bytes[i] = 1); } }; final Key key = Key.generateKey(deterministicRandom); f...
public static Token generate(final Key key, final String plainText) { return generate(new SecureRandom(), key, plainText); }
Token { public static Token generate(final Key key, final String plainText) { return generate(new SecureRandom(), key, plainText); } }
Token { public static Token generate(final Key key, final String plainText) { return generate(new SecureRandom(), key, plainText); } @SuppressWarnings({"PMD.ArrayIsStoredDirectly", "PMD.CyclomaticComplexity"}) protected Token(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, ...
Token { public static Token generate(final Key key, final String plainText) { return generate(new SecureRandom(), key, plainText); } @SuppressWarnings({"PMD.ArrayIsStoredDirectly", "PMD.CyclomaticComplexity"}) protected Token(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, ...
Token { public static Token generate(final Key key, final String plainText) { return generate(new SecureRandom(), key, plainText); } @SuppressWarnings({"PMD.ArrayIsStoredDirectly", "PMD.CyclomaticComplexity"}) protected Token(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, ...
@Test public void testSerialise() { final IvParameterSpec initializationVector = new IvParameterSpec( new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}); final Token invalidToken = new Token((byte) 0x80, Instant.ofEpochSecond(0), initializationVector, new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, ...
@SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( tokenStaticBytes + getCipherText().length)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException e) { throw new IllegalStateExce...
Token { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( tokenStaticBytes + getCipherText().length)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException e) { throw new IllegalS...
Token { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( tokenStaticBytes + getCipherText().length)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException e) { throw new IllegalS...
Token { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( tokenStaticBytes + getCipherText().length)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException e) { throw new IllegalS...
Token { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( tokenStaticBytes + getCipherText().length)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException e) { throw new IllegalS...
@Test public void testGenerateKey() { final SecureRandom deterministicRandom = new SecureRandom() { private static final long serialVersionUID = 6548702184401342900L; public void nextBytes(final byte[] bytes) { for (int i = signingKeyBytes; --i >= 0; bytes[i] = 1); } }; final Key result = Key.generateKey(deterministicR...
public static Key generateKey() { return generateKey(new SecureRandom()); }
Key { public static Key generateKey() { return generateKey(new SecureRandom()); } }
Key { public static Key generateKey() { return generateKey(new SecureRandom()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); }
Key { public static Key generateKey() { return generateKey(new SecureRandom()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final SecureRandom random); byte[] sign(final byte version, final I...
Key { public static Key generateKey() { return generateKey(new SecureRandom()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final SecureRandom random); byte[] sign(final byte version, final I...
@Test public void testGetHmac() { final Key key = new Key("AQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyA="); final byte[] result = key.sign((byte) 0x80, Instant.ofEpochSecond(1), new IvParameterSpec(new byte[] {2}), new byte[] {3}); assertEquals("WvLIvt4MSCQKgeLyvltUqN8O7mvcozhsEAgIiytxypw=", encoder.encodeToString(resul...
public byte[] sign(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipherText) { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( getTokenPrefixBytes() + cipherText.length)) { return sign(version, timestamp, initializationVector, cipherText, byteSt...
Key { public byte[] sign(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipherText) { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( getTokenPrefixBytes() + cipherText.length)) { return sign(version, timestamp, initializationVector, cipherText, ...
Key { public byte[] sign(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipherText) { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( getTokenPrefixBytes() + cipherText.length)) { return sign(version, timestamp, initializationVector, cipherText, ...
Key { public byte[] sign(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipherText) { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( getTokenPrefixBytes() + cipherText.length)) { return sign(version, timestamp, initializationVector, cipherText, ...
Key { public byte[] sign(final byte version, final Instant timestamp, final IvParameterSpec initializationVector, final byte[] cipherText) { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream( getTokenPrefixBytes() + cipherText.length)) { return sign(version, timestamp, initializationVector, cipherText, ...
@Test public void testGetSigningKeySpec() { final Key key = new Key("AQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyA="); final java.security.Key result = key.getSigningKeySpec(); assertEquals("HmacSHA256", result.getAlgorithm()); }
protected java.security.Key getSigningKeySpec() { return new SecretKeySpec(getSigningKey(), getSigningAlgorithm()); }
Key { protected java.security.Key getSigningKeySpec() { return new SecretKeySpec(getSigningKey(), getSigningAlgorithm()); } }
Key { protected java.security.Key getSigningKeySpec() { return new SecretKeySpec(getSigningKey(), getSigningAlgorithm()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); }
Key { protected java.security.Key getSigningKeySpec() { return new SecretKeySpec(getSigningKey(), getSigningAlgorithm()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final SecureRandom random...
Key { protected java.security.Key getSigningKeySpec() { return new SecretKeySpec(getSigningKey(), getSigningAlgorithm()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final SecureRandom random...
@Test public void testGetEncryptionKeySpec() { final Key key = new Key("AQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyA="); final SecretKeySpec result = key.getEncryptionKeySpec(); assertEquals("AES", result.getAlgorithm()); }
protected SecretKeySpec getEncryptionKeySpec() { return new SecretKeySpec(getEncryptionKey(), getEncryptionAlgorithm()); }
Key { protected SecretKeySpec getEncryptionKeySpec() { return new SecretKeySpec(getEncryptionKey(), getEncryptionAlgorithm()); } }
Key { protected SecretKeySpec getEncryptionKeySpec() { return new SecretKeySpec(getEncryptionKey(), getEncryptionAlgorithm()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); }
Key { protected SecretKeySpec getEncryptionKeySpec() { return new SecretKeySpec(getEncryptionKey(), getEncryptionAlgorithm()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final SecureRandom r...
Key { protected SecretKeySpec getEncryptionKeySpec() { return new SecretKeySpec(getEncryptionKey(), getEncryptionAlgorithm()); } Key(final byte[] signingKey, final byte[] encryptionKey); Key(final byte[] concatenatedKeys); Key(final String string); static Key generateKey(); static Key generateKey(final SecureRandom r...
@Test public final void verifyGetAuthorizationTokenRejectsInvalidScheme() { final ContainerRequest request = mock(ContainerRequest.class); given(request.getHeaderString("Authorization")).willReturn("Basic YWxpY2U6cGFzc3dvcmQ="); assertThrows(NotAuthorizedException.class, () -> utility.getAuthorizationToken(request)); }
@SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationString.trim(); final St...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
@Test public void testSerialise() { final Key key = new Key(new byte[] {1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16}, new byte[] {17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32}); final String result = key.serialise(); assertEquals("AQIDBAUGBwgJCgsMDQ4PEBESExQVFhcYGRobHB0eHyA=", result); }
@SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(fernetKeyBytes)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException ioe) { throw new IllegalStateException(ioe.getMessage(), io...
Key { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(fernetKeyBytes)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException ioe) { throw new IllegalStateException(ioe.getMessage...
Key { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(fernetKeyBytes)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException ioe) { throw new IllegalStateException(ioe.getMessage...
Key { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(fernetKeyBytes)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException ioe) { throw new IllegalStateException(ioe.getMessage...
Key { @SuppressWarnings("PMD.LawOfDemeter") public String serialise() { try (ByteArrayOutputStream byteStream = new ByteArrayOutputStream(fernetKeyBytes)) { writeTo(byteStream); return getEncoder().encodeToString(byteStream.toByteArray()); } catch (final IOException ioe) { throw new IllegalStateException(ioe.getMessage...
@Test public final void verifyGetAuthorizationTokenIgnoresX() { final Key key = Key.generateKey(random); final Token token = Token.generate(random, key, "hello"); final ContainerRequest request = mock(ContainerRequest.class); given(request.getHeaderString("X-Authorization")).willReturn(token.serialise()); final Token r...
@SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationString.trim(); final St...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
TokenHeaderUtility { @SuppressWarnings("PMD.AvoidLiteralsInIfCondition") public Token getAuthorizationToken(final ContainerRequest request) { String authorizationString = request.getHeaderString("Authorization"); if (authorizationString != null && !"".equals(authorizationString)) { authorizationString = authorizationSt...
@Test public final void verifyGetXAuthorizationTokenDeserialisesToken() { final Key key = Key.generateKey(random); final Token token = Token.generate(random, key, "hello"); final ContainerRequest request = mock(ContainerRequest.class); given(request.getHeaderString("X-Authorization")).willReturn(token.serialise()); fin...
public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; }
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; } }
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; } }
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; } @Supp...
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; } @Supp...
@Test public final void verifyGetXAuthorizationTokenIgnoresBearer() { final Key key = Key.generateKey(random); final Token token = Token.generate(random, key, "hello"); final ContainerRequest request = mock(ContainerRequest.class); given(request.getHeaderString("Authorization")).willReturn("Bearer " + token.serialise()...
public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; }
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; } }
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; } }
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; } @Supp...
TokenHeaderUtility { public Token getXAuthorizationToken(final ContainerRequest request) { final String xAuthorizationString = request.getHeaderString("X-Authorization"); if (xAuthorizationString != null && !"".equals(xAuthorizationString)) { return Token.fromString(xAuthorizationString.trim()); } return null; } @Supp...
@Test public final void verifyToResponseGeneratesForbidden() { final PayloadValidationException exception = new PayloadValidationException("Invalid payload"); final Response response = mapper.toResponse(exception); assertEquals(403, response.getStatus()); }
public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return new NotAuthorizedException("Bearer error=\"invalid_token\"").getResponse(); }
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return n...
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return n...
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return n...
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return n...
@Test public final void verifyToResponseGeneratesUnauthorized() { final TokenValidationException exception = new TokenExpiredException("token expired"); final Response response = mapper.toResponse(exception); assertEquals(401, response.getStatus()); final String challenge = response.getHeaderString("WWW-Authenticate");...
public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return new NotAuthorizedException("Bearer error=\"invalid_token\"").getResponse(); }
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return n...
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return n...
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return n...
TokenValidationExceptionMapper implements ExceptionMapper<TokenValidationException> { public Response toResponse(final TokenValidationException exception) { if (exception instanceof PayloadValidationException) { return status(FORBIDDEN).entity("Request could not be validated.").type(TEXT_PLAIN_TYPE).build(); } return n...
@Test public void verifyAfterResponseClearsSecret() { final ByteBuffer secretBinary = ByteBuffer.wrap(new byte[] { 1, 1, 2, 3, 5, 8 }); assertTrue(Arrays.equals(secretBinary.array(), new byte[] { 1, 1, 2, 3, 5, 8})); final PutSecretValueRequest originalRequest = new PutSecretValueRequest(); originalRequest.setSecretBin...
public void afterResponse(final Request<?> request, final Response<?> response) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putRequest = (PutSecretValueRequest) requestObject; overwriteSecret(putRequest); } }
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterResponse(final Request<?> request, final Response<?> response) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putRequest = (PutSecretValueReque...
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterResponse(final Request<?> request, final Response<?> response) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putRequest = (PutSecretValueReque...
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterResponse(final Request<?> request, final Response<?> response) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putRequest = (PutSecretValueReque...
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterResponse(final Request<?> request, final Response<?> response) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putRequest = (PutSecretValueReque...
@Test public void verifyAfterErrorClearsSecret() { final ByteBuffer secretBinary = ByteBuffer.wrap(new byte[] { 1, 1, 2, 3, 5, 8 }); assertTrue(Arrays.equals(secretBinary.array(), new byte[] { 1, 1, 2, 3, 5, 8})); final PutSecretValueRequest originalRequest = new PutSecretValueRequest(); originalRequest.setSecretBinary...
public void afterError(final Request<?> request, final Response<?> response, final Exception exception) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putRequest = (PutSecretValueRequest) requestObject; overwriteSecret...
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterError(final Request<?> request, final Response<?> response, final Exception exception) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putReques...
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterError(final Request<?> request, final Response<?> response, final Exception exception) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putReques...
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterError(final Request<?> request, final Response<?> response, final Exception exception) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putReques...
MemoryOverwritingRequestHandler extends RequestHandler2 { public void afterError(final Request<?> request, final Response<?> response, final Exception exception) { final Object requestObject = request.getOriginalRequestObject(); if (requestObject instanceof PutSecretValueRequest) { final PutSecretValueRequest putReques...
@Test public void testId() { Team team1 = new Team(1, null); assertNotNull(team1.getId()); }
public String getId() { return Integer.toString(id); }
Team { public String getId() { return Integer.toString(id); } }
Team { public String getId() { return Integer.toString(id); } Team(final int id, final String name); }
Team { public String getId() { return Integer.toString(id); } Team(final int id, final String name); String getId(); String getName(); void setName(final String name); boolean isScrumTeam(); void setScrumTeam(final boolean isScrumTeam); List<Employee> getEmployees(); @Override int hashCode(); @Override boolean equals(f...
Team { public String getId() { return Integer.toString(id); } Team(final int id, final String name); String getId(); String getName(); void setName(final String name); boolean isScrumTeam(); void setScrumTeam(final boolean isScrumTeam); List<Employee> getEmployees(); @Override int hashCode(); @Override boolean equals(f...
@Test public void testGetBuilder() { assertNotNull(objJPAEdmModel.getBuilder()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmModelBuilder(); } return builder; }
JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmModelBuilder(); } return builder; } }
JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmModelBuilder(); } return builder; } JPAEdmModel(final Metamodel metaModel, final String pUnitName); JPAEdmModel(final ODataJPAContext ctx); }
JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmModelBuilder(); } return builder; } JPAEdmModel(final Metamodel metaModel, final String pUnitName); JPAEdmModel(final ODataJPAContext ctx); @Override JPAEdmSchema...
JPAEdmModel extends JPAEdmBaseViewImpl implements JPAEdmModelView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmModelBuilder(); } return builder; } JPAEdmModel(final Metamodel metaModel, final String pUnitName); JPAEdmModel(final ODataJPAContext ctx); @Override JPAEdmSchema...
@Test public void testGetBuilder() { assertNotNull(objJPAEdmAssociationSet.getBuilder()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } JPAEdmAssociationSet(final JPAEdmSchemaView view); }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Overri...
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Overri...
@Test public void testGetConsistentEdmAssociationSetList() { assertNotNull(objJPAEdmAssociationSet.getConsistentEdmAssociationSetList()); }
@Override public List<AssociationSet> getConsistentEdmAssociationSetList() { return associationSetList; }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public List<AssociationSet> getConsistentEdmAssociationSetList() { return associationSetList; } }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public List<AssociationSet> getConsistentEdmAssociationSetList() { return associationSetList; } JPAEdmAssociationSet(final JPAEdmSchemaView view); }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public List<AssociationSet> getConsistentEdmAssociationSetList() { return associationSetList; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<AssociationSet> getC...
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public List<AssociationSet> getConsistentEdmAssociationSetList() { return associationSetList; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<AssociationSet> getC...
@Test public void testGetEdmAssociationSet() { assertNotNull(objJPAEdmAssociationSet.getEdmAssociationSet()); }
@Override public AssociationSet getEdmAssociationSet() { return currentAssociationSet; }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public AssociationSet getEdmAssociationSet() { return currentAssociationSet; } }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public AssociationSet getEdmAssociationSet() { return currentAssociationSet; } JPAEdmAssociationSet(final JPAEdmSchemaView view); }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public AssociationSet getEdmAssociationSet() { return currentAssociationSet; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<AssociationSet> getConsistentEdmAssoc...
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public AssociationSet getEdmAssociationSet() { return currentAssociationSet; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<AssociationSet> getConsistentEdmAssoc...
@Test public void testGetEdmAssociation() { assertNotNull(objJPAEdmAssociationSet.getEdmAssociation()); }
@Override public Association getEdmAssociation() { return currentAssociation; }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public Association getEdmAssociation() { return currentAssociation; } }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public Association getEdmAssociation() { return currentAssociation; } JPAEdmAssociationSet(final JPAEdmSchemaView view); }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public Association getEdmAssociation() { return currentAssociation; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<AssociationSet> getConsistentEdmAssociationSet...
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public Association getEdmAssociation() { return currentAssociation; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Override List<AssociationSet> getConsistentEdmAssociationSet...
@Test public void testGetBuilderIdempotent() { JPAEdmBuilder builder1 = objJPAEdmAssociationSet.getBuilder(); JPAEdmBuilder builder2 = objJPAEdmAssociationSet.getBuilder(); assertEquals(builder1.hashCode(), builder2.hashCode()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } JPAEdmAssociationSet(final JPAEdmSchemaView view); }
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Overri...
JPAEdmAssociationSet extends JPAEdmBaseViewImpl implements JPAEdmAssociationSetView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationSetBuilder(); } return builder; } JPAEdmAssociationSet(final JPAEdmSchemaView view); @Override JPAEdmBuilder getBuilder(); @Overri...
@Test public void testGetpUnitName() { assertTrue(objJPAEdmBaseViewImpl.getpUnitName().equals("salesorderprocessing")); }
@Override public String getpUnitName() { return pUnitName; }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public String getpUnitName() { return pUnitName; } }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public String getpUnitName() { return pUnitName; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public String getpUnitName() { return pUnitName; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getpUnitName(); @Overrid...
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public String getpUnitName() { return pUnitName; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getpUnitName(); @Overrid...
@Test public void testGetJPAMetaModel() { assertNotNull(objJPAEdmBaseViewImpl.getJPAMetaModel()); }
@Override public Metamodel getJPAMetaModel() { return metaModel; }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public Metamodel getJPAMetaModel() { return metaModel; } }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public Metamodel getJPAMetaModel() { return metaModel; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public Metamodel getJPAMetaModel() { return metaModel; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getpUnitName(); @O...
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public Metamodel getJPAMetaModel() { return metaModel; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getpUnitName(); @O...
@Test public void testIsConsistent() { assertTrue(objJPAEdmBaseViewImpl.isConsistent()); }
@Override public boolean isConsistent() { return isConsistent; }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public boolean isConsistent() { return isConsistent; } }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public boolean isConsistent() { return isConsistent; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public boolean isConsistent() { return isConsistent; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getpUnitName(); @Ove...
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public boolean isConsistent() { return isConsistent; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override String getpUnitName(); @Ove...
@Test public void testClean() { objJPAEdmBaseViewImpl.clean(); assertFalse(objJPAEdmBaseViewImpl.isConsistent()); }
@Override public void clean() { pUnitName = null; metaModel = null; isConsistent = false; }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public void clean() { pUnitName = null; metaModel = null; isConsistent = false; } }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public void clean() { pUnitName = null; metaModel = null; isConsistent = false; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); }
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public void clean() { pUnitName = null; metaModel = null; isConsistent = false; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override ...
JPAEdmBaseViewImpl implements JPAEdmBaseView { @Override public void clean() { pUnitName = null; metaModel = null; isConsistent = false; } JPAEdmBaseViewImpl(final JPAEdmBaseView view); JPAEdmBaseViewImpl(final ODataJPAContext context); JPAEdmBaseViewImpl(final Metamodel metaModel, final String pUnitName); @Override ...
@Test public void testRooms() { List<Room> list = Arrays.asList(new Room(1, null), new Room(2, null), new Room(3, null)); Building building1 = new Building(1, null); building1.getRooms().add(list.get(0)); building1.getRooms().add(list.get(1)); building1.getRooms().add(list.get(2)); assertEquals(list, building1.getRooms...
public List<Room> getRooms() { return rooms; }
Building { public List<Room> getRooms() { return rooms; } }
Building { public List<Room> getRooms() { return rooms; } Building(final int id, final String name); }
Building { public List<Room> getRooms() { return rooms; } Building(final int id, final String name); String getId(); void setName(final String name); String getName(); void setImage(final byte[] byteArray); byte[] getImage(); List<Room> getRooms(); @Override int hashCode(); @Override boolean equals(final Object obj); @...
Building { public List<Room> getRooms() { return rooms; } Building(final int id, final String name); String getId(); void setName(final String name); String getName(); void setImage(final byte[] byteArray); byte[] getImage(); List<Room> getRooms(); @Override int hashCode(); @Override boolean equals(final Object obj); @...
@Test public void testGetBuilder() { assertNotNull(objComplexType.getBuilder()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
@Test public void testGetEdmComplexType() { assertEquals(objComplexType.getEdmComplexType().getName(), "String"); }
@Override public ComplexType getEdmComplexType() { return currentComplexType; }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType getEdmComplexType() { return currentComplexType; } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType getEdmComplexType() { return currentComplexType; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute); }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType getEdmComplexType() { return currentComplexType; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute); @Override JPAEdmBui...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType getEdmComplexType() { return currentComplexType; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute); @Override JPAEdmBui...
@Test public void testSearchComplexTypeString() { assertNotNull(objComplexType.searchEdmComplexType("java.lang.String")); }
@Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
@Test public void testGetJPAEmbeddableType() { assertTrue(objComplexType.getJPAEmbeddableType().getAttributes().size() > 0); }
@Override public EmbeddableType<?> getJPAEmbeddableType() { return currentEmbeddableType; }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public EmbeddableType<?> getJPAEmbeddableType() { return currentEmbeddableType; } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public EmbeddableType<?> getJPAEmbeddableType() { return currentEmbeddableType; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute); }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public EmbeddableType<?> getJPAEmbeddableType() { return currentEmbeddableType; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute); @Overri...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public EmbeddableType<?> getJPAEmbeddableType() { return currentEmbeddableType; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute); @Overri...
@Test public void testGetConsistentEdmComplexTypes() { assertTrue(objComplexType.getConsistentEdmComplexTypes().size() > 0); }
@Override public List<ComplexType> getConsistentEdmComplexTypes() { return consistentComplextTypes; }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public List<ComplexType> getConsistentEdmComplexTypes() { return consistentComplextTypes; } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public List<ComplexType> getConsistentEdmComplexTypes() { return consistentComplextTypes; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public List<ComplexType> getConsistentEdmComplexTypes() { return consistentComplextTypes; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public List<ComplexType> getConsistentEdmComplexTypes() { return consistentComplextTypes; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attribute<?, ?> complexAttribute...
@Test public void testSearchComplexTypeFullQualifiedName() { assertNotNull(objComplexType.searchEdmComplexType(new FullQualifiedName("salesorderprocessing", "String"))); }
@Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
@Test public void testSearchComplexTypeFullQualifiedNameNegative() { assertNull(objComplexType.searchEdmComplexType(new FullQualifiedName("salesorderprocessing", "lang.String"))); }
@Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public ComplexType searchEdmComplexType(final String embeddableTypeName) { return searchMap.get(embeddableTypeName); } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Attri...
@Test public void testGetBuilderIdempotent() { JPAEdmBuilder builder1 = objComplexType.getBuilder(); JPAEdmBuilder builder2 = objComplexType.getBuilder(); assertEquals(builder1.hashCode(), builder2.hashCode()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
@Test public void testExpandEdmComplexType() { ComplexType complexType = new ComplexType(); List<Property> properties = new ArrayList<Property>(); JPAEdmMapping mapping1 = new JPAEdmMappingImpl(); mapping1.setJPAColumnName("LINEITEMID"); ((Mapping) mapping1).setInternalName("LineItemKey.LiId"); JPAEdmMapping mapping2 =...
@Override public void expandEdmComplexType(final ComplexType complexType, List<Property> expandedList, final String embeddablePropertyName) { if (expandedList == null) { expandedList = new ArrayList<Property>(); } for (Property property : complexType.getProperties()) { try { SimpleProperty newSimpleProperty = new Simpl...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public void expandEdmComplexType(final ComplexType complexType, List<Property> expandedList, final String embeddablePropertyName) { if (expandedList == null) { expandedList = new ArrayList<Property>(); } for (Property property...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public void expandEdmComplexType(final ComplexType complexType, List<Property> expandedList, final String embeddablePropertyName) { if (expandedList == null) { expandedList = new ArrayList<Property>(); } for (Property property...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public void expandEdmComplexType(final ComplexType complexType, List<Property> expandedList, final String embeddablePropertyName) { if (expandedList == null) { expandedList = new ArrayList<Property>(); } for (Property property...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public void expandEdmComplexType(final ComplexType complexType, List<Property> expandedList, final String embeddablePropertyName) { if (expandedList == null) { expandedList = new ArrayList<Property>(); } for (Property property...
@Test public void testComplexTypeCreation() { try { objComplexType.getBuilder().build(); } catch (ODataJPARuntimeException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PART_1 + e.getMessage() + ODataJPATestConstants.EXCEPTION_MSG_PART_2); } catch (ODataJPAModelException e) { fail(ODataJPATestConstants.EXCEPTION_MSG_PA...
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } }
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
JPAEdmComplexType extends JPAEdmBaseViewImpl implements JPAEdmComplexTypeView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmComplexTypeBuilder(); } return builder; } JPAEdmComplexType(final JPAEdmSchemaView view); JPAEdmComplexType(final JPAEdmSchemaView view, final Att...
@Test public void testId() { Employee employee1 = new Employee(1, null); assertNotNull(employee1.getId()); }
public String getId() { return Integer.toString(employeeId); }
Employee { public String getId() { return Integer.toString(employeeId); } }
Employee { public String getId() { return Integer.toString(employeeId); } Employee(final int employeeId, final String name); }
Employee { public String getId() { return Integer.toString(employeeId); } Employee(final int employeeId, final String name); String getId(); void setEmployeeName(final String employeeName); String getEmployeeName(); void setAge(final int age); int getAge(); void setManager(final Manager manager); Manager getManager(); ...
Employee { public String getId() { return Integer.toString(employeeId); } Employee(final int employeeId, final String name); String getId(); void setEmployeeName(final String employeeName); String getEmployeeName(); void setAge(final int age); int getAge(); void setManager(final Manager manager); Manager getManager(); ...
@Test public void testGetBuilder() { assertNotNull(objJPAEdmReferentialConstraint.getBuilder()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; }
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } }
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, fina...
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, fina...
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, fina...
@Test public void testGetBuilderIdempotent() { JPAEdmBuilder builder1 = objJPAEdmReferentialConstraint.getBuilder(); JPAEdmBuilder builder2 = objJPAEdmReferentialConstraint.getBuilder(); assertEquals(builder1.hashCode(), builder2.hashCode()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; }
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } }
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, fina...
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, fina...
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmRefConstraintBuilder(); } return builder; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, fina...
@Test public void testGetEdmReferentialConstraint() { assertNotNull(objJPAEdmReferentialConstraint .getEdmReferentialConstraint()); }
@Override public ReferentialConstraint getEdmReferentialConstraint() { return referentialConstraint; }
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public ReferentialConstraint getEdmReferentialConstraint() { return referentialConstraint; } }
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public ReferentialConstraint getEdmReferentialConstraint() { return referentialConstraint; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, final JPAEdmEntityTypeView entityT...
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public ReferentialConstraint getEdmReferentialConstraint() { return referentialConstraint; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, final JPAEdmEntityTypeView entityT...
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public ReferentialConstraint getEdmReferentialConstraint() { return referentialConstraint; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, final JPAEdmEntityTypeView entityT...
@Test public void testGetRelationShipName() { assertEquals("Assoc_SalesOrderHeader_SalesOrderItem", objJPAEdmReferentialConstraint.getEdmRelationShipName()); }
@Override public String getEdmRelationShipName() { return relationShipName; }
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public String getEdmRelationShipName() { return relationShipName; } }
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public String getEdmRelationShipName() { return relationShipName; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, final JPAEdmEntityTypeView entityTypeView, final JPAEdmProp...
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public String getEdmRelationShipName() { return relationShipName; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, final JPAEdmEntityTypeView entityTypeView, final JPAEdmProp...
JPAEdmReferentialConstraint extends JPAEdmBaseViewImpl implements JPAEdmReferentialConstraintView { @Override public String getEdmRelationShipName() { return relationShipName; } JPAEdmReferentialConstraint(final JPAEdmAssociationView associationView, final JPAEdmEntityTypeView entityTypeView, final JPAEdmProp...
@Test public void testGetBuilder() { JPAEdmBuilder builder = objJPAEdmAssociationEnd.getBuilder(); assertNotNull(builder); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView p...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView p...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView p...
@Test public void testGetBuilderIdempotent() { JPAEdmBuilder builder1 = objJPAEdmAssociationEnd.getBuilder(); JPAEdmBuilder builder2 = objJPAEdmAssociationEnd.getBuilder(); assertEquals(builder1.hashCode(), builder2.hashCode()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView p...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView p...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationEndBuilder(); } return builder; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView p...
@Test public void testGetAssociationEnd1() { AssociationEnd associationEnd = objJPAEdmAssociationEnd .getEdmAssociationEnd1(); assertEquals(associationEnd.getType().getName(), "SOID"); }
@Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); @Override JPAEdmBuilder getBu...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); @Override JPAEdmBuilder getBu...
@Test public void testGetAssociationEnd2() { AssociationEnd associationEnd = objJPAEdmAssociationEnd .getEdmAssociationEnd2(); assertEquals(associationEnd.getType().getName(), "String"); }
@Override public AssociationEnd getEdmAssociationEnd2() { return currentAssociationEnd2; }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd2() { return currentAssociationEnd2; } }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd2() { return currentAssociationEnd2; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd2() { return currentAssociationEnd2; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); @Override JPAEdmBuilder getBu...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd2() { return currentAssociationEnd2; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); @Override JPAEdmBuilder getBu...
@Test public void testCompare() { assertTrue(objJPAEdmAssociationEnd.compare( getAssociationEnd("SOID", 1), getAssociationEnd("String", 1))); assertFalse(objJPAEdmAssociationEnd.compare( getAssociationEnd("String", 2), getAssociationEnd("SOID", 1))); }
@Override public boolean compare(final AssociationEnd end1, final AssociationEnd end2) { if ((end1.getType().equals(currentAssociationEnd1.getType()) && end2.getType().equals(currentAssociationEnd2.getType()) && end1.getMultiplicity().equals( currentAssociationEnd1.getMultiplicity()) && end2 .getMultiplicity().equals( ...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public boolean compare(final AssociationEnd end1, final AssociationEnd end2) { if ((end1.getType().equals(currentAssociationEnd1.getType()) && end2.getType().equals(currentAssociationEnd2.getType()) && end1.getMultiplici...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public boolean compare(final AssociationEnd end1, final AssociationEnd end2) { if ((end1.getType().equals(currentAssociationEnd1.getType()) && end2.getType().equals(currentAssociationEnd2.getType()) && end1.getMultiplici...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public boolean compare(final AssociationEnd end1, final AssociationEnd end2) { if ((end1.getType().equals(currentAssociationEnd1.getType()) && end2.getType().equals(currentAssociationEnd2.getType()) && end1.getMultiplici...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public boolean compare(final AssociationEnd end1, final AssociationEnd end2) { if ((end1.getType().equals(currentAssociationEnd1.getType()) && end2.getType().equals(currentAssociationEnd2.getType()) && end1.getMultiplici...
@Test public void testBuildAssociationEnd() { assertEquals("SOID", objJPAEdmAssociationEnd.getEdmAssociationEnd1().getType().getName()); assertEquals(new FullQualifiedName("salesorderprocessing", "SOID"), objJPAEdmAssociationEnd.getEdmAssociationEnd1().getType()); assertTrue(objJPAEdmAssociationEnd.isConsistent()); }
@Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); }
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); @Override JPAEdmBuilder getBu...
JPAEdmAssociationEnd extends JPAEdmBaseViewImpl implements JPAEdmAssociationEndView { @Override public AssociationEnd getEdmAssociationEnd1() { return currentAssociationEnd1; } JPAEdmAssociationEnd(final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propertyView); @Override JPAEdmBuilder getBu...
@Test public void testName() { Employee employee1 = new Employee(1, VALUE_NAME); assertEquals(VALUE_NAME, employee1.getEmployeeName()); }
public String getEmployeeName() { return employeeName; }
Employee { public String getEmployeeName() { return employeeName; } }
Employee { public String getEmployeeName() { return employeeName; } Employee(final int employeeId, final String name); }
Employee { public String getEmployeeName() { return employeeName; } Employee(final int employeeId, final String name); String getId(); void setEmployeeName(final String employeeName); String getEmployeeName(); void setAge(final int age); int getAge(); void setManager(final Manager manager); Manager getManager(); void s...
Employee { public String getEmployeeName() { return employeeName; } Employee(final int employeeId, final String name); String getId(); void setEmployeeName(final String employeeName); String getEmployeeName(); void setAge(final int age); int getAge(); void setManager(final Manager manager); Manager getManager(); void s...
@Test public void testGetBuilder() { assertNotNull(objAssociation.getBuilder()); }
@Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationBuilder(); } return builder; }
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationBuilder(); } return builder; } }
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationBuilder(); } return builder; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView ent...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationBuilder(); } return builder; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView ent...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public JPAEdmBuilder getBuilder() { if (builder == null) { builder = new JPAEdmAssociationBuilder(); } return builder; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView ent...
@Test public void testGetEdmAssociation() { assertNotNull(objAssociation.getEdmAssociation()); assertEquals(objAssociation.getEdmAssociation().getName(), ASSOCIATION_NAME); }
@Override public Association getEdmAssociation() { return currentAssociation; }
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public Association getEdmAssociation() { return currentAssociation; } }
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public Association getEdmAssociation() { return currentAssociation; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propert...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public Association getEdmAssociation() { return currentAssociation; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propert...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public Association getEdmAssociation() { return currentAssociation; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView entityTypeView, final JPAEdmPropertyView propert...
@Test public void testGetConsistentEdmAssociationList() { assertTrue(objAssociation.getConsistentEdmAssociationList().size() > 0); }
@Override public List<Association> getConsistentEdmAssociationList() { return consistentAssociatonList; }
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public List<Association> getConsistentEdmAssociationList() { return consistentAssociatonList; } }
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public List<Association> getConsistentEdmAssociationList() { return consistentAssociatonList; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView entityTypeView, final ...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public List<Association> getConsistentEdmAssociationList() { return consistentAssociatonList; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView entityTypeView, final ...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public List<Association> getConsistentEdmAssociationList() { return consistentAssociatonList; } JPAEdmAssociation(final JPAEdmAssociationEndView associationEndview, final JPAEdmEntityTypeView entityTypeView, final ...
@Test public void testAddJPAEdmAssociationView() { class LocalJPAAssociationView extends JPAEdmTestModelView { @Override public AssociationEnd getEdmAssociationEnd1() { AssociationEnd associationEnd = new AssociationEnd(); associationEnd.setType(new FullQualifiedName( "salesorderprocessing", "SalesOrderHeader")); assoc...
@Override public void addJPAEdmAssociationView(final JPAEdmAssociationView associationView, final JPAEdmAssociationEndView associationEndView) { if (associationView != null) { currentAssociation = associationView.getEdmAssociation(); associationMap .put(currentAssociation.getName(), currentAssociation); associationEndM...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public void addJPAEdmAssociationView(final JPAEdmAssociationView associationView, final JPAEdmAssociationEndView associationEndView) { if (associationView != null) { currentAssociation = associationView.getEdmAssociation(); as...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public void addJPAEdmAssociationView(final JPAEdmAssociationView associationView, final JPAEdmAssociationEndView associationEndView) { if (associationView != null) { currentAssociation = associationView.getEdmAssociation(); as...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public void addJPAEdmAssociationView(final JPAEdmAssociationView associationView, final JPAEdmAssociationEndView associationEndView) { if (associationView != null) { currentAssociation = associationView.getEdmAssociation(); as...
JPAEdmAssociation extends JPAEdmBaseViewImpl implements JPAEdmAssociationView { @Override public void addJPAEdmAssociationView(final JPAEdmAssociationView associationView, final JPAEdmAssociationEndView associationEndView) { if (associationView != null) { currentAssociation = associationView.getEdmAssociation(); as...