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 public void shouldCreateSearchResultItem() throws Exception { NewznabXmlItem rssItem = buildBasicRssItem(); rssItem.getNewznabAttributes().add(new NewznabAttribute("password", "0")); rssItem.getNewznabAttributes().add(new NewznabAttribute("group", "group")); rssItem.getNewznabAttributes().add(new NewznabAttribute...
protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDetails(item.getRssGuid().getGuid(...
Newznab extends Indexer<Xml> { protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDet...
Newznab extends Indexer<Xml> { protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDet...
Newznab extends Indexer<Xml> { protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDet...
Newznab extends Indexer<Xml> { protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDet...
@Test public void shouldUseIndexersCategoryMappingToBuildOriginalCategoryName() throws Exception { testee.config.getCategoryMapping().setCategories(Arrays.asList(new MainCategory(5000, "TV", Arrays.asList(new SubCategory(5040, "HD"))))); NewznabXmlItem rssItem = buildBasicRssItem(); rssItem.getNewznabAttributes().add(n...
protected void parseAttributes(NewznabXmlItem item, SearchResultItem searchResultItem) { Map<String, String> attributes = item.getNewznabAttributes().stream().collect(Collectors.toMap(NewznabAttribute::getName, NewznabAttribute::getValue, (a, b) -> b)); List<Integer> newznabCategories = item.getNewznabAttributes().stre...
Newznab extends Indexer<Xml> { protected void parseAttributes(NewznabXmlItem item, SearchResultItem searchResultItem) { Map<String, String> attributes = item.getNewznabAttributes().stream().collect(Collectors.toMap(NewznabAttribute::getName, NewznabAttribute::getValue, (a, b) -> b)); List<Integer> newznabCategories = i...
Newznab extends Indexer<Xml> { protected void parseAttributes(NewznabXmlItem item, SearchResultItem searchResultItem) { Map<String, String> attributes = item.getNewznabAttributes().stream().collect(Collectors.toMap(NewznabAttribute::getName, NewznabAttribute::getValue, (a, b) -> b)); List<Integer> newznabCategories = i...
Newznab extends Indexer<Xml> { protected void parseAttributes(NewznabXmlItem item, SearchResultItem searchResultItem) { Map<String, String> attributes = item.getNewznabAttributes().stream().collect(Collectors.toMap(NewznabAttribute::getName, NewznabAttribute::getValue, (a, b) -> b)); List<Integer> newznabCategories = i...
Newznab extends Indexer<Xml> { protected void parseAttributes(NewznabXmlItem item, SearchResultItem searchResultItem) { Map<String, String> attributes = item.getNewznabAttributes().stream().collect(Collectors.toMap(NewznabAttribute::getName, NewznabAttribute::getValue, (a, b) -> b)); List<Integer> newznabCategories = i...
@Test public void shouldGetDetailsLinkFromRssGuidIfPermalink() throws Exception { NewznabXmlItem rssItem = buildBasicRssItem(); rssItem.setRssGuid(new NewznabXmlGuid("detailsLink", true)); rssItem.setComments("http: SearchResultItem item = testee.createSearchResultItem(rssItem); assertThat(item.getDetails(), is("detail...
protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDetails(item.getRssGuid().getGuid(...
Newznab extends Indexer<Xml> { protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDet...
Newznab extends Indexer<Xml> { protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDet...
Newznab extends Indexer<Xml> { protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDet...
Newznab extends Indexer<Xml> { protected SearchResultItem createSearchResultItem(NewznabXmlItem item) throws NzbHydraException { SearchResultItem searchResultItem = new SearchResultItem(); String link = getEnclosureUrl(item); searchResultItem.setLink(link); if (item.getRssGuid().isPermaLink()) { searchResultItem.setDet...
@Test public void shouldIgnoreHitAndDownloadLimitIfNoneAreSet() { indexerConfigMock.setHitLimit(null); indexerConfigMock.setDownloadLimit(null); testee.checkIndexerHitLimit(indexer); verify(nzbDownloadRepository, never()).findBySearchResultIndexerOrderByTimeDesc(any(), any()); verify(indexerApiAccessRepository, never()...
protected boolean checkIndexerHitLimit(Indexer indexer) { Stopwatch stopwatch = Stopwatch.createStarted(); IndexerConfig indexerConfig = indexer.getConfig(); if (!indexerConfig.getHitLimit().isPresent() && !indexerConfig.getDownloadLimit().isPresent()) { return true; } LocalDateTime comparisonTime; LocalDateTime now = ...
IndexerForSearchSelector { protected boolean checkIndexerHitLimit(Indexer indexer) { Stopwatch stopwatch = Stopwatch.createStarted(); IndexerConfig indexerConfig = indexer.getConfig(); if (!indexerConfig.getHitLimit().isPresent() && !indexerConfig.getDownloadLimit().isPresent()) { return true; } LocalDateTime compariso...
IndexerForSearchSelector { protected boolean checkIndexerHitLimit(Indexer indexer) { Stopwatch stopwatch = Stopwatch.createStarted(); IndexerConfig indexerConfig = indexer.getConfig(); if (!indexerConfig.getHitLimit().isPresent() && !indexerConfig.getDownloadLimit().isPresent()) { return true; } LocalDateTime compariso...
IndexerForSearchSelector { protected boolean checkIndexerHitLimit(Indexer indexer) { Stopwatch stopwatch = Stopwatch.createStarted(); IndexerConfig indexerConfig = indexer.getConfig(); if (!indexerConfig.getHitLimit().isPresent() && !indexerConfig.getDownloadLimit().isPresent()) { return true; } LocalDateTime compariso...
IndexerForSearchSelector { protected boolean checkIndexerHitLimit(Indexer indexer) { Stopwatch stopwatch = Stopwatch.createStarted(); IndexerConfig indexerConfig = indexer.getConfig(); if (!indexerConfig.getHitLimit().isPresent() && !indexerConfig.getDownloadLimit().isPresent()) { return true; } LocalDateTime compariso...
@Test(expected = MissingConfigException.class) public void missingUser() throws ParseException, MissingConfigException { String[] args = new String[] { "-pass", "password", "-s", "server", "-d", "localDir", "-port", "22" }; 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 testNonEmptyIncludeFieldConvert() { NeutralQuery neutralQuery = new NeutralQuery(); neutralQuery.setIncludeFieldString("name"); Query query = mongoQueryConverter.convert("section", neutralQuery); assertNotNull("Should not be null", query); DBObject obj = query.getFieldsObject(); assertNotNull("Should ...
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 = EmptyStackException.class) public void testEmptyHolderPop() { CurrentTenantHolder.pop(); }
public static String pop() { return getCurrentStack().pop(); }
CurrentTenantHolder { public static String pop() { return getCurrentStack().pop(); } }
CurrentTenantHolder { public static String pop() { return getCurrentStack().pop(); } }
CurrentTenantHolder { public static String pop() { return getCurrentStack().pop(); } static void push(String tenantId); static String pop(); static String getCurrentTenant(); }
CurrentTenantHolder { public static String pop() { return getCurrentStack().pop(); } static void push(String tenantId); static String pop(); static String getCurrentTenant(); }
@Test(expected = EmptyStackException.class) public void testEmptyHolderPeek() { CurrentTenantHolder.getCurrentTenant(); }
public static String getCurrentTenant() { return getCurrentStack().peek(); }
CurrentTenantHolder { public static String getCurrentTenant() { return getCurrentStack().peek(); } }
CurrentTenantHolder { public static String getCurrentTenant() { return getCurrentStack().peek(); } }
CurrentTenantHolder { public static String getCurrentTenant() { return getCurrentStack().peek(); } static void push(String tenantId); static String pop(); static String getCurrentTenant(); }
CurrentTenantHolder { public static String getCurrentTenant() { return getCurrentStack().peek(); } static void push(String tenantId); static String pop(); static String getCurrentTenant(); }
@Test public void testIgnoredOnSystemCall() { TenantContext.setIsSystemCall(true); deltaJournal.journal("test", "userSession", false); verify(template, never()).upsert(any(Query.class), any(Update.class), anyString()); TenantContext.setIsSystemCall(false); }
public void journal(Collection<String> ids, String collection, boolean isDelete) { if ( collection.equals("applicationAuthorization") ) { return; } if (deltasEnabled && !TenantContext.isSystemCall()) { if (subdocCollectionsToCollapse.containsKey(collection)) { journalCollapsedSubDocs(ids, collection); } long now = new ...
DeltaJournal implements InitializingBean { public void journal(Collection<String> ids, String collection, boolean isDelete) { if ( collection.equals("applicationAuthorization") ) { return; } if (deltasEnabled && !TenantContext.isSystemCall()) { if (subdocCollectionsToCollapse.containsKey(collection)) { journalCollapsed...
DeltaJournal implements InitializingBean { public void journal(Collection<String> ids, String collection, boolean isDelete) { if ( collection.equals("applicationAuthorization") ) { return; } if (deltasEnabled && !TenantContext.isSystemCall()) { if (subdocCollectionsToCollapse.containsKey(collection)) { journalCollapsed...
DeltaJournal implements InitializingBean { public void journal(Collection<String> ids, String collection, boolean isDelete) { if ( collection.equals("applicationAuthorization") ) { return; } if (deltasEnabled && !TenantContext.isSystemCall()) { if (subdocCollectionsToCollapse.containsKey(collection)) { journalCollapsed...
DeltaJournal implements InitializingBean { public void journal(Collection<String> ids, String collection, boolean isDelete) { if ( collection.equals("applicationAuthorization") ) { return; } if (deltasEnabled && !TenantContext.isSystemCall()) { if (subdocCollectionsToCollapse.containsKey(collection)) { journalCollapsed...
@Test public void testJournalCollapsedSubDocs() throws DecoderException { String assessment1id = "1234567890123456789012345678901234567890"; String assessment2id = "1234567890123456789012345678901234567892"; deltaJournal.journal( Arrays.asList(assessment1id + "_id1234567890123456789012345678901234567891_id", assessment...
public void journalCollapsedSubDocs(Collection<String> ids, String collection) { LOG.debug("journaling {} to {}", ids, subdocCollectionsToCollapse.get(collection)); Set<String> newIds = new HashSet<String>(); for (String id : ids) { newIds.add(id.split("_id")[0] + "_id"); } journal(newIds, subdocCollectionsToCollapse.g...
DeltaJournal implements InitializingBean { public void journalCollapsedSubDocs(Collection<String> ids, String collection) { LOG.debug("journaling {} to {}", ids, subdocCollectionsToCollapse.get(collection)); Set<String> newIds = new HashSet<String>(); for (String id : ids) { newIds.add(id.split("_id")[0] + "_id"); } jo...
DeltaJournal implements InitializingBean { public void journalCollapsedSubDocs(Collection<String> ids, String collection) { LOG.debug("journaling {} to {}", ids, subdocCollectionsToCollapse.get(collection)); Set<String> newIds = new HashSet<String>(); for (String id : ids) { newIds.add(id.split("_id")[0] + "_id"); } jo...
DeltaJournal implements InitializingBean { public void journalCollapsedSubDocs(Collection<String> ids, String collection) { LOG.debug("journaling {} to {}", ids, subdocCollectionsToCollapse.get(collection)); Set<String> newIds = new HashSet<String>(); for (String id : ids) { newIds.add(id.split("_id")[0] + "_id"); } jo...
DeltaJournal implements InitializingBean { public void journalCollapsedSubDocs(Collection<String> ids, String collection) { LOG.debug("journaling {} to {}", ids, subdocCollectionsToCollapse.get(collection)); Set<String> newIds = new HashSet<String>(); for (String id : ids) { newIds.add(id.split("_id")[0] + "_id"); } jo...
@Test public void testJournalPurge() { final long time = new Date().getTime(); deltaJournal.journalPurge(time); BaseMatcher<Update> updateMatcher = new BaseMatcher<Update>() { @Override public boolean matches(Object arg0) { @SuppressWarnings("unchecked") Map<String, Object> o = (Map<String, Object>) ((Update) arg0).get...
public void journalPurge(long timeOfPurge) { String id = uuidGeneratorStrategy.generateId(); Update update = new Update(); update.set("t", timeOfPurge); update.set("c", PURGE); TenantContext.setIsSystemCall(false); template.upsert(Query.query(where("_id").is(id)), update, DELTA_COLLECTION); }
DeltaJournal implements InitializingBean { public void journalPurge(long timeOfPurge) { String id = uuidGeneratorStrategy.generateId(); Update update = new Update(); update.set("t", timeOfPurge); update.set("c", PURGE); TenantContext.setIsSystemCall(false); template.upsert(Query.query(where("_id").is(id)), update, DELT...
DeltaJournal implements InitializingBean { public void journalPurge(long timeOfPurge) { String id = uuidGeneratorStrategy.generateId(); Update update = new Update(); update.set("t", timeOfPurge); update.set("c", PURGE); TenantContext.setIsSystemCall(false); template.upsert(Query.query(where("_id").is(id)), update, DELT...
DeltaJournal implements InitializingBean { public void journalPurge(long timeOfPurge) { String id = uuidGeneratorStrategy.generateId(); Update update = new Update(); update.set("t", timeOfPurge); update.set("c", PURGE); TenantContext.setIsSystemCall(false); template.upsert(Query.query(where("_id").is(id)), update, DELT...
DeltaJournal implements InitializingBean { public void journalPurge(long timeOfPurge) { String id = uuidGeneratorStrategy.generateId(); Update update = new Update(); update.set("t", timeOfPurge); update.set("c", PURGE); TenantContext.setIsSystemCall(false); template.upsert(Query.query(where("_id").is(id)), update, DELT...
@Test public void testGetByteId() throws DecoderException { String id = "1234567890123456789012345678901234567890"; String superid = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; String extraid = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; assertEquals(id, Hex.encodeHexString(DeltaJournal.getByteId(id + "_id").get(0))); ...
public static List<byte[]> getByteId(String id) { try { List<byte[]> result = new ArrayList<byte[]>(); int idLength = id.length(); if(idLength < 43) { LOG.error("Short ID encountered: {}", id); return Arrays.asList(id.getBytes()); } for(String idPart: id.split("_id")){ if(!idPart.isEmpty()){ idPart = idPart.replaceAll(...
DeltaJournal implements InitializingBean { public static List<byte[]> getByteId(String id) { try { List<byte[]> result = new ArrayList<byte[]>(); int idLength = id.length(); if(idLength < 43) { LOG.error("Short ID encountered: {}", id); return Arrays.asList(id.getBytes()); } for(String idPart: id.split("_id")){ if(!idP...
DeltaJournal implements InitializingBean { public static List<byte[]> getByteId(String id) { try { List<byte[]> result = new ArrayList<byte[]>(); int idLength = id.length(); if(idLength < 43) { LOG.error("Short ID encountered: {}", id); return Arrays.asList(id.getBytes()); } for(String idPart: id.split("_id")){ if(!idP...
DeltaJournal implements InitializingBean { public static List<byte[]> getByteId(String id) { try { List<byte[]> result = new ArrayList<byte[]>(); int idLength = id.length(); if(idLength < 43) { LOG.error("Short ID encountered: {}", id); return Arrays.asList(id.getBytes()); } for(String idPart: id.split("_id")){ if(!idP...
DeltaJournal implements InitializingBean { public static List<byte[]> getByteId(String id) { try { List<byte[]> result = new ArrayList<byte[]>(); int idLength = id.length(); if(idLength < 43) { LOG.error("Short ID encountered: {}", id); return Arrays.asList(id.getBytes()); } for(String idPart: id.split("_id")){ if(!idP...
@Test public void testGetEntityId() throws DecoderException { String id = "1234567890123456789012345678901234567890"; String superid = "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"; String extraid = "bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb"; Map<String, Object> delta = new HashMap<String, Object>(); delta.put("_id", Hex....
public static String getEntityId(Map<String, Object> deltaRecord) { Object deltaId = deltaRecord.get("_id"); if(deltaId instanceof String){ return (String) deltaId; } else if (deltaId instanceof byte[]) { StringBuilder id = new StringBuilder(""); @SuppressWarnings("unchecked") List<byte[]> parts = (List<byte[]>) deltaR...
DeltaJournal implements InitializingBean { public static String getEntityId(Map<String, Object> deltaRecord) { Object deltaId = deltaRecord.get("_id"); if(deltaId instanceof String){ return (String) deltaId; } else if (deltaId instanceof byte[]) { StringBuilder id = new StringBuilder(""); @SuppressWarnings("unchecked")...
DeltaJournal implements InitializingBean { public static String getEntityId(Map<String, Object> deltaRecord) { Object deltaId = deltaRecord.get("_id"); if(deltaId instanceof String){ return (String) deltaId; } else if (deltaId instanceof byte[]) { StringBuilder id = new StringBuilder(""); @SuppressWarnings("unchecked")...
DeltaJournal implements InitializingBean { public static String getEntityId(Map<String, Object> deltaRecord) { Object deltaId = deltaRecord.get("_id"); if(deltaId instanceof String){ return (String) deltaId; } else if (deltaId instanceof byte[]) { StringBuilder id = new StringBuilder(""); @SuppressWarnings("unchecked")...
DeltaJournal implements InitializingBean { public static String getEntityId(Map<String, Object> deltaRecord) { Object deltaId = deltaRecord.get("_id"); if(deltaId instanceof String){ return (String) deltaId; } else if (deltaId instanceof byte[]) { StringBuilder id = new StringBuilder(""); @SuppressWarnings("unchecked")...
@Test public void testSingleInsert() { MongoEntity entity = new MongoEntity("studentSectionAssociation", studentSectionAssociation); assertTrue(underTest.subDoc("studentSectionAssociation").create(entity)); verify(sectionCollection).update(argThat(new ArgumentMatcher<DBObject>() { @Override public boolean matches(Objec...
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testMultipleInsert() { Entity ssa1 = new MongoEntity("studentSectionAssociation", studentSectionAssociation); Entity ssa2 = new MongoEntity("studentSectionAssociation", new HashMap<String, Object>( studentSectionAssociation)); ssa2.getBody().put("studentId", STUDENT2); Entity ssa3 = new MongoEntity("s...
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testNewLineCharacter() throws Throwable { Resource schema = new ClassPathResource("edfiXsd-SLI/SLI-Interchange-StudentParent.xsd"); Resource xml = new ClassPathResource("parser/InterchangeStudentParent/StudentWithNewLine.xml"); Resource expectedJson = new ClassPathResource("parser/InterchangeStudentPa...
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 testMakeSubDocQuery() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Query originalQuery = new Query(Criteria.where("_id").is("parent_idchild").and("someProperty").is("someValue")); DBObject parentQuery = underTest.subDoc("studentSectionAssociation").toSubDocQuery(or...
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testSearchByParentId() { Query originalQuery = new Query(Criteria.where("body.sectionId").in("parentId1", "parentId2")); DBObject parentQuery = underTest.subDoc("studentSectionAssociation").toSubDocQuery(originalQuery, true); assertEquals(new BasicDBObject("$in", Arrays.asList("parentId1", "parentId2"...
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testdoUpdate() { Query originalQuery = new Query(Criteria.where("_id").is("parent_idchild").and("someProperty").is("someValue")); Update update = new Update(); update.set("someProperty", "someNewValue"); boolean result = underTest.subDoc("studentSectionAssociation").doUpdate(originalQuery, update); as...
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testFindById() { Entity resultEntity = underTest.subDoc("studentSectionAssociation").findById("parent_idchild"); assertNotNull(resultEntity); assertEquals("parent_idchild", resultEntity.getEntityId()); assertEquals("someValue", resultEntity.getBody().get("someProperty")); }
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testFindAll() { Query originalQuery = new Query(Criteria.where("_id").is("parent_idchild").and("someProperty").is("someValue")) .skip(0).limit(1); List<Entity> entityResults = underTest.subDoc("studentSectionAssociation").findAll(originalQuery); assertNotNull(entityResults); assertEquals(1, entityResu...
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testDelete() { Entity entity = underTest.subDoc("studentSectionAssociation").findById("parent_idchild"); boolean result = underTest.subDoc("studentSectionAssociation").delete(entity); assertTrue(result); entity = underTest.subDoc("studentSectionAssociation").findById("nonExistId"); result = underTest....
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testCount() { Query originalQuery = new Query(Criteria.where("_id").is("parent_idchild").and("someProperty").is("someValue")); long count = underTest.subDoc("studentSectionAssociation").count(originalQuery); assertEquals(1L, count); originalQuery = new Query(Criteria.where("_id").is("parent_idchild")....
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testExists() { boolean exists = underTest.subDoc("studentSectionAssociation").exists("parent_idchild"); assertTrue(exists); boolean nonExists = underTest.subDoc("studentSectionAssociation").exists("nonExistId"); assertFalse(nonExists); }
public Location subDoc(String docType) { return locations.get(docType); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); }
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
SubDocAccessor { public Location subDoc(String docType) { return locations.get(docType); } SubDocAccessor(MongoTemplate template, UUIDGeneratorStrategy didGenerator, INaturalKeyExtractor naturalKeyExtractor); LocationBuilder store(String type); Location createLocation(String type, String paren...
@Test public void testCreate() { MongoEntity entity = new MongoEntity("studentSectionAssociation", studentSectionAssociation); entity.getMetaData().put("tenantId", "TEST"); assertTrue(denormalizer.denormalization("studentSectionAssociation").create(entity)); verify(studentCollection).update(eq(BasicDBObjectBuilder.star...
public Denormalization denormalization(String docType) { return denormalizations.get(docType); }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); DenormalizationBuilder denormalize(String type); boolean isDenormalizedDoc(String docType); Denormalization denormalization(String docType); boolean isCached(String docTy...
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); DenormalizationBuilder denormalize(String type); boolean isDenormalizedDoc(String docType); Denormalization denormalization(String docType); boolean isCached(String docTy...
@Test public void testInsert() { Entity entity1 = new MongoEntity("studentSectionAssociation", new HashMap<String, Object>(studentSectionAssociation)); entity1.getBody().put("sectionId", SECTION2); entity1.getBody().put("endDate", ENDDATE2); entity1.getMetaData().put("tenantId", "TEST"); Entity entity2 = new MongoEntit...
public Denormalization denormalization(String docType) { return denormalizations.get(docType); }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); DenormalizationBuilder denormalize(String type); boolean isDenormalizedDoc(String docType); Denormalization denormalization(String docType); boolean isCached(String docTy...
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); DenormalizationBuilder denormalize(String type); boolean isDenormalizedDoc(String docType); Denormalization denormalization(String docType); boolean isCached(String docTy...
@Test public void testUnicodeCharacter() throws Throwable { Resource schema = new ClassPathResource("edfiXsd-SLI/SLI-Interchange-StudentParent.xsd"); Resource xml = new ClassPathResource("parser/InterchangeStudentParent/StudentWithUnicode.xml"); Resource expectedJson = new ClassPathResource("parser/InterchangeStudentPa...
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 testDelete() { MongoEntity entity = new MongoEntity("studentSectionAssociation", studentSectionAssociation); boolean result = denormalizer.denormalization("studentSectionAssociation").delete(entity, entity.getEntityId()); assertTrue(result); result = denormalizer.denormalization("studentSectionAssocia...
public Denormalization denormalization(String docType) { return denormalizations.get(docType); }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); }
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); DenormalizationBuilder denormalize(String type); boolean isDenormalizedDoc(String docType); Denormalization denormalization(String docType); boolean isCached(String docTy...
Denormalizer { public Denormalization denormalization(String docType) { return denormalizations.get(docType); } Denormalizer(MongoTemplate template); DenormalizationBuilder denormalize(String type); boolean isDenormalizedDoc(String docType); Denormalization denormalization(String docType); boolean isCached(String docTy...
@Test public void upconvertNoAssessmentShouldRemoveInvalidReference() { List<Entity> old = Arrays.asList(createUpConvertEntity()); assertNotNull(old.get(0).getEmbeddedData().get("studentAssessmentItem")); Iterable<Entity> entity = saConverter.subdocToBodyField(old); assertNull(entity.iterator().next().getEmbeddedData()...
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retrieveAssessment(entity.getBody().get(ASSESSMENT_ID)); referenceEntityResolve(entity, assessm...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retr...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retr...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retr...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retr...
@Test public void testBodyFieldToSubdoc() { List<Entity> entities = Arrays.asList(createDownConvertEntity()); assertNotNull("studentAssessment body should have studentAssessmentItem", entities.get(0).getBody().get("studentAssessmentItems")); assertNull("studentAssessmentItem should not be outside the studentAssessment ...
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Ent...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Ent...
@SuppressWarnings("unchecked") @Test public void testSubdocDid() { List<Entity> entities = Arrays.asList(createDownConvertEntity()); assertNull( "studentAssessmentItem should not have id before transformation", ((List<Map<String, Object>>) (entities.get(0).getBody().get("studentAssessmentItems"))).get(0).get( "_id")); ...
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Ent...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Ent...
@SuppressWarnings("unchecked") @Test public void testUpConvertShouldCollapseAssessmentItem() { Entity saEntity = createUpConvertEntity(); saEntity.getBody().put("assessmentId", "assessmentId"); saEntity.getBody().put("studentId", "studentId"); List<Entity> old = Arrays.asList(saEntity); assertNull("studentAssessmentIte...
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retrieveAssessment(entity.getBody().get(ASSESSMENT_ID)); referenceEntityResolve(entity, assessm...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retr...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retr...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retr...
StudentAssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(STUDENT_ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } Entity assessment = retr...
@Test public void testIsContainerDocument() { when(mockHolder.isContainerDocument(ATTENDANCE)).thenReturn(true); boolean actual = testAccessor.isContainerDocument(ATTENDANCE); assertEquals(true, actual); }
public boolean isContainerDocument(final String entity) { return containerDocumentHolder.isContainerDocument(entity); }
ContainerDocumentAccessor { public boolean isContainerDocument(final String entity) { return containerDocumentHolder.isContainerDocument(entity); } }
ContainerDocumentAccessor { public boolean isContainerDocument(final String entity) { return containerDocumentHolder.isContainerDocument(entity); } ContainerDocumentAccessor(final UUIDGeneratorStrategy strategy, final INaturalKeyExtractor extractor, final MongoTemplate mongoTemplate...
ContainerDocumentAccessor { public boolean isContainerDocument(final String entity) { return containerDocumentHolder.isContainerDocument(entity); } ContainerDocumentAccessor(final UUIDGeneratorStrategy strategy, final INaturalKeyExtractor extractor, final MongoTemplate mongoTemplate...
ContainerDocumentAccessor { public boolean isContainerDocument(final String entity) { return containerDocumentHolder.isContainerDocument(entity); } ContainerDocumentAccessor(final UUIDGeneratorStrategy strategy, final INaturalKeyExtractor extractor, final MongoTemplate mongoTemplate...
@Test public void isContainerSubDoc() { final ContainerDocument cDoc2 = createContainerDocGrade(); when(mockHolder.isContainerDocument(ATTENDANCE)).thenReturn(true); when(mockHolder.isContainerDocument(GRADE)).thenReturn(true); when(mockHolder.getContainerDocument(GRADE)).thenReturn(cDoc2); assertFalse(testAccessor.isC...
public boolean isContainerSubdoc(final String entity) { boolean isContainerSubdoc = false; if (containerDocumentHolder.isContainerDocument(entity)) { isContainerSubdoc = containerDocumentHolder.getContainerDocument(entity).isContainerSubdoc(); } return isContainerSubdoc; }
ContainerDocumentAccessor { public boolean isContainerSubdoc(final String entity) { boolean isContainerSubdoc = false; if (containerDocumentHolder.isContainerDocument(entity)) { isContainerSubdoc = containerDocumentHolder.getContainerDocument(entity).isContainerSubdoc(); } return isContainerSubdoc; } }
ContainerDocumentAccessor { public boolean isContainerSubdoc(final String entity) { boolean isContainerSubdoc = false; if (containerDocumentHolder.isContainerDocument(entity)) { isContainerSubdoc = containerDocumentHolder.getContainerDocument(entity).isContainerSubdoc(); } return isContainerSubdoc; } ContainerDocumentA...
ContainerDocumentAccessor { public boolean isContainerSubdoc(final String entity) { boolean isContainerSubdoc = false; if (containerDocumentHolder.isContainerDocument(entity)) { isContainerSubdoc = containerDocumentHolder.getContainerDocument(entity).isContainerSubdoc(); } return isContainerSubdoc; } ContainerDocumentA...
ContainerDocumentAccessor { public boolean isContainerSubdoc(final String entity) { boolean isContainerSubdoc = false; if (containerDocumentHolder.isContainerDocument(entity)) { isContainerSubdoc = containerDocumentHolder.getContainerDocument(entity).isContainerSubdoc(); } return isContainerSubdoc; } ContainerDocumentA...
@Test public void testInsert() { DBObject query = Mockito.mock(DBObject.class); DBObject docToPersist = ContainerDocumentHelper.buildDocumentToPersist(mockHolder, entity, generatorStrategy, naturalKeyExtractor); when(query.get("_id")).thenReturn(ID); when(mockHolder.getContainerDocument(ATTENDANCE)).thenReturn(createCo...
public boolean insert(final List<Entity> entityList) { boolean result = true; for (Entity entity : entityList) { result &= !insert(entity).isEmpty(); } return result; }
ContainerDocumentAccessor { public boolean insert(final List<Entity> entityList) { boolean result = true; for (Entity entity : entityList) { result &= !insert(entity).isEmpty(); } return result; } }
ContainerDocumentAccessor { public boolean insert(final List<Entity> entityList) { boolean result = true; for (Entity entity : entityList) { result &= !insert(entity).isEmpty(); } return result; } ContainerDocumentAccessor(final UUIDGeneratorStrategy strategy, final INaturalKeyExtractor extractor, ...
ContainerDocumentAccessor { public boolean insert(final List<Entity> entityList) { boolean result = true; for (Entity entity : entityList) { result &= !insert(entity).isEmpty(); } return result; } ContainerDocumentAccessor(final UUIDGeneratorStrategy strategy, final INaturalKeyExtractor extractor, ...
ContainerDocumentAccessor { public boolean insert(final List<Entity> entityList) { boolean result = true; for (Entity entity : entityList) { result &= !insert(entity).isEmpty(); } return result; } ContainerDocumentAccessor(final UUIDGeneratorStrategy strategy, final INaturalKeyExtractor extractor, ...
@Test public void testDeleteEntity() { ContainerDocumentAccessor cda = Mockito.spy(testAccessor); Map<String, Object> updateDocCriteria = new HashMap<String, Object>(); updateDocCriteria.put("event", "Tardy"); DBObject pullObject = BasicDBObjectBuilder.start().push("$pull").add("body.attendanceEvent", updateDocCriteria...
@SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody().get(embeddedDocType); Stri...
ContainerDocumentAccessor { @SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody(...
ContainerDocumentAccessor { @SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody(...
ContainerDocumentAccessor { @SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody(...
ContainerDocumentAccessor { @SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody(...
@Test public void testDeleteEntityAndContainerDoc() { ContainerDocumentAccessor cda = Mockito.spy(testAccessor); Map<String, Object> updateDocCriteria = new HashMap<String, Object>(); updateDocCriteria.put("event", "Tardy"); DBObject pullObject = BasicDBObjectBuilder.start().push("$pull").add("body.attendanceEvent", up...
@SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody().get(embeddedDocType); Stri...
ContainerDocumentAccessor { @SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody(...
ContainerDocumentAccessor { @SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody(...
ContainerDocumentAccessor { @SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody(...
ContainerDocumentAccessor { @SuppressWarnings("unchecked") public boolean deleteContainerNonSubDocs(final Entity containerDoc) { String collection = containerDoc.getType(); String embeddedDocType = getEmbeddedDocType(collection); List<Map<String, Object>> embeddedDocs = (List<Map<String, Object>>) containerDoc.getBody(...
@Test public void testCDATA() throws Throwable { Resource schema = new ClassPathResource("edfiXsd-SLI/SLI-Interchange-StudentParent.xsd"); Resource xml = new ClassPathResource("parser/InterchangeStudentParent/StudentWithCDATA.xml"); Resource expectedJson = new ClassPathResource("parser/InterchangeStudentParent/StudentW...
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 upconvertShouldRemoveAPD_references() { Entity oldEntity = createUpConvertEntity(); Entity entity = assessmentConverter.subdocToBodyField(oldEntity); assertNull(entity.getBody().get("assessmentPeriodDescriptorId")); }
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsToBody(entity, ASSESSMENT_ITEM, ASSESSMENT_ITEM, Arrays.asList(ASSESSMENT_ID)); subdoc...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
@Test public void upconvertNoEmbeddedSubdocShouldRemainUnchanged() { List<Entity> old = Arrays.asList(createDownConvertEntity()); Entity clone = createDownConvertEntity(); Iterable<Entity> entity = assessmentConverter.subdocToBodyField(old); assertEquals(clone.getBody(), entity.iterator().next().getBody()); }
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsToBody(entity, ASSESSMENT_ITEM, ASSESSMENT_ITEM, Arrays.asList(ASSESSMENT_ID)); subdoc...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
@Test public void upconvertShouldConstructAssessmentFamilyHierarchy() { Entity oldEntity = createUpConvertEntity(); Entity entity = assessmentConverter.subdocToBodyField(oldEntity); assertNull(entity.getBody().get(ASSESSMENT_FAMILY_REFERENCE)); assertEquals("A.B.C", entity.getBody().get(ASSESSMENT_FAMILY_HIERARCHY)); }
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsToBody(entity, ASSESSMENT_ITEM, ASSESSMENT_ITEM, Arrays.asList(ASSESSMENT_ID)); subdoc...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
@Test public void downconvertShouldDeleteAssessmentFamilyHierarchy() { Entity entity = createDownConvertEntity(); assessmentConverter.bodyFieldToSubdoc(entity); assertNull(entity.getBody().get(ASSESSMENT_FAMILY_HIERARCHY)); }
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
@Test public void downconvertShouldDeleteAssessmentFamilyHierarchyExistingAssessment() { Entity existingAssessment = createDownConvertEntity(); existingAssessment.getBody().put(ASSESSMENT_FAMILY_REFERENCE, assessmentFamilyA.getEntityId()); when(template.findById(existingAssessment.getEntityId(), Entity.class, EntityNam...
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
@SuppressWarnings("unchecked") @Test public void upconvertEmbeddedSubdocShouldMoveInsideBody() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Entity oldEntity = createUpConvertEntity(); Entity clone = createUpConvertEntity(); assertNull(oldEntity.getBody().get("assessmentItem")); Enti...
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsToBody(entity, ASSESSMENT_ITEM, ASSESSMENT_ITEM, Arrays.asList(ASSESSMENT_ID)); subdoc...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
@Test public void downconvertBodyHasNoSubdocShouldNotChange() throws NoNaturalKeysDefinedException { List<Entity> entity = Arrays.asList(createUpConvertEntity()); Entity clone = createUpConvertEntity(); assessmentConverter.bodyFieldToSubdoc(entity); assertEquals(clone.getBody(), entity.get(0).getBody()); }
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
@Test public void downconvertBodyToSubdoc() { Entity entity = createDownConvertEntity(); assessmentConverter.bodyFieldToSubdoc(entity); assertNull(entity.getBody().get("assessmentItem")); assertNotNull(entity.getEmbeddedData().get("assessmentItem")); assertNull(entity.getBody().get("assessmentPeriodDescriptor")); asser...
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
@Test public void bodyToSubdocGenerateId() { Entity entity = createDownConvertEntity(); assessmentConverter.bodyFieldToSubdoc(entity); assertNotNull("should move assessmentItem from in body to out body", entity.getEmbeddedData().get("assessmentItem")); assertEquals("should have one assessmentItem in subdoc field", 1, e...
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
@Test public void invalidApdIdShouldBeFilteredOutInUp() { when(template.findById("mydescriptorid", Entity.class, EntityNames.ASSESSMENT_PERIOD_DESCRIPTOR)).thenReturn(null); Entity old = createUpConvertEntity(); Entity entity = assessmentConverter.subdocToBodyField(Arrays.asList(old)).iterator().next(); assertNull(enti...
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsToBody(entity, ASSESSMENT_ITEM, ASSESSMENT_ITEM, Arrays.asList(ASSESSMENT_ID)); subdoc...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
@Test public void testCreateSimpleWorkNote() { FileEntryWorkNote workNote = new FileEntryWorkNote("batchJobId", null, false); Assert.assertEquals("batchJobId", workNote.getBatchJobId()); Assert.assertEquals(null, workNote.getFileEntry()); }
public IngestionFileEntry getFileEntry() { return fileEntry; }
FileEntryWorkNote extends WorkNote implements Serializable { public IngestionFileEntry getFileEntry() { return fileEntry; } }
FileEntryWorkNote extends WorkNote implements Serializable { public IngestionFileEntry getFileEntry() { return fileEntry; } FileEntryWorkNote(String batchJobId, IngestionFileEntry fileEntry, boolean hasErrors); }
FileEntryWorkNote extends WorkNote implements Serializable { public IngestionFileEntry getFileEntry() { return fileEntry; } FileEntryWorkNote(String batchJobId, IngestionFileEntry fileEntry, boolean hasErrors); IngestionFileEntry getFileEntry(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ...
FileEntryWorkNote extends WorkNote implements Serializable { public IngestionFileEntry getFileEntry() { return fileEntry; } FileEntryWorkNote(String batchJobId, IngestionFileEntry fileEntry, boolean hasErrors); IngestionFileEntry getFileEntry(); @Override int hashCode(); @Override boolean equals(Object obj); @Override ...
@Test @SuppressWarnings("unchecked") public void testHierachyInObjectiveAssessmentsToAPI() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Entity oldAssessment = createHierarchicalUpConvertEntity(); Entity assessment = assessmentConverter.subdocToBodyField(oldAssessment); List<Map<Stri...
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsToBody(entity, ASSESSMENT_ITEM, ASSESSMENT_ITEM, Arrays.asList(ASSESSMENT_ID)); subdoc...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
@Test public void testHierachyInObjectiveAssessmentsToDAL() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Entity assessment = createHierarchicalDownConvertEntity(); assessmentConverter.bodyFieldToSubdoc(assessment); assertEquals("ParentOA", PropertyUtils.getProperty(assessment, "embe...
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
@Test public void testAssessmentsWithAIsInOAsToAPI() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Entity oldAssessment = createHierarchicalUpConvertEntity(); Entity assessment = assessmentConverter.subdocToBodyField(oldAssessment); assertEquals("somevalue1", PropertyUtils.getPropert...
@Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsToBody(entity, ASSESSMENT_ITEM, ASSESSMENT_ITEM, Arrays.asList(ASSESSMENT_ID)); subdoc...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public Entity subdocToBodyField(Entity entity) { if (entity != null && entity.getType().equals(ASSESSMENT)) { if (entity.getBody() == null || entity.getBody().isEmpty()) { return null; } transformToHierarchy(entity); subdocsTo...
@Test public void testAssessmentsWithAIsInOAsToDAL() throws IllegalAccessException, InvocationTargetException, NoSuchMethodException { Entity assessment = createHierarchicalDownConvertEntity(); assessmentConverter.bodyFieldToSubdoc(assessment); assertEquals("1", PropertyUtils.getProperty(assessment, "embeddedData.asses...
@Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } }
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
AssessmentConverter extends GenericSuperdocConverter implements SuperdocConverter { @Override public void bodyFieldToSubdoc(Entity entity) { bodyFieldToSubdoc(entity, null); } @Override Entity subdocToBodyField(Entity entity); @Override void bodyFieldToSubdoc(Entity entity); @Override void bodyFieldToSubdoc(Entity ent...
@Test public void testEntityConvert() throws NoNaturalKeysDefinedException { Entity e = Mockito.mock(Entity.class); HashMap<String, Object> body = new HashMap<String, Object>(); body.put("field1", "field1"); body.put("field2", "field2"); HashMap<String, Object> meta = new HashMap<String, Object>(); meta.put("meta1", "f...
@Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (encrypt != null) { me.encrypt(encrypt); } return me.toDBObject(...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
@Test public void testMockMongoEntityConvert() { MongoEntity e = Mockito.mock(MongoEntity.class); DBObject result = Mockito.mock(DBObject.class); Mockito.when(e.toDBObject(uuidGeneratorStrategy, naturalKeyExtractor)).thenReturn(result); DBObject d = converter.convert(e); Assert.assertNotNull(d); Assert.assertEquals(res...
@Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (encrypt != null) { me.encrypt(encrypt); } return me.toDBObject(...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
@Test public void testMongoEntityConvert() { HashMap<String, Object> body = new HashMap<String, Object>(); body.put("field1", "field1"); body.put("field2", "field2"); HashMap<String, Object> meta = new HashMap<String, Object>(); meta.put("meta1", "field1"); meta.put("meta2", "field2"); MongoEntity e = new MongoEntity("...
@Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (encrypt != null) { me.encrypt(encrypt); } return me.toDBObject(...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
EntityWriteConverter implements Converter<Entity, DBObject> { @Override public DBObject convert(Entity e) { MongoEntity me; if (e instanceof MongoEntity) { me = (MongoEntity) e; } else { me = new MongoEntity(e.getType(), e.getEntityId(), e.getBody(), e.getMetaData(), e.getCalculatedValues(), e.getAggregates()); } if (e...
@Test public void testReadPreference() { template.setReadPreference(ReadPreference.secondary()); Query query = new Query(); template.findEach(query, Entity.class, "student"); Assert.assertEquals(ReadPreference.secondary(), template.getCollection("student").getReadPreference()); }
public <T> Iterator<T> findEach(final Query query, final Class<T> entityClass, String collectionName) { MongoPersistentEntity<?> entity = mappingContext.getPersistentEntity(entityClass); DBCollection collection = getDb().getCollection(collectionName); prepareCollection(collection); DBObject dbQuery = mapper.getMappedOb...
MongoEntityTemplate extends MongoTemplate { public <T> Iterator<T> findEach(final Query query, final Class<T> entityClass, String collectionName) { MongoPersistentEntity<?> entity = mappingContext.getPersistentEntity(entityClass); DBCollection collection = getDb().getCollection(collectionName); prepareCollection(collec...
MongoEntityTemplate extends MongoTemplate { public <T> Iterator<T> findEach(final Query query, final Class<T> entityClass, String collectionName) { MongoPersistentEntity<?> entity = mappingContext.getPersistentEntity(entityClass); DBCollection collection = getDb().getCollection(collectionName); prepareCollection(collec...
MongoEntityTemplate extends MongoTemplate { public <T> Iterator<T> findEach(final Query query, final Class<T> entityClass, String collectionName) { MongoPersistentEntity<?> entity = mappingContext.getPersistentEntity(entityClass); DBCollection collection = getDb().getCollection(collectionName); prepareCollection(collec...
MongoEntityTemplate extends MongoTemplate { public <T> Iterator<T> findEach(final Query query, final Class<T> entityClass, String collectionName) { MongoPersistentEntity<?> entity = mappingContext.getPersistentEntity(entityClass); DBCollection collection = getDb().getCollection(collectionName); prepareCollection(collec...
@Test(expected = RuntimeException.class) public void testUnhandled() { aes.encrypt(1.1F); }
@Override public String encrypt(Object data) { if (data instanceof String) { return "ESTRING:" + encryptFromBytes(StringUtils.getBytesUtf8((String) data)); } else { ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(); DataOutputStream dos = new DataOutputStream(byteOutputStream); String type; try { if ...
AesCipher implements org.slc.sli.dal.encrypt.Cipher { @Override public String encrypt(Object data) { if (data instanceof String) { return "ESTRING:" + encryptFromBytes(StringUtils.getBytesUtf8((String) data)); } else { ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(); DataOutputStream dos = new Data...
AesCipher implements org.slc.sli.dal.encrypt.Cipher { @Override public String encrypt(Object data) { if (data instanceof String) { return "ESTRING:" + encryptFromBytes(StringUtils.getBytesUtf8((String) data)); } else { ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(); DataOutputStream dos = new Data...
AesCipher implements org.slc.sli.dal.encrypt.Cipher { @Override public String encrypt(Object data) { if (data instanceof String) { return "ESTRING:" + encryptFromBytes(StringUtils.getBytesUtf8((String) data)); } else { ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(); DataOutputStream dos = new Data...
AesCipher implements org.slc.sli.dal.encrypt.Cipher { @Override public String encrypt(Object data) { if (data instanceof String) { return "ESTRING:" + encryptFromBytes(StringUtils.getBytesUtf8((String) data)); } else { ByteArrayOutputStream byteOutputStream = new ByteArrayOutputStream(); DataOutputStream dos = new Data...
@Test() public void testUnencryptedString() { Object decrypted = aes.decrypt("Some text"); assertEquals(null, decrypted); Object d2 = aes.decrypt("SOME DATA WITH : IN IT"); assertEquals(null, d2); }
@Override public Object decrypt(String data) { String[] splitData = org.apache.commons.lang3.StringUtils.split(data, ':'); if (splitData.length != 2) { return null; } else { if (splitData[0].equals("ESTRING")) { return StringUtils.newStringUtf8(decryptToBytes(splitData[1])); } else if (splitData[0].equals("EBOOL")) { r...
AesCipher implements org.slc.sli.dal.encrypt.Cipher { @Override public Object decrypt(String data) { String[] splitData = org.apache.commons.lang3.StringUtils.split(data, ':'); if (splitData.length != 2) { return null; } else { if (splitData[0].equals("ESTRING")) { return StringUtils.newStringUtf8(decryptToBytes(splitD...
AesCipher implements org.slc.sli.dal.encrypt.Cipher { @Override public Object decrypt(String data) { String[] splitData = org.apache.commons.lang3.StringUtils.split(data, ':'); if (splitData.length != 2) { return null; } else { if (splitData[0].equals("ESTRING")) { return StringUtils.newStringUtf8(decryptToBytes(splitD...
AesCipher implements org.slc.sli.dal.encrypt.Cipher { @Override public Object decrypt(String data) { String[] splitData = org.apache.commons.lang3.StringUtils.split(data, ':'); if (splitData.length != 2) { return null; } else { if (splitData[0].equals("ESTRING")) { return StringUtils.newStringUtf8(decryptToBytes(splitD...
AesCipher implements org.slc.sli.dal.encrypt.Cipher { @Override public Object decrypt(String data) { String[] splitData = org.apache.commons.lang3.StringUtils.split(data, ':'); if (splitData.length != 2) { return null; } else { if (splitData[0].equals("ESTRING")) { return StringUtils.newStringUtf8(decryptToBytes(splitD...
@Test public void shouldGetTenantIdFromLzPath() { Entity tenantRecord = createTenantEntity(); when(mockRepository.findOne(Mockito.eq("tenant"), Mockito.any(NeutralQuery.class))).thenReturn(tenantRecord); String tenantIdResult = tenantDA.getTenantId(lzPath1); assertNotNull("tenantIdResult was null", tenantIdResult); ass...
@Override public String getTenantId(String lzPath) { return findTenantIdByLzPath(lzPath); }
TenantMongoDA implements TenantDA { @Override public String getTenantId(String lzPath) { return findTenantIdByLzPath(lzPath); } }
TenantMongoDA implements TenantDA { @Override public String getTenantId(String lzPath) { return findTenantIdByLzPath(lzPath); } }
TenantMongoDA implements TenantDA { @Override public String getTenantId(String lzPath) { return findTenantIdByLzPath(lzPath); } @Override List<String> getLzPaths(); @Override String getTenantId(String lzPath); @Override void insertTenant(TenantRecord tenant); @Override @SuppressWarnings("unchecked") String getTenantEd...
TenantMongoDA implements TenantDA { @Override public String getTenantId(String lzPath) { return findTenantIdByLzPath(lzPath); } @Override List<String> getLzPaths(); @Override String getTenantId(String lzPath); @Override void insertTenant(TenantRecord tenant); @Override @SuppressWarnings("unchecked") String getTenantEd...
@Test public void testGetAllConfigByType() { configManager = new ConfigManagerImpl(); configManager.setApiClient(apiClient); configManager.setDriverConfigLocation("config"); configManager.setUserConfigLocation("custom"); Map<String, String> params = new HashMap<String, String>(); params.put("type", "PANEL"); String edO...
@Override public Map<String, Collection<Config>> getAllConfigByType(String token, EdOrgKey edOrgKey, Map<String, String> params) { Map<String, Collection<Config>> allConfigs = new HashMap<String, Collection<Config>>(); Set<String> configIdLookup = new HashSet<String>(); Map<String, String> attribute = new HashMap<Strin...
ConfigManagerImpl extends ApiClientManager implements ConfigManager { @Override public Map<String, Collection<Config>> getAllConfigByType(String token, EdOrgKey edOrgKey, Map<String, String> params) { Map<String, Collection<Config>> allConfigs = new HashMap<String, Collection<Config>>(); Set<String> configIdLookup = ne...
ConfigManagerImpl extends ApiClientManager implements ConfigManager { @Override public Map<String, Collection<Config>> getAllConfigByType(String token, EdOrgKey edOrgKey, Map<String, String> params) { Map<String, Collection<Config>> allConfigs = new HashMap<String, Collection<Config>>(); Set<String> configIdLookup = ne...
ConfigManagerImpl extends ApiClientManager implements ConfigManager { @Override public Map<String, Collection<Config>> getAllConfigByType(String token, EdOrgKey edOrgKey, Map<String, String> params) { Map<String, Collection<Config>> allConfigs = new HashMap<String, Collection<Config>>(); Set<String> configIdLookup = ne...
ConfigManagerImpl extends ApiClientManager implements ConfigManager { @Override public Map<String, Collection<Config>> getAllConfigByType(String token, EdOrgKey edOrgKey, Map<String, String> params) { Map<String, Collection<Config>> allConfigs = new HashMap<String, Collection<Config>>(); Set<String> configIdLookup = ne...
@Test public void testGetUserEdOrg() { this.testInstitutionalHierarchyManagerImpl = new UserEdOrgManagerImpl() { @Override public String getToken() { return ""; } @Override protected boolean isEducator() { return false; } }; this.testInstitutionalHierarchyManagerImpl.setApiClient(apiClient); EdOrgKey edOrgKey1 = this.t...
@Override @CacheableUserData public EdOrgKey getUserEdOrg(String token) { GenericEntity edOrg = null; if (!isEducator()) { String id = getApiClient().getId(token); GenericEntity staff = getApiClient().getStaffWithEducationOrganization(token, id, null); if (staff != null) { GenericEntity staffEdOrg = (GenericEntity) sta...
UserEdOrgManagerImpl extends ApiClientManager implements UserEdOrgManager { @Override @CacheableUserData public EdOrgKey getUserEdOrg(String token) { GenericEntity edOrg = null; if (!isEducator()) { String id = getApiClient().getId(token); GenericEntity staff = getApiClient().getStaffWithEducationOrganization(token, id...
UserEdOrgManagerImpl extends ApiClientManager implements UserEdOrgManager { @Override @CacheableUserData public EdOrgKey getUserEdOrg(String token) { GenericEntity edOrg = null; if (!isEducator()) { String id = getApiClient().getId(token); GenericEntity staff = getApiClient().getStaffWithEducationOrganization(token, id...
UserEdOrgManagerImpl extends ApiClientManager implements UserEdOrgManager { @Override @CacheableUserData public EdOrgKey getUserEdOrg(String token) { GenericEntity edOrg = null; if (!isEducator()) { String id = getApiClient().getId(token); GenericEntity staff = getApiClient().getStaffWithEducationOrganization(token, id...
UserEdOrgManagerImpl extends ApiClientManager implements UserEdOrgManager { @Override @CacheableUserData public EdOrgKey getUserEdOrg(String token) { GenericEntity edOrg = null; if (!isEducator()) { String id = getApiClient().getId(token); GenericEntity staff = getApiClient().getStaffWithEducationOrganization(token, id...
@Test public void test() { GenericEntity entity = new GenericEntity(); GenericEntity element = new GenericEntity(); element.put("tire", "Yokohama"); entity.put("car", element); assertEquals("{\"car\":{\"tire\":\"Yokohama\"}}", JsonConverter.toJson(entity)); }
public static String toJson(Object o) { return GSON.toJson(o); }
JsonConverter { public static String toJson(Object o) { return GSON.toJson(o); } }
JsonConverter { public static String toJson(Object o) { return GSON.toJson(o); } }
JsonConverter { public static String toJson(Object o) { return GSON.toJson(o); } static String toJson(Object o); static T fromJson(String json, Class<T> clazz); static T fromJson(Reader reader, Class<T> clazz); }
JsonConverter { public static String toJson(Object o) { return GSON.toJson(o); } static String toJson(Object o); static T fromJson(String json, Class<T> clazz); static T fromJson(Reader reader, Class<T> clazz); }
@Test public void testSort() { List<GenericEntity> entities = new LinkedList<GenericEntity>(); List<LinkedHashMap<String, Object>> studentParentsAssocistion = new LinkedList<LinkedHashMap<String, Object>>(); LinkedHashMap<String, Object> obj = new LinkedHashMap<String, Object>(); obj.put(Constants.ATTR_RELATION, "Fathe...
public static List<GenericEntity> sort(List<GenericEntity> genericEntities) { for (GenericEntity genericEntity : genericEntities) { List<Map<String, Object>> studentParentAssociations = (List<Map<String, Object>>) genericEntity .get(Constants.ATTR_STUDENT_PARENT_ASSOCIATIONS); if (studentParentAssociations != null && !...
ParentsSorter { public static List<GenericEntity> sort(List<GenericEntity> genericEntities) { for (GenericEntity genericEntity : genericEntities) { List<Map<String, Object>> studentParentAssociations = (List<Map<String, Object>>) genericEntity .get(Constants.ATTR_STUDENT_PARENT_ASSOCIATIONS); if (studentParentAssociati...
ParentsSorter { public static List<GenericEntity> sort(List<GenericEntity> genericEntities) { for (GenericEntity genericEntity : genericEntities) { List<Map<String, Object>> studentParentAssociations = (List<Map<String, Object>>) genericEntity .get(Constants.ATTR_STUDENT_PARENT_ASSOCIATIONS); if (studentParentAssociati...
ParentsSorter { public static List<GenericEntity> sort(List<GenericEntity> genericEntities) { for (GenericEntity genericEntity : genericEntities) { List<Map<String, Object>> studentParentAssociations = (List<Map<String, Object>>) genericEntity .get(Constants.ATTR_STUDENT_PARENT_ASSOCIATIONS); if (studentParentAssociati...
ParentsSorter { public static List<GenericEntity> sort(List<GenericEntity> genericEntities) { for (GenericEntity genericEntity : genericEntities) { List<Map<String, Object>> studentParentAssociations = (List<Map<String, Object>>) genericEntity .get(Constants.ATTR_STUDENT_PARENT_ASSOCIATIONS); if (studentParentAssociati...
@Test public void testEnhanceStudent() { GenericEntity entity = new GenericEntity(); entity.put("gradeLevel", "Adult Education"); entity = GenericEntityEnhancer.enhanceStudent(entity); Assert.assertEquals(entity.get("gradeLevelCode"), "AE"); entity = new GenericEntity(); entity.put("gradeLevel", "Early Education"); ent...
public static GenericEntity enhanceStudent(GenericEntity entity) { String gradeLevel = entity.getString("gradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("gradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; }
GenericEntityEnhancer { public static GenericEntity enhanceStudent(GenericEntity entity) { String gradeLevel = entity.getString("gradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("gradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; } }
GenericEntityEnhancer { public static GenericEntity enhanceStudent(GenericEntity entity) { String gradeLevel = entity.getString("gradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("gradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; } }
GenericEntityEnhancer { public static GenericEntity enhanceStudent(GenericEntity entity) { String gradeLevel = entity.getString("gradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("gradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; } static GenericEntity enha...
GenericEntityEnhancer { public static GenericEntity enhanceStudent(GenericEntity entity) { String gradeLevel = entity.getString("gradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("gradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; } static GenericEntity enha...
@Test public void testEnhanceStudentSchoolAssociation() { GenericEntity entity = new GenericEntity(); entity.put("entryGradeLevel", "Adult Education"); entity = GenericEntityEnhancer.enhanceStudentSchoolAssociation(entity); Assert.assertEquals(entity.get("entryGradeLevelCode"), "AE"); entity = new GenericEntity(); enti...
public static GenericEntity enhanceStudentSchoolAssociation(GenericEntity entity) { String gradeLevel = entity.getString("entryGradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("entryGradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; }
GenericEntityEnhancer { public static GenericEntity enhanceStudentSchoolAssociation(GenericEntity entity) { String gradeLevel = entity.getString("entryGradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("entryGradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; }...
GenericEntityEnhancer { public static GenericEntity enhanceStudentSchoolAssociation(GenericEntity entity) { String gradeLevel = entity.getString("entryGradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("entryGradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; }...
GenericEntityEnhancer { public static GenericEntity enhanceStudentSchoolAssociation(GenericEntity entity) { String gradeLevel = entity.getString("entryGradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("entryGradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; }...
GenericEntityEnhancer { public static GenericEntity enhanceStudentSchoolAssociation(GenericEntity entity) { String gradeLevel = entity.getString("entryGradeLevel"); if (gradeLevel != null && gradeConversion.containsKey(gradeLevel)) { entity.put("entryGradeLevelCode", gradeConversion.get(gradeLevel)); } return entity; }...
@Test public void testIsSecuredRequest() throws Exception { LOG.debug("[SLCAuthenticationEntryPointTest]Secure Protocol with local environment, return FALSE"); when(request.getServerName()).thenReturn("local.slidev.org"); when(request.isSecure()).thenReturn(true); assertFalse(SLIAuthenticationEntryPoint.isSecureRequest...
static boolean isSecureRequest(HttpServletRequest request) { String serverName = request.getServerName(); boolean isSecureEnvironment = (!serverName.substring(0, serverName.indexOf(".")).equals( NONSECURE_ENVIRONMENT_NAME)); return (request.isSecure() && isSecureEnvironment); }
SLIAuthenticationEntryPoint implements AuthenticationEntryPoint { static boolean isSecureRequest(HttpServletRequest request) { String serverName = request.getServerName(); boolean isSecureEnvironment = (!serverName.substring(0, serverName.indexOf(".")).equals( NONSECURE_ENVIRONMENT_NAME)); return (request.isSecure() &&...
SLIAuthenticationEntryPoint implements AuthenticationEntryPoint { static boolean isSecureRequest(HttpServletRequest request) { String serverName = request.getServerName(); boolean isSecureEnvironment = (!serverName.substring(0, serverName.indexOf(".")).equals( NONSECURE_ENVIRONMENT_NAME)); return (request.isSecure() &&...
SLIAuthenticationEntryPoint implements AuthenticationEntryPoint { static boolean isSecureRequest(HttpServletRequest request) { String serverName = request.getServerName(); boolean isSecureEnvironment = (!serverName.substring(0, serverName.indexOf(".")).equals( NONSECURE_ENVIRONMENT_NAME)); return (request.isSecure() &&...
SLIAuthenticationEntryPoint implements AuthenticationEntryPoint { static boolean isSecureRequest(HttpServletRequest request) { String serverName = request.getServerName(); boolean isSecureEnvironment = (!serverName.substring(0, serverName.indexOf(".")).equals( NONSECURE_ENVIRONMENT_NAME)); return (request.isSecure() &&...
@Test public void testCommence() throws Exception { HttpSession mockSession = mock(HttpSession.class); AuthenticationException mockAuthenticationException = mock(AuthenticationException.class); PropertiesDecryptor mockPropertiesDecryptor = mock(PropertiesDecryptor.class); APIClient mockAPIClient = mock(APIClient.class)...
@Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { HttpSession session = request.getSession(); try { SliApi.setBaseUrl(apiUrl); OAuthService service = new ServiceBuilder().provider(SliApi.class) .apiKey(p...
SLIAuthenticationEntryPoint implements AuthenticationEntryPoint { @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { HttpSession session = request.getSession(); try { SliApi.setBaseUrl(apiUrl); OAuthServi...
SLIAuthenticationEntryPoint implements AuthenticationEntryPoint { @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { HttpSession session = request.getSession(); try { SliApi.setBaseUrl(apiUrl); OAuthServi...
SLIAuthenticationEntryPoint implements AuthenticationEntryPoint { @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { HttpSession session = request.getSession(); try { SliApi.setBaseUrl(apiUrl); OAuthServi...
SLIAuthenticationEntryPoint implements AuthenticationEntryPoint { @Override public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException { HttpSession session = request.getSession(); try { SliApi.setBaseUrl(apiUrl); OAuthServi...
@Test public void shouldGetCourseSectionMappings() throws SLIClientException, IOException, URISyntaxException { List<GenericEntity> sections = new ArrayList<GenericEntity>(); sections.add(createSection("S1", "CO1", "Section 1")); sections.add(createSection("S2", "CO2", "Section 2")); List<Entity> courseOfferings = new ...
@Override public List<GenericEntity> getCourseSectionMappings(List<GenericEntity> sections, String schoolId, String token) { Map<String, GenericEntity> courseMap = new HashMap<String, GenericEntity>(); Map<String, String> sectionIDToCourseIDMap = new HashMap<String, String>(); Map<String, Set<GenericEntity>> sectionLoo...
SDKAPIClient implements APIClient { @Override public List<GenericEntity> getCourseSectionMappings(List<GenericEntity> sections, String schoolId, String token) { Map<String, GenericEntity> courseMap = new HashMap<String, GenericEntity>(); Map<String, String> sectionIDToCourseIDMap = new HashMap<String, String>(); Map<St...
SDKAPIClient implements APIClient { @Override public List<GenericEntity> getCourseSectionMappings(List<GenericEntity> sections, String schoolId, String token) { Map<String, GenericEntity> courseMap = new HashMap<String, GenericEntity>(); Map<String, String> sectionIDToCourseIDMap = new HashMap<String, String>(); Map<St...
SDKAPIClient implements APIClient { @Override public List<GenericEntity> getCourseSectionMappings(List<GenericEntity> sections, String schoolId, String token) { Map<String, GenericEntity> courseMap = new HashMap<String, GenericEntity>(); Map<String, String> sectionIDToCourseIDMap = new HashMap<String, String>(); Map<St...
SDKAPIClient implements APIClient { @Override public List<GenericEntity> getCourseSectionMappings(List<GenericEntity> sections, String schoolId, String token) { Map<String, GenericEntity> courseMap = new HashMap<String, GenericEntity>(); Map<String, String> sectionIDToCourseIDMap = new HashMap<String, String>(); Map<St...
@Test public void testGetStatusCodes() { assertEquals(STATUS_CODES, response.getStatusCodes()); }
public List<String> getStatusCodes() { return statusCodes; }
Response extends WadlElement { public List<String> getStatusCodes() { return statusCodes; } }
Response extends WadlElement { public List<String> getStatusCodes() { return statusCodes; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); }
Response extends WadlElement { public List<String> getStatusCodes() { return statusCodes; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<String> getStatusCodes(); List<Param> getParams(); List<Representati...
Response extends WadlElement { public List<String> getStatusCodes() { return statusCodes; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<String> getStatusCodes(); List<Param> getParams(); List<Representati...
@Test public void shouldInsertTenant() { TenantRecord tenantRecord = createTestTenantRecord(); tenantDA.insertTenant(tenantRecord); Mockito.verify(mockRepository).create(Mockito.eq("tenant"), Mockito.argThat(new IsCorrectBody(tenantRecord))); }
@Override public void insertTenant(TenantRecord tenant) { if (entityRepository.findOne(TENANT_COLLECTION, new NeutralQuery(new NeutralCriteria(TENANT_ID, "=", tenant.getTenantId()))) == null) { entityRepository.create(TENANT_COLLECTION, getTenantBody(tenant)); } }
TenantMongoDA implements TenantDA { @Override public void insertTenant(TenantRecord tenant) { if (entityRepository.findOne(TENANT_COLLECTION, new NeutralQuery(new NeutralCriteria(TENANT_ID, "=", tenant.getTenantId()))) == null) { entityRepository.create(TENANT_COLLECTION, getTenantBody(tenant)); } } }
TenantMongoDA implements TenantDA { @Override public void insertTenant(TenantRecord tenant) { if (entityRepository.findOne(TENANT_COLLECTION, new NeutralQuery(new NeutralCriteria(TENANT_ID, "=", tenant.getTenantId()))) == null) { entityRepository.create(TENANT_COLLECTION, getTenantBody(tenant)); } } }
TenantMongoDA implements TenantDA { @Override public void insertTenant(TenantRecord tenant) { if (entityRepository.findOne(TENANT_COLLECTION, new NeutralQuery(new NeutralCriteria(TENANT_ID, "=", tenant.getTenantId()))) == null) { entityRepository.create(TENANT_COLLECTION, getTenantBody(tenant)); } } @Override List<Str...
TenantMongoDA implements TenantDA { @Override public void insertTenant(TenantRecord tenant) { if (entityRepository.findOne(TENANT_COLLECTION, new NeutralQuery(new NeutralCriteria(TENANT_ID, "=", tenant.getTenantId()))) == null) { entityRepository.create(TENANT_COLLECTION, getTenantBody(tenant)); } } @Override List<Str...
@Test public void testGetParams() { assertEquals(PARAMS, response.getParams()); }
public List<Param> getParams() { return params; }
Response extends WadlElement { public List<Param> getParams() { return params; } }
Response extends WadlElement { public List<Param> getParams() { return params; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); }
Response extends WadlElement { public List<Param> getParams() { return params; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<String> getStatusCodes(); List<Param> getParams(); List<Representation> getRepr...
Response extends WadlElement { public List<Param> getParams() { return params; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<String> getStatusCodes(); List<Param> getParams(); List<Representation> getRepr...
@Test public void testGetRepresentations() { assertEquals(REPRESENTATIONS, response.getRepresentations()); }
public List<Representation> getRepresentations() { return representations; }
Response extends WadlElement { public List<Representation> getRepresentations() { return representations; } }
Response extends WadlElement { public List<Representation> getRepresentations() { return representations; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); }
Response extends WadlElement { public List<Representation> getRepresentations() { return representations; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<String> getStatusCodes(); List<Param> getParams(); L...
Response extends WadlElement { public List<Representation> getRepresentations() { return representations; } Response(final List<String> statusCodes, final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<String> getStatusCodes(); List<Param> getParams(); L...
@Test public void testToString() { assertTrue(!"".equals(response.toString())); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("statusCodes").append(" : ").append(statusCodes); sb.append(", "); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").append(representations); sb.append...
Response extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("statusCodes").append(" : ").append(statusCodes); sb.append(", "); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").app...
Response extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("statusCodes").append(" : ").append(statusCodes); sb.append(", "); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").app...
Response extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("statusCodes").append(" : ").append(statusCodes); sb.append(", "); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").app...
Response extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("statusCodes").append(" : ").append(statusCodes); sb.append(", "); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").app...
@Test public void testGetParams() { assertEquals(PARAMS, request.getParams()); }
public List<Param> getParams() { return params; }
Request extends WadlElement { public List<Param> getParams() { return params; } }
Request extends WadlElement { public List<Param> getParams() { return params; } Request(final List<Documentation> doc, final List<Param> params, final List<Representation> representations); }
Request extends WadlElement { public List<Param> getParams() { return params; } Request(final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<Param> getParams(); List<Representation> getRepresentations(); @Override String toString(); }
Request extends WadlElement { public List<Param> getParams() { return params; } Request(final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<Param> getParams(); List<Representation> getRepresentations(); @Override String toString(); }
@Test public void testGetRepresentations() { assertEquals(REPRESENTATIONS, request.getRepresentations()); }
public List<Representation> getRepresentations() { return representations; }
Request extends WadlElement { public List<Representation> getRepresentations() { return representations; } }
Request extends WadlElement { public List<Representation> getRepresentations() { return representations; } Request(final List<Documentation> doc, final List<Param> params, final List<Representation> representations); }
Request extends WadlElement { public List<Representation> getRepresentations() { return representations; } Request(final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<Param> getParams(); List<Representation> getRepresentations(); @Override String toString(); }
Request extends WadlElement { public List<Representation> getRepresentations() { return representations; } Request(final List<Documentation> doc, final List<Param> params, final List<Representation> representations); List<Param> getParams(); List<Representation> getRepresentations(); @Override String toString(); }
@Test public void testToString() { assertTrue(!"".equals(request.toString())); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").append(representations); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentation()); sb.append(...
Request extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").append(representations); sb.append(", "); sb.append("doc").append(" : ").append(g...
Request extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").append(representations); sb.append(", "); sb.append("doc").append(" : ").append(g...
Request extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").append(representations); sb.append(", "); sb.append("doc").append(" : ").append(g...
Request extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("params").append(" : ").append(params); sb.append(", "); sb.append("representations").append(" : ").append(representations); sb.append(", "); sb.append("doc").append(" : ").append(g...
@Test public void testGetId() { assertEquals(ID, representation.getId()); }
public String getId() { return id; }
Representation extends WadlElement { public String getId() { return id; } }
Representation extends WadlElement { public String getId() { return id; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); }
Representation extends WadlElement { public String getId() { return id; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String getMediaType(); Lis...
Representation extends WadlElement { public String getId() { return id; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String getMediaType(); Lis...
@Test public void testGetMediaType() { assertEquals(MEDIA_TYPE, representation.getMediaType()); }
public String getMediaType() { return mediaType; }
Representation extends WadlElement { public String getMediaType() { return mediaType; } }
Representation extends WadlElement { public String getMediaType() { return mediaType; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); }
Representation extends WadlElement { public String getMediaType() { return mediaType; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String getMe...
Representation extends WadlElement { public String getMediaType() { return mediaType; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String getMe...
@Test public void testGetParams() { assertEquals(PARAMS, representation.getParams()); }
public List<Param> getParams() { return params; }
Representation extends WadlElement { public List<Param> getParams() { return params; } }
Representation extends WadlElement { public List<Param> getParams() { return params; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); }
Representation extends WadlElement { public List<Param> getParams() { return params; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String getMed...
Representation extends WadlElement { public List<Param> getParams() { return params; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String getMed...
@Test public void testGetProfiles() { assertEquals(PROFILES, representation.getProfiles()); }
public List<String> getProfiles() { return profiles; }
Representation extends WadlElement { public List<String> getProfiles() { return profiles; } }
Representation extends WadlElement { public List<String> getProfiles() { return profiles; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); }
Representation extends WadlElement { public List<String> getProfiles() { return profiles; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String g...
Representation extends WadlElement { public List<String> getProfiles() { return profiles; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String g...
@SuppressWarnings("unchecked") @Test public void testGetAutoLoadFiles() throws UnknownHostException { Map<String, Object> tenantsForPreloading = new HashMap<String, Object>(); tenantsForPreloading.put(lzPath1, Arrays.asList("smallDataSet.xml", "mediumDataSet.xml")); Entity tenant = createTenantEntity(); List<Map<String...
@SuppressWarnings("unchecked") @Override public Map<String, List<String>> getPreloadFiles(String ingestionServer) { Iterable<Entity> tenants = entityRepository.findAll( TENANT_COLLECTION, new NeutralQuery(byServerQuery(ingestionServer)).addCriteria(PRELOAD_READY_CRITERIA).setIncludeFields( Arrays.asList(LANDING_ZONE + ...
TenantMongoDA implements TenantDA { @SuppressWarnings("unchecked") @Override public Map<String, List<String>> getPreloadFiles(String ingestionServer) { Iterable<Entity> tenants = entityRepository.findAll( TENANT_COLLECTION, new NeutralQuery(byServerQuery(ingestionServer)).addCriteria(PRELOAD_READY_CRITERIA).setIncludeF...
TenantMongoDA implements TenantDA { @SuppressWarnings("unchecked") @Override public Map<String, List<String>> getPreloadFiles(String ingestionServer) { Iterable<Entity> tenants = entityRepository.findAll( TENANT_COLLECTION, new NeutralQuery(byServerQuery(ingestionServer)).addCriteria(PRELOAD_READY_CRITERIA).setIncludeF...
TenantMongoDA implements TenantDA { @SuppressWarnings("unchecked") @Override public Map<String, List<String>> getPreloadFiles(String ingestionServer) { Iterable<Entity> tenants = entityRepository.findAll( TENANT_COLLECTION, new NeutralQuery(byServerQuery(ingestionServer)).addCriteria(PRELOAD_READY_CRITERIA).setIncludeF...
TenantMongoDA implements TenantDA { @SuppressWarnings("unchecked") @Override public Map<String, List<String>> getPreloadFiles(String ingestionServer) { Iterable<Entity> tenants = entityRepository.findAll( TENANT_COLLECTION, new NeutralQuery(byServerQuery(ingestionServer)).addCriteria(PRELOAD_READY_CRITERIA).setIncludeF...
@Test public void testGetElementName() { assertEquals(ELEMENT_NAME, representation.getElementName()); }
public QName getElementName() { return elementName; }
Representation extends WadlElement { public QName getElementName() { return elementName; } }
Representation extends WadlElement { public QName getElementName() { return elementName; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); }
Representation extends WadlElement { public QName getElementName() { return elementName; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String ge...
Representation extends WadlElement { public QName getElementName() { return elementName; } Representation(final String id, final QName elementName, final String mediaType, final List<String> profiles, final List<Documentation> doc, final List<Param> params); String getId(); QName getElementName(); String ge...
@Test public void testToString() { assertTrue(!"".equals(representation.toString())); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("elementName").append(" : ").append(elementName); sb.append(", "); sb.append("mediaType").append(" : ").append(mediaType); sb.append(", "); sb.append("p...
Representation extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("elementName").append(" : ").append(elementName); sb.append(", "); sb.append("mediaType").append(" : ").append(medi...
Representation extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("elementName").append(" : ").append(elementName); sb.append(", "); sb.append("mediaType").append(" : ").append(medi...
Representation extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("elementName").append(" : ").append(elementName); sb.append(", "); sb.append("mediaType").append(" : ").append(medi...
Representation extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("id").append(" : ").append(id); sb.append(", "); sb.append("elementName").append(" : ").append(elementName); sb.append(", "); sb.append("mediaType").append(" : ").append(medi...
@Test public void testGetIncludes() { assertEquals(INCLUDES, grammars.getIncludes()); }
public List<Include> getIncludes() { return includes; }
Grammars extends WadlElement { public List<Include> getIncludes() { return includes; } }
Grammars extends WadlElement { public List<Include> getIncludes() { return includes; } Grammars(final List<Documentation> doc, final List<Include> includes); }
Grammars extends WadlElement { public List<Include> getIncludes() { return includes; } Grammars(final List<Documentation> doc, final List<Include> includes); List<Include> getIncludes(); @Override String toString(); }
Grammars extends WadlElement { public List<Include> getIncludes() { return includes; } Grammars(final List<Documentation> doc, final List<Include> includes); List<Include> getIncludes(); @Override String toString(); }
@Test public void testToString() { assertTrue(!"".equals(grammars.toString())); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("includes").append(" : ").append(includes); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentation()); sb.append("}"); return sb.toString(); }
Grammars extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("includes").append(" : ").append(includes); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentation()); sb.append("}"); return sb.toString(); } }
Grammars extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("includes").append(" : ").append(includes); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentation()); sb.append("}"); return sb.toString(); } Grammars(final List<...
Grammars extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("includes").append(" : ").append(includes); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentation()); sb.append("}"); return sb.toString(); } Grammars(final List<...
Grammars extends WadlElement { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("includes").append(" : ").append(includes); sb.append(", "); sb.append("doc").append(" : ").append(getDocumentation()); sb.append("}"); return sb.toString(); } Grammars(final List<...
@Test public void testGetTitle() { assertEquals(TITLE, documentation.getTitle()); }
public String getTitle() { return title; }
Documentation { public String getTitle() { return title; } }
Documentation { public String getTitle() { return title; } Documentation(final String title, final String language, final List<DmNode> contents); }
Documentation { public String getTitle() { return title; } Documentation(final String title, final String language, final List<DmNode> contents); String getTitle(); String getLanguage(); List<DmNode> getContents(); @Override String toString(); }
Documentation { public String getTitle() { return title; } Documentation(final String title, final String language, final List<DmNode> contents); String getTitle(); String getLanguage(); List<DmNode> getContents(); @Override String toString(); }
@Test public void testGetLanguage() { assertEquals(LANGUAGE, documentation.getLanguage()); }
public String getLanguage() { return language; }
Documentation { public String getLanguage() { return language; } }
Documentation { public String getLanguage() { return language; } Documentation(final String title, final String language, final List<DmNode> contents); }
Documentation { public String getLanguage() { return language; } Documentation(final String title, final String language, final List<DmNode> contents); String getTitle(); String getLanguage(); List<DmNode> getContents(); @Override String toString(); }
Documentation { public String getLanguage() { return language; } Documentation(final String title, final String language, final List<DmNode> contents); String getTitle(); String getLanguage(); List<DmNode> getContents(); @Override String toString(); }
@Test public void testGetContents() { assertEquals(CONTENTS, documentation.getContents()); }
public List<DmNode> getContents() { return contents; }
Documentation { public List<DmNode> getContents() { return contents; } }
Documentation { public List<DmNode> getContents() { return contents; } Documentation(final String title, final String language, final List<DmNode> contents); }
Documentation { public List<DmNode> getContents() { return contents; } Documentation(final String title, final String language, final List<DmNode> contents); String getTitle(); String getLanguage(); List<DmNode> getContents(); @Override String toString(); }
Documentation { public List<DmNode> getContents() { return contents; } Documentation(final String title, final String language, final List<DmNode> contents); String getTitle(); String getLanguage(); List<DmNode> getContents(); @Override String toString(); }
@Test public void testToString() { assertTrue(!"".equals(documentation.toString())); }
@Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("language").append(" : ").append(language); sb.append(", "); sb.append("title").append(" : ").append(title); sb.append(", "); sb.append("contents").append(" : ").append(contents); sb.append("}"); return sb.toStr...
Documentation { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("language").append(" : ").append(language); sb.append(", "); sb.append("title").append(" : ").append(title); sb.append(", "); sb.append("contents").append(" : ").append(contents); sb.append("}");...
Documentation { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("language").append(" : ").append(language); sb.append(", "); sb.append("title").append(" : ").append(title); sb.append(", "); sb.append("contents").append(" : ").append(contents); sb.append("}");...
Documentation { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("language").append(" : ").append(language); sb.append(", "); sb.append("title").append(" : ").append(title); sb.append(", "); sb.append("contents").append(" : ").append(contents); sb.append("}");...
Documentation { @Override public String toString() { final StringBuilder sb = new StringBuilder(); sb.append("{"); sb.append("language").append(" : ").append(language); sb.append(", "); sb.append("title").append(" : ").append(title); sb.append(", "); sb.append("contents").append(" : ").append(contents); sb.append("}");...
@Test public void testGetValue() { assertEquals(VALUE, option.getValue()); }
public String getValue() { return value; }
Option extends WadlElement { public String getValue() { return value; } }
Option extends WadlElement { public String getValue() { return value; } Option(final String value, final List<Documentation> doc); }
Option extends WadlElement { public String getValue() { return value; } Option(final String value, final List<Documentation> doc); String getValue(); }
Option extends WadlElement { public String getValue() { return value; } Option(final String value, final List<Documentation> doc); String getValue(); }
@Test public void testGetId() { assertEquals(ID, resourceType.getId()); }
public String getId() { return id; }
ResourceType extends WadlElement { public String getId() { return id; } }
ResourceType extends WadlElement { public String getId() { return id; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); }
ResourceType extends WadlElement { public String getId() { return id; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); String getId(); List<Param> getParams(); Method getMethod(); Resource getResource(); }
ResourceType extends WadlElement { public String getId() { return id; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); String getId(); List<Param> getParams(); Method getMethod(); Resource getResource(); }
@Test public void testReceive() throws Exception { Exchange exchange = new DefaultExchange(new DefaultCamelContext()); IngestionFileEntry entry = new IngestionFileEntry("/", FileFormat.EDFI_XML, FileType.XML_STUDENT_PROGRAM, "fileName", "111"); FileEntryWorkNote workNote = new FileEntryWorkNote("batchJobId", entry, fal...
@Handler public boolean lastFileProcessed(Exchange exchange) throws Exception { FileEntryWorkNote workNote = exchange.getIn().getBody(FileEntryWorkNote.class); String batchJobId = workNote.getBatchJobId(); TenantContext.setJobId(batchJobId); if (batchJobDAO.updateFileEntryLatch(workNote.getBatchJobId(), workNote.getFil...
FileEntryLatch { @Handler public boolean lastFileProcessed(Exchange exchange) throws Exception { FileEntryWorkNote workNote = exchange.getIn().getBody(FileEntryWorkNote.class); String batchJobId = workNote.getBatchJobId(); TenantContext.setJobId(batchJobId); if (batchJobDAO.updateFileEntryLatch(workNote.getBatchJobId()...
FileEntryLatch { @Handler public boolean lastFileProcessed(Exchange exchange) throws Exception { FileEntryWorkNote workNote = exchange.getIn().getBody(FileEntryWorkNote.class); String batchJobId = workNote.getBatchJobId(); TenantContext.setJobId(batchJobId); if (batchJobDAO.updateFileEntryLatch(workNote.getBatchJobId()...
FileEntryLatch { @Handler public boolean lastFileProcessed(Exchange exchange) throws Exception { FileEntryWorkNote workNote = exchange.getIn().getBody(FileEntryWorkNote.class); String batchJobId = workNote.getBatchJobId(); TenantContext.setJobId(batchJobId); if (batchJobDAO.updateFileEntryLatch(workNote.getBatchJobId()...
FileEntryLatch { @Handler public boolean lastFileProcessed(Exchange exchange) throws Exception { FileEntryWorkNote workNote = exchange.getIn().getBody(FileEntryWorkNote.class); String batchJobId = workNote.getBatchJobId(); TenantContext.setJobId(batchJobId); if (batchJobDAO.updateFileEntryLatch(workNote.getBatchJobId()...
@Test public void testGetMethod() { assertEquals(METHOD, resourceType.getMethod()); }
public Method getMethod() { return method; }
ResourceType extends WadlElement { public Method getMethod() { return method; } }
ResourceType extends WadlElement { public Method getMethod() { return method; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); }
ResourceType extends WadlElement { public Method getMethod() { return method; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); String getId(); List<Param> getParams(); Method getMethod(); Resource getResource(); }
ResourceType extends WadlElement { public Method getMethod() { return method; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); String getId(); List<Param> getParams(); Method getMethod(); Resource getResource(); }
@Test public void testGetParams() { assertEquals(PARAMS, resourceType.getParams()); }
public List<Param> getParams() { return params; }
ResourceType extends WadlElement { public List<Param> getParams() { return params; } }
ResourceType extends WadlElement { public List<Param> getParams() { return params; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); }
ResourceType extends WadlElement { public List<Param> getParams() { return params; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); String getId(); List<Param> getParams(); Method getMethod(); Resource getResource(); }
ResourceType extends WadlElement { public List<Param> getParams() { return params; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); String getId(); List<Param> getParams(); Method getMethod(); Resource getResource(); }
@Test public void testGetResource() { assertEquals(RESOURCE, resourceType.getResource()); }
public Resource getResource() { return resource; }
ResourceType extends WadlElement { public Resource getResource() { return resource; } }
ResourceType extends WadlElement { public Resource getResource() { return resource; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); }
ResourceType extends WadlElement { public Resource getResource() { return resource; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); String getId(); List<Param> getParams(); Method getMethod(); Resource getResource(); }
ResourceType extends WadlElement { public Resource getResource() { return resource; } ResourceType(final String id, final List<Documentation> doc, final List<Param> params, final Method method, final Resource resource); String getId(); List<Param> getParams(); Method getMethod(); Resource getResource(); }
@Test public void testComputeRequestTemplateParamsEmptyAncestors() { Stack<Resource> resources = new Stack<Resource>(); Param r1p1 = mock(Param.class); when(r1p1.getStyle()).thenReturn(ParamStyle.TEMPLATE); when(r1p1.getId()).thenReturn(R1P1_ID); List<Param> r1Params = new ArrayList<Param>(1); r1Params.add(r1p1); Resou...
public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftResources.add(r...
RestHelper { public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftRe...
RestHelper { public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftRe...
RestHelper { public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftRe...
RestHelper { public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftRe...
@Test public void testComputeRequestTemplateParams() { Stack<Resource> resources = new Stack<Resource>(); Param r1p1 = mock(Param.class); when(r1p1.getStyle()).thenReturn(ParamStyle.TEMPLATE); when(r1p1.getId()).thenReturn(R1P1_ID); List<Param> r1Params = new ArrayList<Param>(1); r1Params.add(r1p1); Resource r1 = mock(...
public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftResources.add(r...
RestHelper { public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftRe...
RestHelper { public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftRe...
RestHelper { public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftRe...
RestHelper { public static final List<Param> computeRequestTemplateParams(final Resource resource, final Stack<Resource> ancestors) { final List<Param> params = new LinkedList<Param>(); final List<Resource> rightToLeftResources = new LinkedList<Resource>(); rightToLeftResources.addAll(reverse(ancestors)); rightToLeftRe...
@Test public void testReverse() { List<Integer> numbers = new ArrayList<Integer>(3); numbers.add(1); numbers.add(2); numbers.add(3); List<Integer> reversedNumbers = RestHelper.reverse(numbers); Integer crntNumber = 3; assertEquals(3, reversedNumbers.size()); for (Integer i : reversedNumbers) { assertEquals(crntNumber--...
public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); }
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } }
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } }
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } static final List<Param> computeRequestTemplateParams(final Resource resource, fin...
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } static final List<Param> computeRequestTemplateParams(final Resource resource, fin...
@Test public void testReverseEmpty() { List<Integer> numbers = new ArrayList<Integer>(0); List<Integer> reversedNumbers = RestHelper.reverse(numbers); assertEquals(0, reversedNumbers.size()); }
public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); }
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } }
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } }
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } static final List<Param> computeRequestTemplateParams(final Resource resource, fin...
RestHelper { public static final <T> List<T> reverse(final List<T> strings) { final LinkedList<T> result = new LinkedList<T>(); for (final T s : strings) { result.addFirst(s); } return Collections.unmodifiableList(result); } static final List<Param> computeRequestTemplateParams(final Resource resource, fin...