@Test public void checkFilterArtifactWhichIsCorporate(){ final DbOrganization organization = new DbOrganization(); organization.setName("testOrganization"); organization.getCorporateGroupIdPrefixes().add(GrapesTestUtils.CORPORATE_GROUPID_4TEST); final CorporateFilter filter = new CorporateFilter(organization); final DbArtifact artifact = new DbArtifact(); artifact.setGroupId(GrapesTestUtils.CORPORATE_GROUPID_4TEST); assertTrue(filter.filter(artifact)); }
@Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return matches((DbModule) datamodelObj); } if(datamodelObj instanceof DbArtifact){ return matches((DbArtifact)datamodelObj); } if(datamodelObj instanceof DbDependency){ return matches((DbDependency)datamodelObj); } return false; }
CorporateFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return matches((DbModule) datamodelObj); } if(datamodelObj instanceof DbArtifact){ return matches((DbArtifact)datamodelObj); } if(datamodelObj instanceof DbDependency){ return matches((DbDependency)datamodelObj); } return false; } }
CorporateFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return matches((DbModule) datamodelObj); } if(datamodelObj instanceof DbArtifact){ return matches((DbArtifact)datamodelObj); } if(datamodelObj instanceof DbDependency){ return matches((DbDependency)datamodelObj); } return false; } CorporateFilter(final DbOrganization organization); }
CorporateFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return matches((DbModule) datamodelObj); } if(datamodelObj instanceof DbArtifact){ return matches((DbArtifact)datamodelObj); } if(datamodelObj instanceof DbDependency){ return matches((DbDependency)datamodelObj); } return false; } CorporateFilter(final DbOrganization organization); @Override boolean filter(final Object datamodelObj); boolean matches(final DbModule module); boolean matches(final DbArtifact artifact); boolean matches(final DbDependency dependency); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields(); DBRegExp getMongoRegExp(); }
CorporateFilter implements Filter { @Override public boolean filter(final Object datamodelObj) { if(datamodelObj instanceof DbModule){ return matches((DbModule) datamodelObj); } if(datamodelObj instanceof DbArtifact){ return matches((DbArtifact)datamodelObj); } if(datamodelObj instanceof DbDependency){ return matches((DbDependency)datamodelObj); } return false; } CorporateFilter(final DbOrganization organization); @Override boolean filter(final Object datamodelObj); boolean matches(final DbModule module); boolean matches(final DbArtifact artifact); boolean matches(final DbDependency dependency); @Override Map<String, Object> moduleFilterFields(); @Override Map<String, Object> artifactFilterFields(); DBRegExp getMongoRegExp();  }