mirror of
				https://github.com/lacerta-doc/Lacerta.git
				synced 2025-11-04 00:40:49 +00:00 
			
		
		
		
	履歴を生成する内部メソッド作成
This commit is contained in:
		
							parent
							
								
									bb36458c4d
								
							
						
					
					
						commit
						c663d78e11
					
				@ -94,6 +94,25 @@ public class LacertaLibraryStubImpl implements LacertaLibrary {
 | 
				
			|||||||
        }
 | 
					        }
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    private LibraryItemPage getRecentDocumentPage(int limit) {
 | 
				
			||||||
 | 
					        int itemTotal = faker.number().numberBetween(1, limit);
 | 
				
			||||||
 | 
					        ArrayList<ListItem> listItems = new ArrayList<>();
 | 
				
			||||||
 | 
					        for (int i = 0; i < itemTotal; i++) {
 | 
				
			||||||
 | 
					            listItems.add(generateStubListItem(ListItemType.ITEM_TYPE_DOCUMENT));
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        // DescriptionからDateを抽出して新しい順にソート
 | 
				
			||||||
 | 
					        listItems.sort((a, b) -> {
 | 
				
			||||||
 | 
					            String aDate = a.getDescription().substring(11);
 | 
				
			||||||
 | 
					            String bDate = b.getDescription().substring(11);
 | 
				
			||||||
 | 
					            return bDate.compareTo(aDate);
 | 
				
			||||||
 | 
					        });
 | 
				
			||||||
 | 
					        LibraryItemPage libraryItemPage = new LibraryItemPage();
 | 
				
			||||||
 | 
					        libraryItemPage.setListItems(listItems);
 | 
				
			||||||
 | 
					        libraryItemPage.setPageId(UUID.randomUUID().toString());
 | 
				
			||||||
 | 
					        libraryItemPage.setPageTitle("RecentDocument");
 | 
				
			||||||
 | 
					        return libraryItemPage;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    @Override
 | 
					    @Override
 | 
				
			||||||
    public LibraryItemPage getRecentDocument(int limit) {
 | 
					    public LibraryItemPage getRecentDocument(int limit) {
 | 
				
			||||||
        return null;
 | 
					        return null;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user