@Test public void approveArtifact(){ final DbArtifact artifact = new DbArtifact(); artifact.setExtension("extensionTest"); ExtensionFilter filter = new ExtensionFilter(artifact.getExtension()); assertTrue(filter.filter(artifact)); filter = new ExtensionFilter("test"); assertFalse(filter.filter(artifact)); }
@Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return extension.equals( ((DbArtifact)datamodelObj).getExtension()); } return false; }
ExtensionFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return extension.equals( ((DbArtifact)datamodelObj).getExtension()); } return false; } }
ExtensionFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return extension.equals( ((DbArtifact)datamodelObj).getExtension()); } return false; } ExtensionFilter(final String extension); }
ExtensionFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return extension.equals( ((DbArtifact)datamodelObj).getExtension()); } return false; } ExtensionFilter(final String extension); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields(); }
ExtensionFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return extension.equals( ((DbArtifact)datamodelObj).getExtension()); } return false; } ExtensionFilter(final String extension); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields();  }