Search in sources :

Example 6 with GagoyleDate

use of com.kyj.fx.voeditor.visual.framework.model.GagoyleDate in project Gargoyle by callakrsos.

the class DateUtil method getPeriodDaysByWeek.

public static List<GagoyleDate> getPeriodDaysByWeek(int startYear, int startWeek, int endYear, int endWeek) {
    Calendar firstCalendar = GregorianCalendar.getInstance();
    firstCalendar.setWeekDate(startYear, startWeek, Calendar.SUNDAY);
    // Date firstDate = firstCalendar.getTime();
    Calendar lastCalendar = GregorianCalendar.getInstance();
    lastCalendar.setWeekDate(endYear, endWeek, /* Calendar.SUNDAY */
    lastCalendar.get(Calendar.DAY_OF_WEEK));
    // Date lastDate = lastCalendar.getTime();
    ArrayList<GagoyleDate> arrayList = new ArrayList<>();
    while (firstCalendar.before(lastCalendar)) {
        firstCalendar.add(Calendar.DATE, 1);
        arrayList.add(new GagoyleDate(firstCalendar.getTime()));
    }
    return arrayList;
}
Also used : GregorianCalendar(java.util.GregorianCalendar) Calendar(java.util.Calendar) GagoyleDate(com.kyj.fx.voeditor.visual.framework.model.GagoyleDate) ArrayList(java.util.ArrayList)

Example 7 with GagoyleDate

use of com.kyj.fx.voeditor.visual.framework.model.GagoyleDate in project Gargoyle by callakrsos.

the class SVNHistoryWalkTest method historyWalkAnalysisTest.

/**
	 * 현재 일자에 최신 커밋내역을 조회.
	 * @작성자 : KYJ
	 * @작성일 : 2016. 7. 14.
	 * @throws SVNException
	 */
@Test
public void historyWalkAnalysisTest() throws SVNException {
    List<GagoyleDate> periodDaysByWeek = DateUtil.getPeriodDaysByWeek();
    GagoyleDate start = periodDaysByWeek.get(0);
    GagoyleDate end = periodDaysByWeek.get(periodDaysByWeek.size() - 1);
    long startRevision = localServerManager2.getRevision(start.toDate());
    long endRevision = localServerManager2.getRevision(end.toDate());
    System.out.println("start " + start.toDateString() + " end : " + end.toDateString());
    System.out.println("startRevision " + startRevision + " endRevision : " + endRevision);
    Collection<SVNLogEntry> allLogs = localServerManager2.getAllLogs(startRevision, endRevision);
    allLogs.stream().map(localServerManager2.fromPrettySVNLogConverter()).forEach(System.out::println);
}
Also used : SVNLogEntry(org.tmatesoft.svn.core.SVNLogEntry) GagoyleDate(com.kyj.fx.voeditor.visual.framework.model.GagoyleDate) Test(org.junit.Test)

Aggregations

GagoyleDate (com.kyj.fx.voeditor.visual.framework.model.GagoyleDate)7 Calendar (java.util.Calendar)4 GregorianCalendar (java.util.GregorianCalendar)4 TimeZone (java.util.TimeZone)3 SVNLogEntry (org.tmatesoft.svn.core.SVNLogEntry)3 DateUtil (com.kyj.fx.voeditor.visual.util.DateUtil)2 SimpleDateFormat (java.text.SimpleDateFormat)2 ArrayList (java.util.ArrayList)2 Collection (java.util.Collection)2 List (java.util.List)2 TreeMap (java.util.TreeMap)2 Collectors (java.util.stream.Collectors)2 Test (org.junit.Test)2 SVNException (org.tmatesoft.svn.core.SVNException)2 MasterSlaveChartComposite (com.kyj.fx.voeditor.visual.component.MasterSlaveChartComposite)1 ProxyInitializable (com.kyj.fx.voeditor.visual.main.initalize.ProxyInitializable)1 FxCollectors (com.kyj.fx.voeditor.visual.util.FxCollectors)1 FxUtil (com.kyj.fx.voeditor.visual.util.FxUtil)1 JavaSVNManager (com.kyj.scm.manager.svn.java.JavaSVNManager)1 Date (java.util.Date)1