@Test public void approveArtifact(){ final DbArtifact artifact = new DbArtifact(); artifact.setType("typeTest"); TypeFilter filter = new TypeFilter(artifact.getType()); assertTrue(filter.filter(artifact)); filter = new TypeFilter("test"); assertFalse(filter.filter(artifact)); }
@Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return type.equals( ((DbArtifact)datamodelObj).getType()); } return false; }
TypeFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return type.equals( ((DbArtifact)datamodelObj).getType()); } return false; } }
TypeFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return type.equals( ((DbArtifact)datamodelObj).getType()); } return false; } TypeFilter(final String type); }
TypeFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return type.equals( ((DbArtifact)datamodelObj).getType()); } return false; } TypeFilter(final String type); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields(); }
TypeFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return type.equals( ((DbArtifact)datamodelObj).getType()); } return false; } TypeFilter(final String type); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields();  }