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(expected = SelectorParseException.class) public void testInvalidSelectors() throws SelectorParseException { final ClassType student = provider.getClassType("Student"); final SemanticSelector selector = defaultSelectorSemanticModel.parse(generateFaultySelectorObjectMap(), student); }
public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selectors"); } final SemanticSelector selector = new SemanticSelector();...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
@Test public void testDefaultXSD() { final Map<String, Object> studentAttrs = new HashMap<String, Object>(); studentAttrs.put("$", true); final ClassType student = provider.getClassType("Student"); final SemanticSelector semanticSelector = defaultSelectorSemanticModel.parse(studentAttrs, student); final List<SelectorEl...
public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selectors"); } final SemanticSelector selector = new SemanticSelector();...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
@Test public void testDefault() { final Map<String, Object> studentAttrs = new HashMap<String, Object>(); studentAttrs.put(".", true); final ClassType student = provider.getClassType("Student"); final SemanticSelector semanticSelector = defaultSelectorSemanticModel.parse(studentAttrs, student); final List<SelectorEleme...
public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selectors"); } final SemanticSelector selector = new SemanticSelector();...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
@Test public void testEmptySelectors() { final Map<String, Object> studentAttrs = new HashMap<String, Object>(); final ClassType student = provider.getClassType("Student"); final SemanticSelector semanticSelector = defaultSelectorSemanticModel.parse(studentAttrs, student); assertEquals(1, semanticSelector.get(student)....
public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selectors"); } final SemanticSelector selector = new SemanticSelector();...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
DefaultSelectorSemanticModel implements SelectorSemanticModel { public SemanticSelector parse(final Map<String, Object> selectors, final ClassType type) throws SelectorParseException { if (type == null) { throw new IllegalArgumentException("type"); } if (selectors == null) { throw new IllegalArgumentException("selector...
@Test public void testAddSelector() { final Type testType = mock(Type.class); final SelectorElement se = mock(SelectorElement.class); selector.addSelector(testType, se); assertNotNull(selector.get(testType)); assertEquals(1, selector.get(testType).size()); selector.addSelector(testType, mock(BooleanSelectorElement.clas...
public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } } }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } } }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } } void addSelector(f...
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { public void addSelector(final Type type, final SelectorElement se) { if (this.containsKey(type)) { this.get(type).add(se); } else { this.put(type, new ArrayList<SelectorElement>(Arrays.asList(se))); } } void addSelector(f...
@Test public void testToString() { assertTrue(selector.toString().isEmpty()); }
@Override public String toString() { final StringBuilder builder = new StringBuilder(); for (final Map.Entry<Type, List<SelectorElement>> item : this.entrySet()) { final List<SelectorElement> elements = item.getValue(); builder.append("["); builder.append(StringUtils.join(elements, ',')); builder.append("]"); } return ...
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { @Override public String toString() { final StringBuilder builder = new StringBuilder(); for (final Map.Entry<Type, List<SelectorElement>> item : this.entrySet()) { final List<SelectorElement> elements = item.getValue(); bu...
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { @Override public String toString() { final StringBuilder builder = new StringBuilder(); for (final Map.Entry<Type, List<SelectorElement>> item : this.entrySet()) { final List<SelectorElement> elements = item.getValue(); bu...
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { @Override public String toString() { final StringBuilder builder = new StringBuilder(); for (final Map.Entry<Type, List<SelectorElement>> item : this.entrySet()) { final List<SelectorElement> elements = item.getValue(); bu...
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { @Override public String toString() { final StringBuilder builder = new StringBuilder(); for (final Map.Entry<Type, List<SelectorElement>> item : this.entrySet()) { final List<SelectorElement> elements = item.getValue(); bu...
@Test public void testVisitor() { final SelectorQueryVisitor visitor = mock(SelectorQueryVisitor.class); selector.accept(visitor); verify(visitor).visit(selector); }
@Override public SelectorQueryPlan accept(SelectorQueryVisitor selectorQueryVisitor) { return selectorQueryVisitor.visit(this); }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { @Override public SelectorQueryPlan accept(SelectorQueryVisitor selectorQueryVisitor) { return selectorQueryVisitor.visit(this); } }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { @Override public SelectorQueryPlan accept(SelectorQueryVisitor selectorQueryVisitor) { return selectorQueryVisitor.visit(this); } }
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { @Override public SelectorQueryPlan accept(SelectorQueryVisitor selectorQueryVisitor) { return selectorQueryVisitor.visit(this); } void addSelector(final Type type, final SelectorElement se); @Override SelectorQueryPlan ac...
SemanticSelector extends HashMap<Type, List<SelectorElement>> implements SelectorQueryVisitable { @Override public SelectorQueryPlan accept(SelectorQueryVisitor selectorQueryVisitor) { return selectorQueryVisitor.visit(this); } void addSelector(final Type type, final SelectorElement se); @Override SelectorQueryPlan ac...
@Test public void testSuccessfulLoadOfData() { final ClassType studentType = provider.getClassType("Student"); final ClassType studentSectionAssociationType = provider.getClassType("StudentSectionAssociation"); final ClassType sectionType = provider.getClassType("Section"); SemanticSelector sectionSelector = defaultSel...
@Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } @Override SemanticSelector getSelector(String type); }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } @Override SemanticSelector getSelector(String type); static final String DEFAULT_SELECTOR_TYPE_KEY; sta...
@Test public void testCourseTranscriptMapping() { NeutralRecord transcript = createCourseTranscriptNeutralRecord(false); ReportStats reportStats = new SimpleReportStats(); List<? extends Entity> result = transformer.transform(transcript, new DummyMessageReport(), reportStats); Assert.assertNotNull(result); Assert.asser...
@Override public List<SimpleEntity> transform(NeutralRecord item, AbstractMessageReport report, ReportStats reportStats) { JavaResult result = new JavaResult(); Smooks smooks = smooksConfigs.get(item.getRecordType()); if (smooks == null) { String type = item.getRecordType().replaceAll("_transformed", ""); Map<String, O...
SmooksEdFi2SLITransformer extends EdFi2SLITransformer { @Override public List<SimpleEntity> transform(NeutralRecord item, AbstractMessageReport report, ReportStats reportStats) { JavaResult result = new JavaResult(); Smooks smooks = smooksConfigs.get(item.getRecordType()); if (smooks == null) { String type = item.getRe...
SmooksEdFi2SLITransformer extends EdFi2SLITransformer { @Override public List<SimpleEntity> transform(NeutralRecord item, AbstractMessageReport report, ReportStats reportStats) { JavaResult result = new JavaResult(); Smooks smooks = smooksConfigs.get(item.getRecordType()); if (smooks == null) { String type = item.getRe...
SmooksEdFi2SLITransformer extends EdFi2SLITransformer { @Override public List<SimpleEntity> transform(NeutralRecord item, AbstractMessageReport report, ReportStats reportStats) { JavaResult result = new JavaResult(); Smooks smooks = smooksConfigs.get(item.getRecordType()); if (smooks == null) { String type = item.getRe...
SmooksEdFi2SLITransformer extends EdFi2SLITransformer { @Override public List<SimpleEntity> transform(NeutralRecord item, AbstractMessageReport report, ReportStats reportStats) { JavaResult result = new JavaResult(); Smooks smooks = smooksConfigs.get(item.getRecordType()); if (smooks == null) { String type = item.getRe...
@Test public void assertGracefulHandlingOfInvalidTypeDefaultSelector() { assertNull("Should be null", defaultSelectorRepository.getSelector("type1")); }
@Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } @Override SemanticSelector getSelector(String type); }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } @Override SemanticSelector getSelector(String type); static final String DEFAULT_SELECTOR_TYPE_KEY; sta...
@Test public void assertGracefulHandlingOfMissingDefaultSelector() { final ClassType schoolType = provider.getClassType("School"); SemanticSelector schoolSelector = defaultSelectorRepository.getSelector("School"); assertNotNull("Should not be null", schoolSelector); List<SelectorElement> elements = schoolSelector.get(s...
@Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } @Override SemanticSelector getSelector(String type); }
DefaultSelectorStore implements SelectorRepository { @Override public SemanticSelector getSelector(String type) { return defaultSelectors.containsKey(type) ? defaultSelectors.get(type) : getFallBackSelector(type); } @Override SemanticSelector getSelector(String type); static final String DEFAULT_SELECTOR_TYPE_KEY; sta...
@Test public void testCreateEntities() { final EntityDefinition mockEntityDefinition = mock(EntityDefinition.class); when(mockEntityDefinition.getType()).thenReturn("TEST"); when(resourceHelper.getEntityDefinition(anyString())).thenReturn(mockEntityDefinition); @SuppressWarnings("unchecked") final SelectorQuery mockPla...
@Override public List<EntityBody> getEntities(final ApiQuery apiQuery, final String resourceName) { if (apiQuery == null) { throw new IllegalArgumentException("apiQuery"); } if (apiQuery.getSelector() == null) { throw new UnsupportedSelectorException("No selector to parse"); } final EntityDefinition typeDef = resourceH...
DefaultLogicalEntity implements LogicalEntity { @Override public List<EntityBody> getEntities(final ApiQuery apiQuery, final String resourceName) { if (apiQuery == null) { throw new IllegalArgumentException("apiQuery"); } if (apiQuery.getSelector() == null) { throw new UnsupportedSelectorException("No selector to parse...
DefaultLogicalEntity implements LogicalEntity { @Override public List<EntityBody> getEntities(final ApiQuery apiQuery, final String resourceName) { if (apiQuery == null) { throw new IllegalArgumentException("apiQuery"); } if (apiQuery.getSelector() == null) { throw new UnsupportedSelectorException("No selector to parse...
DefaultLogicalEntity implements LogicalEntity { @Override public List<EntityBody> getEntities(final ApiQuery apiQuery, final String resourceName) { if (apiQuery == null) { throw new IllegalArgumentException("apiQuery"); } if (apiQuery.getSelector() == null) { throw new UnsupportedSelectorException("No selector to parse...
DefaultLogicalEntity implements LogicalEntity { @Override public List<EntityBody> getEntities(final ApiQuery apiQuery, final String resourceName) { if (apiQuery == null) { throw new IllegalArgumentException("apiQuery"); } if (apiQuery.getSelector() == null) { throw new UnsupportedSelectorException("No selector to parse...
@Test public void testTranslate() throws Exception { List<Entity> learningObjectiveList = new ArrayList<Entity>(); Entity loEntity = mock(Entity.class); Map<String, Object> body = new HashMap<String, Object>(); body.put("parentLearningObjective", "456"); when(loEntity.getEntityId()).thenReturn("123"); when(loEntity.get...
public void translate(ContainerRequest request) { String uri = request.getPath(); List<PathSegment> segments = request.getPathSegments(); String version = PathConstants.V1; if (!segments.isEmpty()) { version = segments.get(0).getPath(); } for (Map.Entry<String, URITranslation> entry : uriTranslationMap.entrySet()) { St...
URITranslator { public void translate(ContainerRequest request) { String uri = request.getPath(); List<PathSegment> segments = request.getPathSegments(); String version = PathConstants.V1; if (!segments.isEmpty()) { version = segments.get(0).getPath(); } for (Map.Entry<String, URITranslation> entry : uriTranslationMap....
URITranslator { public void translate(ContainerRequest request) { String uri = request.getPath(); List<PathSegment> segments = request.getPathSegments(); String version = PathConstants.V1; if (!segments.isEmpty()) { version = segments.get(0).getPath(); } for (Map.Entry<String, URITranslation> entry : uriTranslationMap....
URITranslator { public void translate(ContainerRequest request) { String uri = request.getPath(); List<PathSegment> segments = request.getPathSegments(); String version = PathConstants.V1; if (!segments.isEmpty()) { version = segments.get(0).getPath(); } for (Map.Entry<String, URITranslation> entry : uriTranslationMap....
URITranslator { public void translate(ContainerRequest request) { String uri = request.getPath(); List<PathSegment> segments = request.getPathSegments(); String version = PathConstants.V1; if (!segments.isEmpty()) { version = segments.get(0).getPath(); } for (Map.Entry<String, URITranslation> entry : uriTranslationMap....
@Test public void testGetId() { EntityBody entityBody = new EntityBody(createTestMap()); List<String> list1 = entityBody.getValues("key1"); assertNotNull("List should not be null", list1); assertEquals("List should have 1 value", list1.size(), 1); assertEquals("List value should be original id", list1.get(0), "stringVa...
public List<String> getValues(String key) { List<String> valueList = new ArrayList<String>(); Object value = this.get(key); if (value instanceof String) { valueList.add((String) value); } else if (value instanceof List<?>) { for (Object subValues : (List<?>) value) { valueList.add(subValues.toString()); } } return valu...
EntityBody extends HashMap<String, Object> { public List<String> getValues(String key) { List<String> valueList = new ArrayList<String>(); Object value = this.get(key); if (value instanceof String) { valueList.add((String) value); } else if (value instanceof List<?>) { for (Object subValues : (List<?>) value) { valueLi...
EntityBody extends HashMap<String, Object> { public List<String> getValues(String key) { List<String> valueList = new ArrayList<String>(); Object value = this.get(key); if (value instanceof String) { valueList.add((String) value); } else if (value instanceof List<?>) { for (Object subValues : (List<?>) value) { valueLi...
EntityBody extends HashMap<String, Object> { public List<String> getValues(String key) { List<String> valueList = new ArrayList<String>(); Object value = this.get(key); if (value instanceof String) { valueList.add((String) value); } else if (value instanceof List<?>) { for (Object subValues : (List<?>) value) { valueLi...
EntityBody extends HashMap<String, Object> { public List<String> getValues(String key) { List<String> valueList = new ArrayList<String>(); Object value = this.get(key); if (value instanceof String) { valueList.add((String) value); } else if (value instanceof List<?>) { for (Object subValues : (List<?>) value) { valueLi...
@Test public void testEntityResponse() { Map<String, String> map = new HashMap<String, String>(); map.put("testkey", "testvalue"); EntityResponse response = new EntityResponse("testcollection", map); assertNotNull("Should not be null", response.getEntity()); Map<String, String> testMap = (Map<String, String>) response....
public EntityResponse(String entityCollectionName, Object object) { super(); setEntityCollectionName(entityCollectionName); put(this.entityCollectionName, object); }
EntityResponse extends HashMap<String, Object> { public EntityResponse(String entityCollectionName, Object object) { super(); setEntityCollectionName(entityCollectionName); put(this.entityCollectionName, object); } }
EntityResponse extends HashMap<String, Object> { public EntityResponse(String entityCollectionName, Object object) { super(); setEntityCollectionName(entityCollectionName); put(this.entityCollectionName, object); } EntityResponse(String entityCollectionName, Object object); }
EntityResponse extends HashMap<String, Object> { public EntityResponse(String entityCollectionName, Object object) { super(); setEntityCollectionName(entityCollectionName); put(this.entityCollectionName, object); } EntityResponse(String entityCollectionName, Object object); Object getEntity(); final void setEntityColle...
EntityResponse extends HashMap<String, Object> { public EntityResponse(String entityCollectionName, Object object) { super(); setEntityCollectionName(entityCollectionName); put(this.entityCollectionName, object); } EntityResponse(String entityCollectionName, Object object); Object getEntity(); final void setEntityColle...
@Test public void testEntityResponseNullCollectionName() { EntityResponse response = new EntityResponse(null, new HashMap<String, String>()); assertNotNull("Should not be null", response.getEntity()); }
public Object getEntity() { return this.get(entityCollectionName); }
EntityResponse extends HashMap<String, Object> { public Object getEntity() { return this.get(entityCollectionName); } }
EntityResponse extends HashMap<String, Object> { public Object getEntity() { return this.get(entityCollectionName); } EntityResponse(String entityCollectionName, Object object); }
EntityResponse extends HashMap<String, Object> { public Object getEntity() { return this.get(entityCollectionName); } EntityResponse(String entityCollectionName, Object object); Object getEntity(); final void setEntityCollectionName(String entityCollectionName); String getEntityCollectionName(); }
EntityResponse extends HashMap<String, Object> { public Object getEntity() { return this.get(entityCollectionName); } EntityResponse(String entityCollectionName, Object object); Object getEntity(); final void setEntityCollectionName(String entityCollectionName); String getEntityCollectionName(); }
@Test public void testConvertTenantIdToDbName() { Assert.assertEquals("7be07aaf460d593a323d0db33da05b64bfdcb3a5", TenantIdToDbName.convertTenantIdToDbName("ABCDE")); Assert.assertEquals("782a35eb5b9cd3e771047a60381e1274d76bc069", TenantIdToDbName.convertTenantIdToDbName("ABC.DE")); Assert.assertEquals("1072a2a56f166543...
public static String convertTenantIdToDbName(String tenantId) { if (tenantId != null) { return TENANT_ID_CACHE.getUnchecked(tenantId); } else { return tenantId; } }
TenantIdToDbName { public static String convertTenantIdToDbName(String tenantId) { if (tenantId != null) { return TENANT_ID_CACHE.getUnchecked(tenantId); } else { return tenantId; } } }
TenantIdToDbName { public static String convertTenantIdToDbName(String tenantId) { if (tenantId != null) { return TENANT_ID_CACHE.getUnchecked(tenantId); } else { return tenantId; } } }
TenantIdToDbName { public static String convertTenantIdToDbName(String tenantId) { if (tenantId != null) { return TENANT_ID_CACHE.getUnchecked(tenantId); } else { return tenantId; } } static String convertTenantIdToDbName(String tenantId); }
TenantIdToDbName { public static String convertTenantIdToDbName(String tenantId) { if (tenantId != null) { return TENANT_ID_CACHE.getUnchecked(tenantId); } else { return tenantId; } } static String convertTenantIdToDbName(String tenantId); }
@Test public void testIsFieldExpired() { Map<String, Object> body = generateEntityBody(); Assert.assertTrue(dateHelper.isFieldExpired(body, "endDate", false)); body.put("exitWithdrawDate", "2070-10-25"); Assert.assertFalse(dateHelper.isFieldExpired(body, "exitWithdrawDate", false)); }
public boolean isFieldExpired(Map<String, Object> body) { for (String key : Arrays.asList("endDate", "exitWithdrawDate")) { if (body.containsKey(key)) { return isFieldExpired(body, key, false); } } return false; }
DateHelper { public boolean isFieldExpired(Map<String, Object> body) { for (String key : Arrays.asList("endDate", "exitWithdrawDate")) { if (body.containsKey(key)) { return isFieldExpired(body, key, false); } } return false; } }
DateHelper { public boolean isFieldExpired(Map<String, Object> body) { for (String key : Arrays.asList("endDate", "exitWithdrawDate")) { if (body.containsKey(key)) { return isFieldExpired(body, key, false); } } return false; } }
DateHelper { public boolean isFieldExpired(Map<String, Object> body) { for (String key : Arrays.asList("endDate", "exitWithdrawDate")) { if (body.containsKey(key)) { return isFieldExpired(body, key, false); } } return false; } String getFilterDate(boolean useGracePeriod); DateTime getNowMinusGracePeriod(); boolean isF...
DateHelper { public boolean isFieldExpired(Map<String, Object> body) { for (String key : Arrays.asList("endDate", "exitWithdrawDate")) { if (body.containsKey(key)) { return isFieldExpired(body, key, false); } } return false; } String getFilterDate(boolean useGracePeriod); DateTime getNowMinusGracePeriod(); boolean isF...
@Test public void testGetDate() { Map<String, Object> body = generateEntityBody(); DateTime result = dateHelper.getDate(body, "endDate"); Assert.assertEquals(2010, result.getYear()); Assert.assertEquals(07, result.getMonthOfYear()); Assert.assertEquals(10, result.getDayOfMonth()); result = dateHelper.getDate(body, "exp...
public DateTime getDate(Map<String, Object> body, String fieldName) { DateTime date = null; if (body.get(fieldName) != null) { date = DateTime.parse((String) body.get(fieldName), FMT); } return date; }
DateHelper { public DateTime getDate(Map<String, Object> body, String fieldName) { DateTime date = null; if (body.get(fieldName) != null) { date = DateTime.parse((String) body.get(fieldName), FMT); } return date; } }
DateHelper { public DateTime getDate(Map<String, Object> body, String fieldName) { DateTime date = null; if (body.get(fieldName) != null) { date = DateTime.parse((String) body.get(fieldName), FMT); } return date; } }
DateHelper { public DateTime getDate(Map<String, Object> body, String fieldName) { DateTime date = null; if (body.get(fieldName) != null) { date = DateTime.parse((String) body.get(fieldName), FMT); } return date; } String getFilterDate(boolean useGracePeriod); DateTime getNowMinusGracePeriod(); boolean isFieldExpired(...
DateHelper { public DateTime getDate(Map<String, Object> body, String fieldName) { DateTime date = null; if (body.get(fieldName) != null) { date = DateTime.parse((String) body.get(fieldName), FMT); } return date; } String getFilterDate(boolean useGracePeriod); DateTime getNowMinusGracePeriod(); boolean isFieldExpired(...
@SuppressWarnings("deprecation") @Test public void testCreateAssessmentEntity() { EntityConfigFactory entityConfigurations = new EntityConfigFactory(); MongoEntityRepository mockedEntityRepository = mock(MongoEntityRepository.class); NeutralRecord assessmentRC = createAssessmentNeutralRecord(true); entityConfigurations...
@Override public List<List<SimpleEntity>> handle(List<NeutralRecord> items, AbstractMessageReport report, ReportStats reportStats) { return null; }
SmooksEdFi2SLITransformer extends EdFi2SLITransformer { @Override public List<List<SimpleEntity>> handle(List<NeutralRecord> items, AbstractMessageReport report, ReportStats reportStats) { return null; } }
SmooksEdFi2SLITransformer extends EdFi2SLITransformer { @Override public List<List<SimpleEntity>> handle(List<NeutralRecord> items, AbstractMessageReport report, ReportStats reportStats) { return null; } }
SmooksEdFi2SLITransformer extends EdFi2SLITransformer { @Override public List<List<SimpleEntity>> handle(List<NeutralRecord> items, AbstractMessageReport report, ReportStats reportStats) { return null; } @Override List<SimpleEntity> transform(NeutralRecord item, AbstractMessageReport report, ReportStats reportStats); ...
SmooksEdFi2SLITransformer extends EdFi2SLITransformer { @Override public List<List<SimpleEntity>> handle(List<NeutralRecord> items, AbstractMessageReport report, ReportStats reportStats) { return null; } @Override List<SimpleEntity> transform(NeutralRecord item, AbstractMessageReport report, ReportStats reportStats); ...
@Test public void testStripFields() { Map<String, Object> body = new HashMap<String, Object>(); body.put("f1", "v1"); EntityManipulator.removeFields(body, "f1"); assertTrue(body.get("f1") == null); }
public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
@Test public void testWrongExclude() { Map<String, Object> body = new HashMap<String, Object>(); body.put("f1", "v1"); EntityManipulator.removeFields(body, "foobar"); assertTrue(body.get("f1") != null); }
public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
@Test public void testMultipleExclude() { Map<String, Object> body = new HashMap<String, Object>(); body.put("f1", "v1"); body.put("f2", "v2"); body.put("f3", "v3"); List<String> toStrip = Arrays.asList("f1", "f2"); EntityManipulator.removeFields(body, toStrip); assertTrue(body.get("f1") == null); assertTrue(body.get("...
public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
@Test public void testStripMap() { Map<String, Object> body = new HashMap<String, Object>(); Map<String, Object> embeddedMap = new HashMap<String, Object>(); embeddedMap.put("ef1", "ev1"); embeddedMap.put("ef2", "ev2"); body.put("f1", embeddedMap); EntityManipulator.removeFields(body, "f1.ef1"); @SuppressWarnings("unch...
public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
@SuppressWarnings("unchecked") @Test public void testStripList() { Map<String, Object> body = new HashMap<String, Object>(); List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); Map<String, Object> em1 = new HashMap<String, Object>(); em1.put("ek1", "ev1"); em1.put("ek2", "ev2"); Map<String, Object...
public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } }
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
EntityManipulator { public static void removeFields(final Map<String, Object> toRemoveFrom, final List<String> toRemoveList) { if (toRemoveList == null || toRemoveList.isEmpty()) { return; } if (toRemoveFrom == null) { return; } for (final String toStrip : toRemoveList) { removeField(toRemoveFrom, toStrip); } } private...
@Test public void testDeterministicUUID() { String resultUuid = "someId"; Mockito.when(mockShardType1UUIDGeneratorStrategy.generateId()).thenReturn(resultUuid); String uuid = deterministicUUIDGeneratorStrategy.generateId(); assertNotNull(uuid); assertEquals(resultUuid, uuid); }
@Override public String generateId() { return uuidStrategy.generateId(); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); static final String DIGEST_ALGORITHM; }
@Test public void shouldHaveSuffix() { String expectedSuffix = "_id"; Map<String, String> hashMap = new HashMap<String, String>(); hashMap.put("key1", "value1"); NaturalKeyDescriptor naturalKeyDescriptor = new NaturalKeyDescriptor(); naturalKeyDescriptor.setNaturalKeys(hashMap); naturalKeyDescriptor.setEntityType("test...
@Override public String generateId() { return uuidStrategy.generateId(); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); static final String DIGEST_ALGORITHM; }
@Test public void testDeterministicUUIDMapOfStringString() { Map<String, String> hashMap = new HashMap<String, String>(); hashMap.put("key1", "value1"); hashMap.put("key2", "value2"); hashMap.put("key3", "value3"); NaturalKeyDescriptor naturalKeyDescriptor = new NaturalKeyDescriptor(); naturalKeyDescriptor.setNaturalKe...
@Override public String generateId() { return uuidStrategy.generateId(); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); static final String DIGEST_ALGORITHM; }
@Test public void testNullNaturalKeyDescriptor() { String resultUuid = "someId"; Mockito.when(mockShardType1UUIDGeneratorStrategy.generateId()).thenReturn(resultUuid); String uuid = deterministicUUIDGeneratorStrategy.generateId(null); assertNotNull(uuid); assertEquals(resultUuid, uuid); }
@Override public String generateId() { return uuidStrategy.generateId(); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); static final String DIGEST_ALGORITHM; }
@Test public void testGenerateUuid() { byte[] testBytes = "abcdefghij1234567890".getBytes(); UUID uuid = DeterministicUUIDGeneratorStrategy.generateUuid(testBytes); assertNotNull("uuid must not be null", uuid); assertEquals("61626364-6566-6768-696a-313233343536", uuid.toString()); }
protected static UUID generateUuid(byte[] data) { ByteBuffer byteBuffer = ByteBuffer.wrap(data); long msb = byteBuffer.getLong(0); long lsb = byteBuffer.getLong(8); UUID uuid = new UUID(msb, lsb); return uuid; }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { protected static UUID generateUuid(byte[] data) { ByteBuffer byteBuffer = ByteBuffer.wrap(data); long msb = byteBuffer.getLong(0); long lsb = byteBuffer.getLong(8); UUID uuid = new UUID(msb, lsb); return uuid; } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { protected static UUID generateUuid(byte[] data) { ByteBuffer byteBuffer = ByteBuffer.wrap(data); long msb = byteBuffer.getLong(0); long lsb = byteBuffer.getLong(8); UUID uuid = new UUID(msb, lsb); return uuid; } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { protected static UUID generateUuid(byte[] data) { ByteBuffer byteBuffer = ByteBuffer.wrap(data); long msb = byteBuffer.getLong(0); long lsb = byteBuffer.getLong(8); UUID uuid = new UUID(msb, lsb); return uuid; } @Override String generateId(); @Overr...
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { protected static UUID generateUuid(byte[] data) { ByteBuffer byteBuffer = ByteBuffer.wrap(data); long msb = byteBuffer.getLong(0); long lsb = byteBuffer.getLong(8); UUID uuid = new UUID(msb, lsb); return uuid; } @Override String generateId(); @Overr...
@Test public void testCreateStudentEntity() { MongoEntityRepository entityRepository = mock(MongoEntityRepository.class); NeutralQuery query = new NeutralQuery(); query.addCriteria(new NeutralCriteria(METADATA_BLOCK + "." + REGION_ID_FIELD, NeutralCriteria.OPERATOR_EQUAL, REGION_ID, false)); query.addCriteria(new Neutr...
public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; }
EntityPersistHandler extends AbstractIngestionHandler<SimpleEntity, Entity> implements InitializingBean { public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; } }
EntityPersistHandler extends AbstractIngestionHandler<SimpleEntity, Entity> implements InitializingBean { public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; } }
EntityPersistHandler extends AbstractIngestionHandler<SimpleEntity, Entity> implements InitializingBean { public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; } @Override void afterPropertiesSet(); void setEntityRepository(Repository<Entity> entityRepository)...
EntityPersistHandler extends AbstractIngestionHandler<SimpleEntity, Entity> implements InitializingBean { public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; } @Override void afterPropertiesSet(); void setEntityRepository(Repository<Entity> entityRepository)...
@Test public void testDeterministicUUIDMapOfStringString2() { Map<String, String> hashMap = new HashMap<String, String>(); hashMap.put("key1", "value1"); hashMap.put("key2", "value2"); hashMap.put("key3", "value3"); NaturalKeyDescriptor naturalKeyDescriptor = new NaturalKeyDescriptor(); naturalKeyDescriptor.setNaturalK...
@Override public String generateId() { return uuidStrategy.generateId(); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); static final String DIGEST_ALGORITHM; }
@Test public void testWithBothDelimiters() { Map<String, String> hashMap = new HashMap<String, String>(); hashMap.put("key1", "value1"); NaturalKeyDescriptor naturalKeyDescriptor = new NaturalKeyDescriptor(); naturalKeyDescriptor.setNaturalKeys(hashMap); naturalKeyDescriptor.setEntityType("entity|~"); naturalKeyDescrip...
@Override public String generateId() { return uuidStrategy.generateId(); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); static final String DIGEST_ALGORITHM; }
@Test public void testWithSecondDelimiter() { Map<String, String> hashMap = new HashMap<String, String>(); hashMap.put("key1", "value1"); NaturalKeyDescriptor naturalKeyDescriptor = new NaturalKeyDescriptor(); naturalKeyDescriptor.setNaturalKeys(hashMap); naturalKeyDescriptor.setEntityType("entity~"); naturalKeyDescrip...
@Override public String generateId() { return uuidStrategy.generateId(); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); }
DeterministicUUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { return uuidStrategy.generateId(); } @Override String generateId(); @Override String generateId(NaturalKeyDescriptor naturalKeyDescriptor); static final String DIGEST_ALGORITHM; }
@Test public void testShardType1UUIDGenerator() { ShardType1UUIDGeneratorStrategy uuidGen = new ShardType1UUIDGeneratorStrategy(); String uuid = uuidGen.generateId(); assertNotNull(uuid); assertEquals('1', uuid.charAt(22)); assertEquals(43, uuid.length()); }
@Override public String generateId() { StringBuilder builder = new StringBuilder(); char c1 = (char) (r.nextInt(26) + 'a'); char c2 = (char) (r.nextInt(26) + 'a'); builder.append(new DateTime().getYear()); builder.append(c1); builder.append(c2); builder.append("-"); builder.append(generator.generate().toString()); Stri...
ShardType1UUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { StringBuilder builder = new StringBuilder(); char c1 = (char) (r.nextInt(26) + 'a'); char c2 = (char) (r.nextInt(26) + 'a'); builder.append(new DateTime().getYear()); builder.append(c1); builder.append(c2); builder...
ShardType1UUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { StringBuilder builder = new StringBuilder(); char c1 = (char) (r.nextInt(26) + 'a'); char c2 = (char) (r.nextInt(26) + 'a'); builder.append(new DateTime().getYear()); builder.append(c1); builder.append(c2); builder...
ShardType1UUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { StringBuilder builder = new StringBuilder(); char c1 = (char) (r.nextInt(26) + 'a'); char c2 = (char) (r.nextInt(26) + 'a'); builder.append(new DateTime().getYear()); builder.append(c1); builder.append(c2); builder...
ShardType1UUIDGeneratorStrategy implements UUIDGeneratorStrategy { @Override public String generateId() { StringBuilder builder = new StringBuilder(); char c1 = (char) (r.nextInt(26) + 'a'); char c2 = (char) (r.nextInt(26) + 'a'); builder.append(new DateTime().getYear()); builder.append(c1); builder.append(c2); builder...
@Test public void testGetUser() { User slcoperator = ldapService.getUser("LocalNew", "slcoperator"); assertNotNull(slcoperator); assertTrue(slcoperator.getGroups().contains("SLC Operator")); assertTrue(slcoperator.getEmail().equals("[email protected]")); assertTrue(slcoperator.getUid().equals("slcoperator")); asse...
@SuppressWarnings("rawtypes") @Override public User getUser(String realm, String uid) { AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, userObjectClass)).and(new EqualsFilter(userSearchAttribute, uid)); DistinguishedName dn = new DistinguishedName("ou=" + realm); User user; try { List userL...
LdapServiceImpl implements LdapService { @SuppressWarnings("rawtypes") @Override public User getUser(String realm, String uid) { AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, userObjectClass)).and(new EqualsFilter(userSearchAttribute, uid)); DistinguishedName dn = new DistinguishedName("o...
LdapServiceImpl implements LdapService { @SuppressWarnings("rawtypes") @Override public User getUser(String realm, String uid) { AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, userObjectClass)).and(new EqualsFilter(userSearchAttribute, uid)); DistinguishedName dn = new DistinguishedName("o...
LdapServiceImpl implements LdapService { @SuppressWarnings("rawtypes") @Override public User getUser(String realm, String uid) { AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, userObjectClass)).and(new EqualsFilter(userSearchAttribute, uid)); DistinguishedName dn = new DistinguishedName("o...
LdapServiceImpl implements LdapService { @SuppressWarnings("rawtypes") @Override public User getUser(String realm, String uid) { AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, userObjectClass)).and(new EqualsFilter(userSearchAttribute, uid)); DistinguishedName dn = new DistinguishedName("o...
@Test public void testGetGroup() { Group slcoperatorGroup = ldapService.getGroup("LocalNew", "SLC Operator"); assertNotNull(slcoperatorGroup); assertEquals("SLC Operator", slcoperatorGroup.getGroupName()); assertTrue(slcoperatorGroup.getMemberUids().contains("slcoperator")); }
@Override public Group getGroup(String realm, String groupName) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new EqualsFilter("cn", groupName)); try { return (Group) ldapTemplate.searchForObject(dn, fil...
LdapServiceImpl implements LdapService { @Override public Group getGroup(String realm, String groupName) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new EqualsFilter("cn", groupName)); try { return (Gr...
LdapServiceImpl implements LdapService { @Override public Group getGroup(String realm, String groupName) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new EqualsFilter("cn", groupName)); try { return (Gr...
LdapServiceImpl implements LdapService { @Override public Group getGroup(String realm, String groupName) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new EqualsFilter("cn", groupName)); try { return (Gr...
LdapServiceImpl implements LdapService { @Override public Group getGroup(String realm, String groupName) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new EqualsFilter("cn", groupName)); try { return (Gr...
@Test public void testGetUserGroups() { Collection<Group> groups = ldapService.getUserGroups("LocalNew", "slcoperator"); assertNotNull(groups); Collection<String> groupNames = new ArrayList<String>(); for (Group group : groups) { groupNames.add(group.getGroupName()); } assertTrue(groupNames.contains("SLC Operator")); }
@SuppressWarnings("unchecked") @Override public Collection<Group> getUserGroups(String realm, String uid) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new EqualsFilter(groupSearchAttribute, uid)); List<...
LdapServiceImpl implements LdapService { @SuppressWarnings("unchecked") @Override public Collection<Group> getUserGroups(String realm, String uid) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new Equals...
LdapServiceImpl implements LdapService { @SuppressWarnings("unchecked") @Override public Collection<Group> getUserGroups(String realm, String uid) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new Equals...
LdapServiceImpl implements LdapService { @SuppressWarnings("unchecked") @Override public Collection<Group> getUserGroups(String realm, String uid) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new Equals...
LdapServiceImpl implements LdapService { @SuppressWarnings("unchecked") @Override public Collection<Group> getUserGroups(String realm, String uid) { DistinguishedName dn = new DistinguishedName("ou=" + realm); AndFilter filter = new AndFilter(); filter.and(new EqualsFilter(OBJECTCLASS, groupObjectClass)).and(new Equals...
@Test public void testFindUserByGroups() { String[] groups = new String[] { "SEA Administrator" }; Collection<User> users = ldapService.findUsersByGroups("LocalNew", Arrays.asList(groups)); assertNotNull(users); }
@Override public Collection<User> findUsersByGroups(String realm, final Collection<String> allowedGroupNames, final Collection<String> disallowedGroupNames, String tenant, Collection<String> edorgs) { Collection<String> allowed = allowedGroupNames; Collection<String> disallowed = disallowedGroupNames; if (allowed == nu...
LdapServiceImpl implements LdapService { @Override public Collection<User> findUsersByGroups(String realm, final Collection<String> allowedGroupNames, final Collection<String> disallowedGroupNames, String tenant, Collection<String> edorgs) { Collection<String> allowed = allowedGroupNames; Collection<String> disallowed ...
LdapServiceImpl implements LdapService { @Override public Collection<User> findUsersByGroups(String realm, final Collection<String> allowedGroupNames, final Collection<String> disallowedGroupNames, String tenant, Collection<String> edorgs) { Collection<String> allowed = allowedGroupNames; Collection<String> disallowed ...
LdapServiceImpl implements LdapService { @Override public Collection<User> findUsersByGroups(String realm, final Collection<String> allowedGroupNames, final Collection<String> disallowedGroupNames, String tenant, Collection<String> edorgs) { Collection<String> allowed = allowedGroupNames; Collection<String> disallowed ...
LdapServiceImpl implements LdapService { @Override public Collection<User> findUsersByGroups(String realm, final Collection<String> allowedGroupNames, final Collection<String> disallowedGroupNames, String tenant, Collection<String> edorgs) { Collection<String> allowed = allowedGroupNames; Collection<String> disallowed ...
@Test public void testNaturalKeyDescriptor() { NaturalKeyDescriptor naturalKeyDescriptor = new NaturalKeyDescriptor(); Map<String, String> naturalKeys = naturalKeyDescriptor.getNaturalKeys(); assertNotNull("naturalKeys is not null", naturalKeys); assertEquals("naturalKeys has 0 natural keys", 0, naturalKeys.size()); as...
public NaturalKeyDescriptor() { this(null, null, null, null); }
NaturalKeyDescriptor { public NaturalKeyDescriptor() { this(null, null, null, null); } }
NaturalKeyDescriptor { public NaturalKeyDescriptor() { this(null, null, null, null); } NaturalKeyDescriptor(); NaturalKeyDescriptor(Map<String, String> naturalKeys); NaturalKeyDescriptor(Map<String, String> naturalKeys, String tenantId, String entityType, String parentId); }
NaturalKeyDescriptor { public NaturalKeyDescriptor() { this(null, null, null, null); } NaturalKeyDescriptor(); NaturalKeyDescriptor(Map<String, String> naturalKeys); NaturalKeyDescriptor(Map<String, String> naturalKeys, String tenantId, String entityType, String parentId); @Override boolean equals(Object o); @Overrid...
NaturalKeyDescriptor { public NaturalKeyDescriptor() { this(null, null, null, null); } NaturalKeyDescriptor(); NaturalKeyDescriptor(Map<String, String> naturalKeys); NaturalKeyDescriptor(Map<String, String> naturalKeys, String tenantId, String entityType, String parentId); @Override boolean equals(Object o); @Overrid...
@Test public void hashCodeShouldMatchExpected() { Map<String, String> naturalKeysForConstructor = new HashMap<String, String>(); naturalKeysForConstructor.put("key1", "value1"); naturalKeysForConstructor.put("key2", "value2"); String testTenantId = "testTenantId"; String testEntityType = "testEntityType"; NaturalKeyDes...
@Override public int hashCode() { int result = 42; if (this.getNaturalKeys() != null) { result = 37 * result + this.getNaturalKeys().hashCode(); } if (this.getTenantId() != null) { result = 37 * result + this.getTenantId().hashCode(); } if (this.getEntityType() != null) { result = 37 * result + this.getEntityType().has...
NaturalKeyDescriptor { @Override public int hashCode() { int result = 42; if (this.getNaturalKeys() != null) { result = 37 * result + this.getNaturalKeys().hashCode(); } if (this.getTenantId() != null) { result = 37 * result + this.getTenantId().hashCode(); } if (this.getEntityType() != null) { result = 37 * result + t...
NaturalKeyDescriptor { @Override public int hashCode() { int result = 42; if (this.getNaturalKeys() != null) { result = 37 * result + this.getNaturalKeys().hashCode(); } if (this.getTenantId() != null) { result = 37 * result + this.getTenantId().hashCode(); } if (this.getEntityType() != null) { result = 37 * result + t...
NaturalKeyDescriptor { @Override public int hashCode() { int result = 42; if (this.getNaturalKeys() != null) { result = 37 * result + this.getNaturalKeys().hashCode(); } if (this.getTenantId() != null) { result = 37 * result + this.getTenantId().hashCode(); } if (this.getEntityType() != null) { result = 37 * result + t...
NaturalKeyDescriptor { @Override public int hashCode() { int result = 42; if (this.getNaturalKeys() != null) { result = 37 * result + this.getNaturalKeys().hashCode(); } if (this.getTenantId() != null) { result = 37 * result + this.getTenantId().hashCode(); } if (this.getEntityType() != null) { result = 37 * result + t...
@Test public void testCreateAndDeleteStudentEntity() { MongoEntityRepository entityRepository = mock(MongoEntityRepository.class); NeutralQuery query = new NeutralQuery(); query.addCriteria(new NeutralCriteria(METADATA_BLOCK + "." + REGION_ID_FIELD, NeutralCriteria.OPERATOR_EQUAL, REGION_ID, false)); query.addCriteria(...
public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; }
EntityPersistHandler extends AbstractIngestionHandler<SimpleEntity, Entity> implements InitializingBean { public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; } }
EntityPersistHandler extends AbstractIngestionHandler<SimpleEntity, Entity> implements InitializingBean { public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; } }
EntityPersistHandler extends AbstractIngestionHandler<SimpleEntity, Entity> implements InitializingBean { public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; } @Override void afterPropertiesSet(); void setEntityRepository(Repository<Entity> entityRepository)...
EntityPersistHandler extends AbstractIngestionHandler<SimpleEntity, Entity> implements InitializingBean { public void setEntityRepository(Repository<Entity> entityRepository) { this.entityRepository = entityRepository; } @Override void afterPropertiesSet(); void setEntityRepository(Repository<Entity> entityRepository)...
@Test public void testGetContainerDocument() { final Map<String, ContainerDocument> testContainer = createContainerMap(); testHolder = new ContainerDocumentHolder(testContainer); assertEquals(testContainer.get("test"), testHolder.getContainerDocument("test")); }
public ContainerDocument getContainerDocument(final String entityName) { return containerDocumentMap.get(entityName); }
ContainerDocumentHolder { public ContainerDocument getContainerDocument(final String entityName) { return containerDocumentMap.get(entityName); } }
ContainerDocumentHolder { public ContainerDocument getContainerDocument(final String entityName) { return containerDocumentMap.get(entityName); } ContainerDocumentHolder(); ContainerDocumentHolder(final Map<String, ContainerDocument> containerDocumentMap); }
ContainerDocumentHolder { public ContainerDocument getContainerDocument(final String entityName) { return containerDocumentMap.get(entityName); } ContainerDocumentHolder(); ContainerDocumentHolder(final Map<String, ContainerDocument> containerDocumentMap); ContainerDocument getContainerDocument(final String entityName...
ContainerDocumentHolder { public ContainerDocument getContainerDocument(final String entityName) { return containerDocumentMap.get(entityName); } ContainerDocumentHolder(); ContainerDocumentHolder(final Map<String, ContainerDocument> containerDocumentMap); ContainerDocument getContainerDocument(final String entityName...
@Test public void testIsContainerDocument() { final Map<String, ContainerDocument> testContainer = createContainerMap(); testHolder = new ContainerDocumentHolder(testContainer); assertFalse(testHolder.isContainerDocument("foo")); assertTrue(testHolder.isContainerDocument("test")); }
public boolean isContainerDocument(final String entityName) { return containerDocumentMap.containsKey(entityName); }
ContainerDocumentHolder { public boolean isContainerDocument(final String entityName) { return containerDocumentMap.containsKey(entityName); } }
ContainerDocumentHolder { public boolean isContainerDocument(final String entityName) { return containerDocumentMap.containsKey(entityName); } ContainerDocumentHolder(); ContainerDocumentHolder(final Map<String, ContainerDocument> containerDocumentMap); }
ContainerDocumentHolder { public boolean isContainerDocument(final String entityName) { return containerDocumentMap.containsKey(entityName); } ContainerDocumentHolder(); ContainerDocumentHolder(final Map<String, ContainerDocument> containerDocumentMap); ContainerDocument getContainerDocument(final String entityName); ...
ContainerDocumentHolder { public boolean isContainerDocument(final String entityName) { return containerDocumentMap.containsKey(entityName); } ContainerDocumentHolder(); ContainerDocumentHolder(final Map<String, ContainerDocument> containerDocumentMap); ContainerDocument getContainerDocument(final String entityName); ...
@Ignore @Test public void signSamlArtifactResolve() throws JDOMException, TransformerException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyException, MarshalException, XMLSignatureException, KeyStoreException, CertificateException { Document unsignedDocument = getDocument("artifact-resolve-unsigne...
public Document signSamlAssertion(Document document) throws TransformerException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyException, MarshalException, XMLSignatureException { if (document != null) { PrivateKeyEntry entry = getPrivateKeyEntryFromKeystore(); PrivateKey privateKey = entry.getPriva...
XmlSignatureHelper { public Document signSamlAssertion(Document document) throws TransformerException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyException, MarshalException, XMLSignatureException { if (document != null) { PrivateKeyEntry entry = getPrivateKeyEntryFromKeystore(); PrivateKey privat...
XmlSignatureHelper { public Document signSamlAssertion(Document document) throws TransformerException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyException, MarshalException, XMLSignatureException { if (document != null) { PrivateKeyEntry entry = getPrivateKeyEntryFromKeystore(); PrivateKey privat...
XmlSignatureHelper { public Document signSamlAssertion(Document document) throws TransformerException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyException, MarshalException, XMLSignatureException { if (document != null) { PrivateKeyEntry entry = getPrivateKeyEntryFromKeystore(); PrivateKey privat...
XmlSignatureHelper { public Document signSamlAssertion(Document document) throws TransformerException, NoSuchAlgorithmException, InvalidAlgorithmParameterException, KeyException, MarshalException, XMLSignatureException { if (document != null) { PrivateKeyEntry entry = getPrivateKeyEntryFromKeystore(); PrivateKey privat...
@Test public void testIsSignatureValidWithValid() throws Exception { Document doc = getDocument("complete-valid2.xml"); Assert.assertTrue(validator.isSignatureValid(doc)); }
@Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't validate signature", e); } return false; ...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("...
@Test public void testIsSignatureValidWithInvalid() throws Exception { Document doc = getDocument("complete-invalid.xml"); Assert.assertTrue(!validator.isSignatureValid(doc)); }
@Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't validate signature", e); } return false; ...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isSignatureValid(Document samlDocument) { try { return getSignature(samlDocument).getSignatureValue().validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate signature", e); } catch (XMLSignatureException e) { LOG.warn("...
@Test public void testValidatingAValidDocument() throws Exception { Document doc = getDocument("complete-valid2.xml"); Assert.assertTrue(validator.isDocumentValid(doc)); }
@Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML Signature from Document", e); } return false; }
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML S...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML S...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML S...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML S...
@Test public void testValidatingAnInvalidDocument() throws Exception { Document doc = getDocument("complete-invalid.xml"); Assert.assertTrue(!validator.isDocumentValid(doc)); }
@Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML Signature from Document", e); } return false; }
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML S...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML S...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML S...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentValid(Document samlDocument) { try { return getSignature(samlDocument).validate(valContext); } catch (MarshalException e) { LOG.warn("Couldn't validate Document", e); } catch (XMLSignatureException e) { LOG.warn("Couldn't extract XML S...
@Test public void testIsUntrustedAssertionTrusted() throws Exception { Document doc = getDocument("adfs-invalid.xml"); Assert.assertTrue(!validator.isDocumentTrusted(doc, "CN=*.slidev.org,OU=Domain Control Validated,O=*.slidev.org")); }
@Override public boolean isDocumentTrusted(Document samlDocument, String issuer) throws KeyStoreException, InvalidAlgorithmParameterException, CertificateException, NoSuchAlgorithmException, MarshalException { return isSignatureTrusted(getSignature(samlDocument), issuer); }
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentTrusted(Document samlDocument, String issuer) throws KeyStoreException, InvalidAlgorithmParameterException, CertificateException, NoSuchAlgorithmException, MarshalException { return isSignatureTrusted(getSignature(samlDocument), issuer...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentTrusted(Document samlDocument, String issuer) throws KeyStoreException, InvalidAlgorithmParameterException, CertificateException, NoSuchAlgorithmException, MarshalException { return isSignatureTrusted(getSignature(samlDocument), issuer...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentTrusted(Document samlDocument, String issuer) throws KeyStoreException, InvalidAlgorithmParameterException, CertificateException, NoSuchAlgorithmException, MarshalException { return isSignatureTrusted(getSignature(samlDocument), issuer...
DefaultSAML2Validator implements SAML2Validator { @Override public boolean isDocumentTrusted(Document samlDocument, String issuer) throws KeyStoreException, InvalidAlgorithmParameterException, CertificateException, NoSuchAlgorithmException, MarshalException { return isSignatureTrusted(getSignature(samlDocument), issuer...
@Test public void testInitMigration() { initMockMigration(); Mockito.verify(mongoTemplate, Mockito.times(1)).updateFirst(Mockito.any(Query.class), Mockito.any(Update.class), Mockito.any(String.class)); Mockito.verify(mongoTemplate, Mockito.times(1)).insert(Mockito.any(Object.class), Mockito.any(String.class)); }
@PostConstruct public void initMigration() { this.detectMigrations(); this.migrationStrategyMap = this.buildMigrationStrategyMap(); this.warnForEachMissingMigrationStrategyList(); }
SliSchemaVersionValidator { @PostConstruct public void initMigration() { this.detectMigrations(); this.migrationStrategyMap = this.buildMigrationStrategyMap(); this.warnForEachMissingMigrationStrategyList(); } }
SliSchemaVersionValidator { @PostConstruct public void initMigration() { this.detectMigrations(); this.migrationStrategyMap = this.buildMigrationStrategyMap(); this.warnForEachMissingMigrationStrategyList(); } }
SliSchemaVersionValidator { @PostConstruct public void initMigration() { this.detectMigrations(); this.migrationStrategyMap = this.buildMigrationStrategyMap(); this.warnForEachMissingMigrationStrategyList(); } void insertVersionInformation(Entity entity); @PostConstruct void initMigration(); Entity migrate(String coll...
SliSchemaVersionValidator { @PostConstruct public void initMigration() { this.detectMigrations(); this.migrationStrategyMap = this.buildMigrationStrategyMap(); this.warnForEachMissingMigrationStrategyList(); } void insertVersionInformation(Entity entity); @PostConstruct void initMigration(); Entity migrate(String coll...
@Test public void testIsMigrationNeeded() { String entityType = "student"; Entity entity = new MongoEntity("student", new HashMap<String, Object>()); initMockMigration(); assertTrue("Should be true", sliSchemaVersionValidator.isMigrationNeeded(entityType, entity)); Map<String, Object> metaData = new HashMap<String, Obj...
protected boolean isMigrationNeeded(String entityType, Entity entity) { if (this.entityTypesBeingMigrated.containsKey(entityType)) { int entityVersionNumber = this.getEntityVersionNumber(entity); int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); if (entityVersionNumber < newVersionNumber) { return t...
SliSchemaVersionValidator { protected boolean isMigrationNeeded(String entityType, Entity entity) { if (this.entityTypesBeingMigrated.containsKey(entityType)) { int entityVersionNumber = this.getEntityVersionNumber(entity); int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); if (entityVersionNumber < ...
SliSchemaVersionValidator { protected boolean isMigrationNeeded(String entityType, Entity entity) { if (this.entityTypesBeingMigrated.containsKey(entityType)) { int entityVersionNumber = this.getEntityVersionNumber(entity); int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); if (entityVersionNumber < ...
SliSchemaVersionValidator { protected boolean isMigrationNeeded(String entityType, Entity entity) { if (this.entityTypesBeingMigrated.containsKey(entityType)) { int entityVersionNumber = this.getEntityVersionNumber(entity); int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); if (entityVersionNumber < ...
SliSchemaVersionValidator { protected boolean isMigrationNeeded(String entityType, Entity entity) { if (this.entityTypesBeingMigrated.containsKey(entityType)) { int entityVersionNumber = this.getEntityVersionNumber(entity); int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); if (entityVersionNumber < ...
@Test @SuppressWarnings("unchecked") public void testParsing() throws Throwable { Resource schema = new ClassPathResource("edfiXsd-SLI/SLI-Interchange-StudentParent.xsd"); Resource xml = new ClassPathResource("parser/InterchangeStudentParent/Student.xml"); RecordVisitor mockVisitor = Mockito.mock(RecordVisitor.class); ...
public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshaller parser = new EdfiRecordUnmarshaller(typeProvide...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
@Test public void testPerformMigration() { String entityType = "student"; String collectionName = "student"; Entity entity = new MongoEntity("student", new HashMap<String, Object>()); ValidationWithoutNaturalKeys repo = mock(ValidationWithoutNaturalKeys.class); when(repo.updateWithoutValidatingNaturalKeys(anyString(), ...
protected Entity performMigration(String entityType, Entity entity, ValidationWithoutNaturalKeys repo, String collectionName, boolean doUpdate) { int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); int entityVersionNumber = this.getEntityVersionNumber(entity); Entity localEntity = entity; for (Migrati...
SliSchemaVersionValidator { protected Entity performMigration(String entityType, Entity entity, ValidationWithoutNaturalKeys repo, String collectionName, boolean doUpdate) { int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); int entityVersionNumber = this.getEntityVersionNumber(entity); Entity localE...
SliSchemaVersionValidator { protected Entity performMigration(String entityType, Entity entity, ValidationWithoutNaturalKeys repo, String collectionName, boolean doUpdate) { int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); int entityVersionNumber = this.getEntityVersionNumber(entity); Entity localE...
SliSchemaVersionValidator { protected Entity performMigration(String entityType, Entity entity, ValidationWithoutNaturalKeys repo, String collectionName, boolean doUpdate) { int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); int entityVersionNumber = this.getEntityVersionNumber(entity); Entity localE...
SliSchemaVersionValidator { protected Entity performMigration(String entityType, Entity entity, ValidationWithoutNaturalKeys repo, String collectionName, boolean doUpdate) { int newVersionNumber = this.entityTypesBeingMigrated.get(entityType); int entityVersionNumber = this.getEntityVersionNumber(entity); Entity localE...
@Test public void testGetMigrationStrategies() { initMockMigration(); Entity entity = new MongoEntity("staff", new HashMap<String, Object>()); List<MigrationStrategy> strategies = sliSchemaVersionValidator.getMigrationStrategies("staff", 0, 2); assertEquals("Should match", 1, strategies.size()); assertTrue("Should be t...
protected List<MigrationStrategy> getMigrationStrategies(String entityType, int entityVersionNumber, int newVersionNumber) { Map<String, List<MigrationStrategy>> entityMigrations = migrationStrategyMap.get(entityType); List<MigrationStrategy> allStrategies = new LinkedList<MigrationStrategy>(); if (entityMigrations != ...
SliSchemaVersionValidator { protected List<MigrationStrategy> getMigrationStrategies(String entityType, int entityVersionNumber, int newVersionNumber) { Map<String, List<MigrationStrategy>> entityMigrations = migrationStrategyMap.get(entityType); List<MigrationStrategy> allStrategies = new LinkedList<MigrationStrategy>...
SliSchemaVersionValidator { protected List<MigrationStrategy> getMigrationStrategies(String entityType, int entityVersionNumber, int newVersionNumber) { Map<String, List<MigrationStrategy>> entityMigrations = migrationStrategyMap.get(entityType); List<MigrationStrategy> allStrategies = new LinkedList<MigrationStrategy>...
SliSchemaVersionValidator { protected List<MigrationStrategy> getMigrationStrategies(String entityType, int entityVersionNumber, int newVersionNumber) { Map<String, List<MigrationStrategy>> entityMigrations = migrationStrategyMap.get(entityType); List<MigrationStrategy> allStrategies = new LinkedList<MigrationStrategy>...
SliSchemaVersionValidator { protected List<MigrationStrategy> getMigrationStrategies(String entityType, int entityVersionNumber, int newVersionNumber) { Map<String, List<MigrationStrategy>> entityMigrations = migrationStrategyMap.get(entityType); List<MigrationStrategy> allStrategies = new LinkedList<MigrationStrategy>...
@Test public void testLoadNonExistentFile() { String testFile = "nonExistent"; InputStream in = getClass().getResourceAsStream(testFile); String out = aggregationLoader.loadJavascriptFile(in); assertEquals("", out); }
protected String loadJavascriptFile(InputStream in) { try { if (in == null) { return ""; } StringBuffer fileData = new StringBuffer(); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String temp = br.readLine(); while (temp != null) { fileData.append(temp); fileData.append("\n"); temp = br.readLine()...
AggregationLoader { protected String loadJavascriptFile(InputStream in) { try { if (in == null) { return ""; } StringBuffer fileData = new StringBuffer(); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String temp = br.readLine(); while (temp != null) { fileData.append(temp); fileData.append("\n"); ...
AggregationLoader { protected String loadJavascriptFile(InputStream in) { try { if (in == null) { return ""; } StringBuffer fileData = new StringBuffer(); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String temp = br.readLine(); while (temp != null) { fileData.append(temp); fileData.append("\n"); ...
AggregationLoader { protected String loadJavascriptFile(InputStream in) { try { if (in == null) { return ""; } StringBuffer fileData = new StringBuffer(); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String temp = br.readLine(); while (temp != null) { fileData.append(temp); fileData.append("\n"); ...
AggregationLoader { protected String loadJavascriptFile(InputStream in) { try { if (in == null) { return ""; } StringBuffer fileData = new StringBuffer(); BufferedReader br = new BufferedReader(new InputStreamReader(in)); String temp = br.readLine(); while (temp != null) { fileData.append(temp); fileData.append("\n"); ...
@Test public void testGetSystemConnection() { Mongo mongo = Mockito.mock(Mongo.class); DB db = Mockito.mock(DB.class); Mockito.when(db.getMongo()).thenReturn(mongo); Mockito.when(db.getName()).thenReturn("System"); Mockito.when(mongo.getDB(Mockito.anyString())).thenReturn(db); TenantAwareMongoDbFactory cm = new TenantA...
@Override public DB getDb() throws DataAccessException { String tenantId = TenantContext.getTenantId(); boolean isSystemCall = TenantContext.isSystemCall(); if (isSystemCall || tenantId == null) { return super.getDb(); } else { return super.getDb(getTenantDatabaseName(tenantId)); } }
TenantAwareMongoDbFactory extends SimpleMongoDbFactory { @Override public DB getDb() throws DataAccessException { String tenantId = TenantContext.getTenantId(); boolean isSystemCall = TenantContext.isSystemCall(); if (isSystemCall || tenantId == null) { return super.getDb(); } else { return super.getDb(getTenantDatabas...
TenantAwareMongoDbFactory extends SimpleMongoDbFactory { @Override public DB getDb() throws DataAccessException { String tenantId = TenantContext.getTenantId(); boolean isSystemCall = TenantContext.isSystemCall(); if (isSystemCall || tenantId == null) { return super.getDb(); } else { return super.getDb(getTenantDatabas...
TenantAwareMongoDbFactory extends SimpleMongoDbFactory { @Override public DB getDb() throws DataAccessException { String tenantId = TenantContext.getTenantId(); boolean isSystemCall = TenantContext.isSystemCall(); if (isSystemCall || tenantId == null) { return super.getDb(); } else { return super.getDb(getTenantDatabas...
TenantAwareMongoDbFactory extends SimpleMongoDbFactory { @Override public DB getDb() throws DataAccessException { String tenantId = TenantContext.getTenantId(); boolean isSystemCall = TenantContext.isSystemCall(); if (isSystemCall || tenantId == null) { return super.getDb(); } else { return super.getDb(getTenantDatabas...
@Test public void testKeyPrefixing() { NeutralCriteria neutralCriteria1 = new NeutralCriteria("metadata.x", "=", "1"); NeutralCriteria neutralCriteria2 = new NeutralCriteria("metadata.x", "=", "1", false); NeutralCriteria neutralCriteria3 = new NeutralCriteria("_id", "=", "1"); NeutralCriteria neutralCriteria4 = new Ne...
protected static String prefixKey(NeutralCriteria neutralCriteria) { LOG.debug(">>>MongoQueryConverter.prefixKey()"); String key = neutralCriteria.getKey(); if (key.equals(MONGO_ID)) { return key; } else if (neutralCriteria.canBePrefixed()) { return MONGO_BODY + key; } else { return key; } }
MongoQueryConverter { protected static String prefixKey(NeutralCriteria neutralCriteria) { LOG.debug(">>>MongoQueryConverter.prefixKey()"); String key = neutralCriteria.getKey(); if (key.equals(MONGO_ID)) { return key; } else if (neutralCriteria.canBePrefixed()) { return MONGO_BODY + key; } else { return key; } } }
MongoQueryConverter { protected static String prefixKey(NeutralCriteria neutralCriteria) { LOG.debug(">>>MongoQueryConverter.prefixKey()"); String key = neutralCriteria.getKey(); if (key.equals(MONGO_ID)) { return key; } else if (neutralCriteria.canBePrefixed()) { return MONGO_BODY + key; } else { return key; } } Mongo...
MongoQueryConverter { protected static String prefixKey(NeutralCriteria neutralCriteria) { LOG.debug(">>>MongoQueryConverter.prefixKey()"); String key = neutralCriteria.getKey(); if (key.equals(MONGO_ID)) { return key; } else if (neutralCriteria.canBePrefixed()) { return MONGO_BODY + key; } else { return key; } } Mongo...
MongoQueryConverter { protected static String prefixKey(NeutralCriteria neutralCriteria) { LOG.debug(">>>MongoQueryConverter.prefixKey()"); String key = neutralCriteria.getKey(); if (key.equals(MONGO_ID)) { return key; } else if (neutralCriteria.canBePrefixed()) { return MONGO_BODY + key; } else { return key; } } Mongo...
@Test public void testMergeCriteria() { NeutralCriteria neutralCriteria1 = new NeutralCriteria("eventDate", ">=", "2011-09-08"); NeutralCriteria neutralCriteria2 = new NeutralCriteria("eventDate", "<=", "2012-04-08"); List<NeutralCriteria> list = new ArrayList<NeutralCriteria>(); list.add(neutralCriteria1); list.add(ne...
protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaForFields.entrySet()) { ...
MongoQueryConverter { protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaFo...
MongoQueryConverter { protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaFo...
MongoQueryConverter { protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaFo...
MongoQueryConverter { protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaFo...
@Test public void testNullMergeCriteria() { List<Criteria> criteriaMerged = mongoQueryConverter.mergeCriteria(null); assertNotNull("Should not be null", criteriaMerged); assertEquals("Should match", 0, criteriaMerged.size()); }
protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaForFields.entrySet()) { ...
MongoQueryConverter { protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaFo...
MongoQueryConverter { protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaFo...
MongoQueryConverter { protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaFo...
MongoQueryConverter { protected List<Criteria> mergeCriteria(Map<String, List<NeutralCriteria>> criteriaForFields) { LOG.debug(">>>MongoQueryConverter.mergeCriteria()"); List<Criteria> criteriaList = new ArrayList<Criteria>(); if (criteriaForFields != null) { for (Map.Entry<String, List<NeutralCriteria>> e : criteriaFo...
@Test public void testIncludeFieldConvert() { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.setIncludeFieldString("populationServed,uniqueSectionCode"); Query query = mongoQueryConverter.convert("section", neutralQuery); assertNotNull("Should not be null", query); DBObject obj = query.getFieldsObject(); ...
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test public void testOffsetAndLimitConvert() { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.setOffset(10); neutralQuery.setLimit(100); Query query = mongoQueryConverter.convert("section", neutralQuery); assertNotNull("Should not be null", query); assertEquals("Should match", 10, query.getSkip()); asser...
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test public void testSortConvert() { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.setSortBy("populationServed"); neutralQuery.setSortOrder(NeutralQuery.SortOrder.ascending); Query query = mongoQueryConverter.convert("section", neutralQuery); assertNotNull("Should not be null", query); DBObject obj = qu...
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test(expected = IOException.class) public void testIOExceptionForSchema() throws Throwable { Resource schema = new ClassPathResource("does_not_exists.xsd"); Resource xml = new ClassPathResource("parser/InterchangeStudentParent/Student.xml"); RecordVisitor mockVisitor = Mockito.mock(RecordVisitor.class); EdfiRecordUnma...
public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshaller parser = new EdfiRecordUnmarshaller(typeProvide...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
@Test(expected = QueryParseException.class) public void testPIISort() throws QueryParseException { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.setSortBy("birthData.birthDate"); neutralQuery.setSortOrder(NeutralQuery.SortOrder.ascending); mongoQueryConverter.convert("student", neutralQuery); }
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test(expected = QueryParseException.class) public void testPIISearchGreaterThan() throws QueryParseException { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.addCriteria(new NeutralCriteria("birthData.birthDate", ">", "1960-01-01")); mongoQueryConverter.convert("student", neutralQuery); }
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test(expected = QueryParseException.class) public void testPIISearchLessThan() throws QueryParseException { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.addCriteria(new NeutralCriteria("birthData.birthDate", "<", "1960-01-01")); mongoQueryConverter.convert("student", neutralQuery); }
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test(expected = QueryParseException.class) public void testPIISearchNotEqual() throws QueryParseException { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.addCriteria(new NeutralCriteria("birthData.birthDate", "~", "1960-01-01")); mongoQueryConverter.convert("student", neutralQuery); }
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test public void testPIISearchEquals() { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.addCriteria(new NeutralCriteria("birthData.birthDate", "=", "1960-01-01")); Query query = mongoQueryConverter.convert("student", neutralQuery); assertNotNull("Should not be null", query); DBObject obj = query.getQuery...
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test public void testFieldsConvert() { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.addCriteria(new NeutralCriteria("populationServed", "=", "Regular Students")); Query query = mongoQueryConverter.convert("section", neutralQuery); assertNotNull("Should not be null", query); DBObject obj = query.getQuer...
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test(expected = QueryParseException.class) public void testInNotList() throws QueryParseException { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.addCriteria(new NeutralCriteria("populationServed", NeutralCriteria.CRITERIA_IN, "Regular Students")); mongoQueryConverter.convert("section", neutralQuery); }
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test public void testOrConvert() { NeutralQuery mainQuery = new NeutralQuery(); mainQuery.addCriteria(new NeutralCriteria("economicDisadvantaged=true")); NeutralQuery orQuery1 = new NeutralQuery(); NeutralQuery orQuery2 = new NeutralQuery(); orQuery2.addCriteria(new NeutralCriteria("studentUniqueStateId", "=", "000000...
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test public void testEmptyIncludeFieldConvert() { NeutralQuery neutralQuery = new NeutralQuery(); Query query = mongoQueryConverter.convert("section", neutralQuery); assertNotNull("Should not be null", query); DBObject obj = query.getFieldsObject(); assertNotNull("Should not be null", obj); assertEquals("Should match"...
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test public void testEmbeddedFieldConvert() { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.setEmbeddedFields(Arrays.asList("studentSectionAssociation", "teacherSectionAssociation")); Query query = mongoQueryConverter.convert("section", neutralQuery); assertNotNull("Should not be null", query); DBObject...
public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); }
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
MongoQueryConverter { public Query convert(String entityName, NeutralQuery neutralQuery) { LOG.debug(">>>MongoQueryConverter.convery(entityName, neutralQuery)"); return convert(entityName, neutralQuery, false); } MongoQueryConverter(); Query convert(String entityName, NeutralQuery neutralQuery); Query convert(String en...
@Test @SuppressWarnings("unchecked") public void testSourceLocation() throws Throwable { Resource schema = new ClassPathResource("edfiXsd-SLI/SLI-Interchange-StudentParent.xsd"); Resource xml = new ClassPathResource("parser/InterchangeStudentParent/ThirteenStudents.xml"); RecordVisitor mockVisitor = Mockito.mock(Record...
public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshaller parser = new EdfiRecordUnmarshaller(typeProvide...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
EdfiRecordUnmarshaller extends EdfiRecordParser { public static void parse(InputStream input, Resource schemaResource, TypeProvider typeProvider, RecordVisitor visitor, AbstractMessageReport messageReport, ReportStats reportStats, Source source) throws SAXException, IOException, XmlParseException { EdfiRecordUnmarshall...
@Test(expected = MissingArgumentException.class) public void missingPortValue() throws ParseException, MissingConfigException { String[] args = new String[] { "-u", "user", "-pass", "password", "-s", "server", "-d", "localDir", "-port" }; propUtils.getUploadProperties(args); }
public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(FLAG_PASSWORD); i...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
PropertyUtils { public UploadProperties getUploadProperties(String[] args) throws ParseException, MissingConfigException { CommandLine cmd = parser.parse(OPTIONS, args); String user = cmd.getOptionValue(FLAG_USER); if (user == null) { throw new MissingConfigException(FLAG_USER); } String password = cmd.getOptionValue(F...
@Test public void testGetChildren() throws Exception { List<String> children = nodeService.getChildren("local_test", "/test"); Assert.assertNotNull(children); Assert.assertEquals(0, children.size()); }
public List<String> getChildren(String cluster, String path) throws ShepherException { List<String> children = nodeDAO.getChildren(cluster, path); Collections.sort(children); return children; }
NodeService { public List<String> getChildren(String cluster, String path) throws ShepherException { List<String> children = nodeDAO.getChildren(cluster, path); Collections.sort(children); return children; } }
NodeService { public List<String> getChildren(String cluster, String path) throws ShepherException { List<String> children = nodeDAO.getChildren(cluster, path); Collections.sort(children); return children; } }
NodeService { public List<String> getChildren(String cluster, String path) throws ShepherException { List<String> children = nodeDAO.getChildren(cluster, path); Collections.sort(children); return children; } List<String> getChildren(String cluster, String path); String getData(String cluster, String path); Stat getSta...
NodeService { public List<String> getChildren(String cluster, String path) throws ShepherException { List<String> children = nodeDAO.getChildren(cluster, path); Collections.sort(children); return children; } List<String> getChildren(String cluster, String path); String getData(String cluster, String path); Stat getSta...
@Test public void testAll() throws Exception { List<Cluster> clusters = clusterAdminService.all(); Assert.assertNotNull(clusters); Assert.assertEquals(1, clusters.size()); }
public List<Cluster> all() { return clusterAdminBiz.all(); }
ClusterAdminService { public List<Cluster> all() { return clusterAdminBiz.all(); } }
ClusterAdminService { public List<Cluster> all() { return clusterAdminBiz.all(); } }
ClusterAdminService { public List<Cluster> all() { return clusterAdminBiz.all(); } void create(String name, String config); void update(String name, String config); void delete(String name); List<Cluster> all(); }
ClusterAdminService { public List<Cluster> all() { return clusterAdminBiz.all(); } void create(String name, String config); void update(String name, String config); void delete(String name); List<Cluster> all(); }
@Test public void testCreate() throws Exception { long userId = 2; String teamName = "test_team"; String cluster = "local_test"; String path = "/test"; boolean createResult = teamService.create(userId, teamName, cluster, path); Assert.assertEquals(true, createResult); }
@Transactional public boolean create(long userId, String teamName, String cluster, String path) throws ShepherException { long teamId = teamBiz.create(teamName, userId).getId(); userTeamBiz.create(userId, teamId, Role.MASTER, Status.AGREE); long permissionId = permissionBiz.createIfNotExists(cluster, path); permissionT...
TeamService { @Transactional public boolean create(long userId, String teamName, String cluster, String path) throws ShepherException { long teamId = teamBiz.create(teamName, userId).getId(); userTeamBiz.create(userId, teamId, Role.MASTER, Status.AGREE); long permissionId = permissionBiz.createIfNotExists(cluster, path...
TeamService { @Transactional public boolean create(long userId, String teamName, String cluster, String path) throws ShepherException { long teamId = teamBiz.create(teamName, userId).getId(); userTeamBiz.create(userId, teamId, Role.MASTER, Status.AGREE); long permissionId = permissionBiz.createIfNotExists(cluster, path...
TeamService { @Transactional public boolean create(long userId, String teamName, String cluster, String path) throws ShepherException { long teamId = teamBiz.create(teamName, userId).getId(); userTeamBiz.create(userId, teamId, Role.MASTER, Status.AGREE); long permissionId = permissionBiz.createIfNotExists(cluster, path...
TeamService { @Transactional public boolean create(long userId, String teamName, String cluster, String path) throws ShepherException { long teamId = teamBiz.create(teamName, userId).getId(); userTeamBiz.create(userId, teamId, Role.MASTER, Status.AGREE); long permissionId = permissionBiz.createIfNotExists(cluster, path...
@Test public void testAddApplyForUserIdTeamIdRole() throws Exception { long userId = 2; long teamId = 5; Role role = Role.MEMBER; UserTeam userTeam = teamService.addApply(userId, teamId, role); Assert.assertNotNull(userTeam); Assert.assertNotEquals(1, userTeam.getId()); }
public UserTeam addApply(long userId, long teamId, Role role) throws ShepherException { return userTeamBiz.create(userId, teamId, role, Status.PENDING); }
TeamService { public UserTeam addApply(long userId, long teamId, Role role) throws ShepherException { return userTeamBiz.create(userId, teamId, role, Status.PENDING); } }
TeamService { public UserTeam addApply(long userId, long teamId, Role role) throws ShepherException { return userTeamBiz.create(userId, teamId, role, Status.PENDING); } }
TeamService { public UserTeam addApply(long userId, long teamId, Role role) throws ShepherException { return userTeamBiz.create(userId, teamId, role, Status.PENDING); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Tra...
TeamService { public UserTeam addApply(long userId, long teamId, Role role) throws ShepherException { return userTeamBiz.create(userId, teamId, role, Status.PENDING); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Tra...
@Test public void testAddMember() throws Exception { }
@Transactional public void addMember(User member, long teamId, Role role, User creator) throws ShepherException { if (member == null || creator == null) { throw ShepherException.createIllegalParameterException(); } if (userTeamBiz.listUserByTeamId(teamId).contains(member.getName())) { throw ShepherException.createUserE...
TeamService { @Transactional public void addMember(User member, long teamId, Role role, User creator) throws ShepherException { if (member == null || creator == null) { throw ShepherException.createIllegalParameterException(); } if (userTeamBiz.listUserByTeamId(teamId).contains(member.getName())) { throw ShepherExcepti...
TeamService { @Transactional public void addMember(User member, long teamId, Role role, User creator) throws ShepherException { if (member == null || creator == null) { throw ShepherException.createIllegalParameterException(); } if (userTeamBiz.listUserByTeamId(teamId).contains(member.getName())) { throw ShepherExcepti...
TeamService { @Transactional public void addMember(User member, long teamId, Role role, User creator) throws ShepherException { if (member == null || creator == null) { throw ShepherException.createIllegalParameterException(); } if (userTeamBiz.listUserByTeamId(teamId).contains(member.getName())) { throw ShepherExcepti...
TeamService { @Transactional public void addMember(User member, long teamId, Role role, User creator) throws ShepherException { if (member == null || creator == null) { throw ShepherException.createIllegalParameterException(); } if (userTeamBiz.listUserByTeamId(teamId).contains(member.getName())) { throw ShepherExcepti...
@Test public void testListUserTeamsPending() throws Exception { long userId = 2; long teamId = 5; Role role = Role.MEMBER; Team team = teamService.get(teamId); teamService.addApply(userId, teamId, role); List<UserTeam> applies = teamService.listUserTeamsPending(team); Assert.assertNotNull(applies); Assert.assertEquals(...
public List<UserTeam> listUserTeamsPending(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.PENDING); }
TeamService { public List<UserTeam> listUserTeamsPending(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.PENDING); } }
TeamService { public List<UserTeam> listUserTeamsPending(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.PENDING); } }
TeamService { public List<UserTeam> listUserTeamsPending(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.PENDING); } @Transactional boolean create(long userId, String teamName, String cluster, String...
TeamService { public List<UserTeam> listUserTeamsPending(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.PENDING); } @Transactional boolean create(long userId, String teamName, String cluster, String...
@Test public void testListUserTeamsAgree() throws Exception { long teamId = 1; Team team = teamService.get(teamId); List<UserTeam> applies = teamService.listUserTeamsAgree(team); Assert.assertNotNull(applies); Assert.assertEquals(3, applies.size()); }
public List<UserTeam> listUserTeamsAgree(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.AGREE); }
TeamService { public List<UserTeam> listUserTeamsAgree(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.AGREE); } }
TeamService { public List<UserTeam> listUserTeamsAgree(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.AGREE); } }
TeamService { public List<UserTeam> listUserTeamsAgree(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.AGREE); } @Transactional boolean create(long userId, String teamName, String cluster, String pat...
TeamService { public List<UserTeam> listUserTeamsAgree(Team team) throws ShepherException { if (team == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByTeam(team.getId(), Status.AGREE); } @Transactional boolean create(long userId, String teamName, String cluster, String pat...
@Test public void testListUserTeamsJoined() throws Exception { long userId = 3; User user = new User(); user.setId(userId); List<UserTeam> joinedTeams = teamService.listUserTeamsJoined(user); Assert.assertNotNull(joinedTeams); Assert.assertEquals(2, joinedTeams.size()); }
public List<UserTeam> listUserTeamsJoined(User user) throws ShepherException { if (user == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByUser(user.getId(), Status.AGREE); }
TeamService { public List<UserTeam> listUserTeamsJoined(User user) throws ShepherException { if (user == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByUser(user.getId(), Status.AGREE); } }
TeamService { public List<UserTeam> listUserTeamsJoined(User user) throws ShepherException { if (user == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByUser(user.getId(), Status.AGREE); } }
TeamService { public List<UserTeam> listUserTeamsJoined(User user) throws ShepherException { if (user == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByUser(user.getId(), Status.AGREE); } @Transactional boolean create(long userId, String teamName, String cluster, String pa...
TeamService { public List<UserTeam> listUserTeamsJoined(User user) throws ShepherException { if (user == null) { throw ShepherException.createIllegalParameterException(); } return userTeamBiz.listByUser(user.getId(), Status.AGREE); } @Transactional boolean create(long userId, String teamName, String cluster, String pa...
@Test public void testListTeamsToJoin() throws Exception { long userId = 4; String cluster = "local_test"; String path = "/test/sub1"; List<Team> teams = teamService.listTeamsToJoin(userId, cluster, path); Assert.assertNotNull(teams); Assert.assertEquals(1, teams.size()); }
public List<Team> listTeamsToJoin(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, false); }
TeamService { public List<Team> listTeamsToJoin(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, false); } }
TeamService { public List<Team> listTeamsToJoin(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, false); } }
TeamService { public List<Team> listTeamsToJoin(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, false); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transacti...
TeamService { public List<Team> listTeamsToJoin(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, false); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transacti...
@Test public void testListTeamsJoined() throws Exception { long userId = 3; String cluster = "local_test"; String path = "/test/sub1"; List<Team> teams = teamService.listTeamsJoined(userId, cluster, path); Assert.assertNotNull(teams); Assert.assertEquals(1, teams.size()); }
public List<Team> listTeamsJoined(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, true); }
TeamService { public List<Team> listTeamsJoined(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, true); } }
TeamService { public List<Team> listTeamsJoined(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, true); } }
TeamService { public List<Team> listTeamsJoined(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, true); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactio...
TeamService { public List<Team> listTeamsJoined(long userId, String cluster, String path) { return teamBiz.listTeamsByPathAndUser(userId, cluster, path, true); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactio...
@Test public void testGetTeamName() throws Exception { String teamName = "admin"; Team team = teamService.get(teamName); Assert.assertNotNull(team); Assert.assertEquals(1, team.getId()); }
public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); }
TeamService { public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); } }
TeamService { public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); } }
TeamService { public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void addApply(User user, long teamId, Role role...
TeamService { public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void addApply(User user, long teamId, Role role...
@Test public void testGetData() throws Exception { String data = nodeService.getData("local_test", "/test"); Assert.assertNull(data); }
public String getData(String cluster, String path) throws ShepherException { return nodeDAO.getData(cluster, path); }
NodeService { public String getData(String cluster, String path) throws ShepherException { return nodeDAO.getData(cluster, path); } }
NodeService { public String getData(String cluster, String path) throws ShepherException { return nodeDAO.getData(cluster, path); } }
NodeService { public String getData(String cluster, String path) throws ShepherException { return nodeDAO.getData(cluster, path); } List<String> getChildren(String cluster, String path); String getData(String cluster, String path); Stat getStat(String cluster, String path); Stat getStat(String cluster, String path, bo...
NodeService { public String getData(String cluster, String path) throws ShepherException { return nodeDAO.getData(cluster, path); } List<String> getChildren(String cluster, String path); String getData(String cluster, String path); Stat getStat(String cluster, String path); Stat getStat(String cluster, String path, bo...
@Test public void testGetTeamId() throws Exception { long teamId = 1; Team team = teamService.get(teamId); Assert.assertNotNull(team); Assert.assertEquals("admin", team.getName()); }
public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); }
TeamService { public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); } }
TeamService { public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); } }
TeamService { public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void addApply(User user, long teamId, Role role...
TeamService { public Team get(String teamName) throws ShepherException { return teamBiz.getByName(teamName); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void addApply(User user, long teamId, Role role...
@Test public void testUpdateStatus() throws Exception { long id = 3; Status status = Status.DELETE; int updateResult = teamService.updateStatus(id, status); Assert.assertEquals(RESULT_OK, updateResult); }
public int updateStatus(long id, Status status) throws ShepherException { return userTeamBiz.updateStatus(id, status); }
TeamService { public int updateStatus(long id, Status status) throws ShepherException { return userTeamBiz.updateStatus(id, status); } }
TeamService { public int updateStatus(long id, Status status) throws ShepherException { return userTeamBiz.updateStatus(id, status); } }
TeamService { public int updateStatus(long id, Status status) throws ShepherException { return userTeamBiz.updateStatus(id, status); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void addApply(User user...
TeamService { public int updateStatus(long id, Status status) throws ShepherException { return userTeamBiz.updateStatus(id, status); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void addApply(User user...
@Test public void testAgreeJoin() throws Exception { }
public int agreeJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.AGREE); this.noticeJoinTeamHandled(id, user, teamId, Status.AGREE); return result; }
TeamService { public int agreeJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.AGREE); this.noticeJoinTeamHandled(id, user, teamId, Status.AGREE); return result; } }
TeamService { public int agreeJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.AGREE); this.noticeJoinTeamHandled(id, user, teamId, Status.AGREE); return result; } }
TeamService { public int agreeJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.AGREE); this.noticeJoinTeamHandled(id, user, teamId, Status.AGREE); return result; } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam...
TeamService { public int agreeJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.AGREE); this.noticeJoinTeamHandled(id, user, teamId, Status.AGREE); return result; } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam...
@Test public void testRefuseJoin() throws Exception { }
public int refuseJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.REFUSE); this.noticeJoinTeamHandled(id, user, teamId, Status.REFUSE); return result; }
TeamService { public int refuseJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.REFUSE); this.noticeJoinTeamHandled(id, user, teamId, Status.REFUSE); return result; } }
TeamService { public int refuseJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.REFUSE); this.noticeJoinTeamHandled(id, user, teamId, Status.REFUSE); return result; } }
TeamService { public int refuseJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.REFUSE); this.noticeJoinTeamHandled(id, user, teamId, Status.REFUSE); return result; } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserT...
TeamService { public int refuseJoin(User user, long id, long teamId) throws ShepherException { int result = this.updateStatus(id, Status.REFUSE); this.noticeJoinTeamHandled(id, user, teamId, Status.REFUSE); return result; } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserT...
@Test public void testUpdateRole() throws Exception { long id = 3; Role role = Role.MEMBER; int updateResult = teamService.updateRole(id, role); Assert.assertEquals(RESULT_OK, updateResult); }
public int updateRole(long id, Role role) throws ShepherException { return userTeamBiz.updateRole(id, role); }
TeamService { public int updateRole(long id, Role role) throws ShepherException { return userTeamBiz.updateRole(id, role); } }
TeamService { public int updateRole(long id, Role role) throws ShepherException { return userTeamBiz.updateRole(id, role); } }
TeamService { public int updateRole(long id, Role role) throws ShepherException { return userTeamBiz.updateRole(id, role); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void addApply(User user, long tea...
TeamService { public int updateRole(long id, Role role) throws ShepherException { return userTeamBiz.updateRole(id, role); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void addApply(User user, long tea...
@Test public void testHasApplied() throws Exception { long teamId = 5; String cluster = "local_test"; String path = "/test/sub1"; boolean hasApplied = teamService.hasApplied(teamId, cluster, path); Assert.assertEquals(true, hasApplied); }
public boolean hasApplied(long teamId, String cluster, String path) throws ShepherException { boolean accepted = permissionTeamBiz.get(teamId, cluster, path, Status.AGREE) != null; boolean pending = permissionTeamBiz.get(teamId, cluster, path, Status.PENDING) != null; return accepted || pending; }
TeamService { public boolean hasApplied(long teamId, String cluster, String path) throws ShepherException { boolean accepted = permissionTeamBiz.get(teamId, cluster, path, Status.AGREE) != null; boolean pending = permissionTeamBiz.get(teamId, cluster, path, Status.PENDING) != null; return accepted || pending; } }
TeamService { public boolean hasApplied(long teamId, String cluster, String path) throws ShepherException { boolean accepted = permissionTeamBiz.get(teamId, cluster, path, Status.AGREE) != null; boolean pending = permissionTeamBiz.get(teamId, cluster, path, Status.PENDING) != null; return accepted || pending; } }
TeamService { public boolean hasApplied(long teamId, String cluster, String path) throws ShepherException { boolean accepted = permissionTeamBiz.get(teamId, cluster, path, Status.AGREE) != null; boolean pending = permissionTeamBiz.get(teamId, cluster, path, Status.PENDING) != null; return accepted || pending; } @Trans...
TeamService { public boolean hasApplied(long teamId, String cluster, String path) throws ShepherException { boolean accepted = permissionTeamBiz.get(teamId, cluster, path, Status.AGREE) != null; boolean pending = permissionTeamBiz.get(teamId, cluster, path, Status.PENDING) != null; return accepted || pending; } @Trans...
@Test public void testIsMaster() throws Exception { long userId = 1; long teamId = 1; boolean isMaster = teamService.isMaster(userId, teamId); Assert.assertEquals(true, isMaster); }
public boolean isMaster(long userId, long teamId) throws ShepherException { return userTeamBiz.getRoleValue(userId, teamId, Status.AGREE) == Role.MASTER.getValue(); }
TeamService { public boolean isMaster(long userId, long teamId) throws ShepherException { return userTeamBiz.getRoleValue(userId, teamId, Status.AGREE) == Role.MASTER.getValue(); } }
TeamService { public boolean isMaster(long userId, long teamId) throws ShepherException { return userTeamBiz.getRoleValue(userId, teamId, Status.AGREE) == Role.MASTER.getValue(); } }
TeamService { public boolean isMaster(long userId, long teamId) throws ShepherException { return userTeamBiz.getRoleValue(userId, teamId, Status.AGREE) == Role.MASTER.getValue(); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role...
TeamService { public boolean isMaster(long userId, long teamId) throws ShepherException { return userTeamBiz.getRoleValue(userId, teamId, Status.AGREE) == Role.MASTER.getValue(); } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role...
@Test public void testIsOwner() throws Exception { long userId = 1; long teamId = 1; boolean isOwner = teamService.isOwner(userId, teamId); Assert.assertEquals(true, isOwner); }
public boolean isOwner(long userId, long teamId) { Team team = teamBiz.getById(teamId); return team != null && team.getOwner() == userId; }
TeamService { public boolean isOwner(long userId, long teamId) { Team team = teamBiz.getById(teamId); return team != null && team.getOwner() == userId; } }
TeamService { public boolean isOwner(long userId, long teamId) { Team team = teamBiz.getById(teamId); return team != null && team.getOwner() == userId; } }
TeamService { public boolean isOwner(long userId, long teamId) { Team team = teamBiz.getById(teamId); return team != null && team.getOwner() == userId; } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void...
TeamService { public boolean isOwner(long userId, long teamId) { Team team = teamBiz.getById(teamId); return team != null && team.getOwner() == userId; } @Transactional boolean create(long userId, String teamName, String cluster, String path); UserTeam addApply(long userId, long teamId, Role role); @Transactional void...
@Test public void testIsAdmin() throws Exception { long userId = 1; boolean isAdmin = teamService.isAdmin(userId); Assert.assertEquals(true, isAdmin); }
public boolean isAdmin(long userId) throws ShepherException { Team team = teamBiz.getByName(ShepherConstants.ADMIN); return userTeamBiz.getRoleValue(userId, team.getId(), Status.AGREE) > ShepherConstants.DEFAULT_ROLEVALUE; }
TeamService { public boolean isAdmin(long userId) throws ShepherException { Team team = teamBiz.getByName(ShepherConstants.ADMIN); return userTeamBiz.getRoleValue(userId, team.getId(), Status.AGREE) > ShepherConstants.DEFAULT_ROLEVALUE; } }
TeamService { public boolean isAdmin(long userId) throws ShepherException { Team team = teamBiz.getByName(ShepherConstants.ADMIN); return userTeamBiz.getRoleValue(userId, team.getId(), Status.AGREE) > ShepherConstants.DEFAULT_ROLEVALUE; } }
TeamService { public boolean isAdmin(long userId) throws ShepherException { Team team = teamBiz.getByName(ShepherConstants.ADMIN); return userTeamBiz.getRoleValue(userId, team.getId(), Status.AGREE) > ShepherConstants.DEFAULT_ROLEVALUE; } @Transactional boolean create(long userId, String teamName, String cluster, Stri...
TeamService { public boolean isAdmin(long userId) throws ShepherException { Team team = teamBiz.getByName(ShepherConstants.ADMIN); return userTeamBiz.getRoleValue(userId, team.getId(), Status.AGREE) > ShepherConstants.DEFAULT_ROLEVALUE; } @Transactional boolean create(long userId, String teamName, String cluster, Stri...
@Test public void testCreate() throws Exception { }
@Transactional public long create(String cluster, String path, String data, User creator, Action action, ReviewStatus reviewStatus) throws ShepherException { if (creator == null) { throw ShepherException.createIllegalParameterException(); } Stat stat = nodeDAO.getStat(cluster, path, true); long snapshotId = snapshotBiz...
ReviewService { @Transactional public long create(String cluster, String path, String data, User creator, Action action, ReviewStatus reviewStatus) throws ShepherException { if (creator == null) { throw ShepherException.createIllegalParameterException(); } Stat stat = nodeDAO.getStat(cluster, path, true); long snapshot...
ReviewService { @Transactional public long create(String cluster, String path, String data, User creator, Action action, ReviewStatus reviewStatus) throws ShepherException { if (creator == null) { throw ShepherException.createIllegalParameterException(); } Stat stat = nodeDAO.getStat(cluster, path, true); long snapshot...
ReviewService { @Transactional public long create(String cluster, String path, String data, User creator, Action action, ReviewStatus reviewStatus) throws ShepherException { if (creator == null) { throw ShepherException.createIllegalParameterException(); } Stat stat = nodeDAO.getStat(cluster, path, true); long snapshot...
ReviewService { @Transactional public long create(String cluster, String path, String data, User creator, Action action, ReviewStatus reviewStatus) throws ShepherException { if (creator == null) { throw ShepherException.createIllegalParameterException(); } Stat stat = nodeDAO.getStat(cluster, path, true); long snapshot...
@Test public void testGetStatForClusterPath() throws Exception { Stat stat = nodeService.getStat("local_test", "/test"); Assert.assertNotNull(stat); }
public Stat getStat(String cluster, String path) throws ShepherException { return this.getStat(cluster, path, true); }
NodeService { public Stat getStat(String cluster, String path) throws ShepherException { return this.getStat(cluster, path, true); } }
NodeService { public Stat getStat(String cluster, String path) throws ShepherException { return this.getStat(cluster, path, true); } }
NodeService { public Stat getStat(String cluster, String path) throws ShepherException { return this.getStat(cluster, path, true); } List<String> getChildren(String cluster, String path); String getData(String cluster, String path); Stat getStat(String cluster, String path); Stat getStat(String cluster, String path, b...
NodeService { public Stat getStat(String cluster, String path) throws ShepherException { return this.getStat(cluster, path, true); } List<String> getChildren(String cluster, String path); String getData(String cluster, String path); Stat getStat(String cluster, String path); Stat getStat(String cluster, String path, b...
@Test public void testUpdate() throws Exception { int result = reviewService.update(ReviewStatus.ACCEPTED, 1L, "reviewer", 0L, 0L); Assert.assertNotEquals(0, result); }
@Transactional public int update(ReviewStatus reviewStatus, long id, String reviewer, long snapshotId, long zkMtime) throws ShepherException { snapshotBiz.update(snapshotId, reviewStatus, reviewer, zkMtime); return reviewBiz.update(id, reviewStatus, reviewer); }
ReviewService { @Transactional public int update(ReviewStatus reviewStatus, long id, String reviewer, long snapshotId, long zkMtime) throws ShepherException { snapshotBiz.update(snapshotId, reviewStatus, reviewer, zkMtime); return reviewBiz.update(id, reviewStatus, reviewer); } }
ReviewService { @Transactional public int update(ReviewStatus reviewStatus, long id, String reviewer, long snapshotId, long zkMtime) throws ShepherException { snapshotBiz.update(snapshotId, reviewStatus, reviewer, zkMtime); return reviewBiz.update(id, reviewStatus, reviewer); } }
ReviewService { @Transactional public int update(ReviewStatus reviewStatus, long id, String reviewer, long snapshotId, long zkMtime) throws ShepherException { snapshotBiz.update(snapshotId, reviewStatus, reviewer, zkMtime); return reviewBiz.update(id, reviewStatus, reviewer); } @Transactional long create(String cluste...
ReviewService { @Transactional public int update(ReviewStatus reviewStatus, long id, String reviewer, long snapshotId, long zkMtime) throws ShepherException { snapshotBiz.update(snapshotId, reviewStatus, reviewer, zkMtime); return reviewBiz.update(id, reviewStatus, reviewer); } @Transactional long create(String cluste...