@Test public void approveArtifact(){ final DbArtifact artifact = new DbArtifact(); artifact.setGroupId("test.test.test"); artifact.setArtifactId("test"); artifact.setVersion("1.0.0-8"); GavcFilter filter = new GavcFilter(artifact.getGavc()); assertTrue(filter.filter(artifact)); filter = new GavcFilter("test"); assertFalse(filter.filter(artifact)); }
@Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return gavc.equals( ((DbArtifact)datamodelObj).getGavc()); } return false; }
GavcFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return gavc.equals( ((DbArtifact)datamodelObj).getGavc()); } return false; } }
GavcFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return gavc.equals( ((DbArtifact)datamodelObj).getGavc()); } return false; } GavcFilter(final String gavc); }
GavcFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return gavc.equals( ((DbArtifact)datamodelObj).getGavc()); } return false; } GavcFilter(final String gavc); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields(); }
GavcFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbArtifact){ return gavc.equals( ((DbArtifact)datamodelObj).getGavc()); } return false; } GavcFilter(final String gavc); @Override boolean filter(final Object datamodelObj); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields();  }