當前位置: 首頁>>代碼示例>>Java>>正文


Java DateUtil類代碼示例

本文整理匯總了Java中io.vertigo.util.DateUtil的典型用法代碼示例。如果您正苦於以下問題:Java DateUtil類的具體用法?Java DateUtil怎麽用?Java DateUtil使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


DateUtil類屬於io.vertigo.util包,在下文中一共展示了DateUtil類的7個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: saveUtilisateur

import io.vertigo.util.DateUtil; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public void saveUtilisateur(final Utilisateur utilisateur, final DtList<Role> dtcRole) {
	Assertion.checkNotNull(utilisateur);
	// ---------------------------------------------------------------------
	if (utilisateur.getUtiId() == null) {
		utilisateur.setDateCreation(DateUtil.newDateTime());
	} else {
		utilisateur.setDateDerniereModif(DateUtil.newDateTime());
	}

	utilisateur.setAuteurDerniereModif(getCurrentUtilisateur().getPrenomNom());
	utilisateurDAO.save(utilisateur);
	if (dtcRole != null) {
		utilisateurDAO.updateNN(utilisateur.getRoleDtListURI(), dtcRole);
	}
}
 
開發者ID:KleeGroup,項目名稱:deprecated-vertigo-demo,代碼行數:18,代碼來源:UtilisateurServicesImpl.java

示例2: executeNow

import io.vertigo.util.DateUtil; //導入依賴的package包/類
/**
 * Lance l'execution d'un processus.
 * @param processName le nom du processus à lancer
 * @param initialParams des éventuels paramètres supplémentaire
 */
@POST("/execute")
@SessionLess
@AnonymousAccessAllowed
public void executeNow(@InnerBodyParam("processName") final String processName, @InnerBodyParam("initialParams") final Map<String, String> initialParams) {
	Assertion.checkNotNull(processName);
	// ---
	final ProcessDefinition processDefinition = orchestraDefinitionManager.getProcessDefinition(processName);
	orchestraServices.getScheduler()
			.scheduleAt(processDefinition, DateUtil.newDateTime(), initialParams);
}
 
開發者ID:KleeGroup,項目名稱:alpha-pfm,代碼行數:16,代碼來源:WsExecutionControl.java

示例3: executeNowIhm

import io.vertigo.util.DateUtil; //導入依賴的package包/類
/**
 * Lance l'execution d'un processus avec son id.
 * @param processName l'id du processus à lancer
 */
@POST("/executeNow")
public void executeNowIhm(@InnerBodyParam("processName") final String processName) {
	Assertion.checkArgNotEmpty(processName);
	// ---
	final ProcessDefinition processDefinition = orchestraDefinitionManager.getProcessDefinition(processName);
	orchestraServices.getScheduler()
			.scheduleAt(processDefinition, DateUtil.newDateTime(), Collections.emptyMap());
}
 
開發者ID:KleeGroup,項目名稱:alpha-pfm,代碼行數:13,代碼來源:WsExecutionControl.java

示例4: setUp

import io.vertigo.util.DateUtil; //導入依賴的package包/類
@BeforeClass
public static void setUp() {
	app = new AutoCloseableApp(MyAppConfig.configWithVega());

	final OrchestraDefinitionManager orchestraDefinitionManager = Home.getApp().getComponentSpace().resolve(OrchestraDefinitionManager.class);
	final OrchestraServices orchestraServices = Home.getApp().getComponentSpace().resolve(OrchestraServices.class);

	final ProcessDefinition processDefinition = new ProcessDefinitionBuilder("TEST_BASIC", "TEST BASIC", ProcessType.SUPERVISED)
			.addActivity("DUMB ACTIVITY", "DUMB ACTIVITY", EmptyActivityEngine.class)
			.build();

	final ProcessDefinition processDefinition2 = new ProcessDefinitionBuilder("TEST_BASIC_2", "TEST BASIC_2", ProcessType.SUPERVISED)
			.addActivity("DUMB ACTIVITY_2", "DUMB ACTIVITY", io.vertigo.orchestra.services.execution.engine.EmptyActivityEngine.class)
			.addActivity("DUMB ACTIVITY_3", "DUMB ACTIVITY", io.vertigo.orchestra.services.execution.engine.DumbErrorActivityEngine.class)
			.build();

	orchestraDefinitionManager.createOrUpdateDefinition(processDefinition);
	orchestraServices.getScheduler().scheduleAt(processDefinition, DateUtil.newDateTime(), Collections.emptyMap());
	orchestraDefinitionManager.createOrUpdateDefinition(processDefinition2);
	orchestraServices.getScheduler().scheduleAt(processDefinition2, DateUtil.newDateTime(), Collections.emptyMap());

	RestAssured.registerParser("plain/text", Parser.TEXT);
	RestAssured.given()
			.filter(loggedSessionFilter)
			.get("/test/login");

}
 
開發者ID:KleeGroup,項目名稱:alpha-pfm,代碼行數:28,代碼來源:OrchestraWsTest.java

示例5: testReport

import io.vertigo.util.DateUtil; //導入依賴的package包/類
/**
 * @throws InterruptedException
 */
//@Test
public void testReport() throws InterruptedException {

	final ProcessDefinition processDefinition = executeProcess();
	// -1h +1h
	final ExecutionSummary executionSummary = processExecutionManager.getReport().getSummaryByDate(processDefinition, new Date(DateUtil.newDateTime().getTime() - 60 * 60 * 1000),
			new Date(DateUtil.newDateTime().getTime() + 60 * 60 * 1000));
	Assert.assertTrue(1 == executionSummary.getSuccessfulCount());
}
 
開發者ID:KleeGroup,項目名稱:alpha-pfm,代碼行數:13,代碼來源:ReportingTest.java

示例6: publish

import io.vertigo.util.DateUtil; //導入依賴的package包/類
private static String publish(final Jedis jedis, final ZMethod method, final boolean sync) {
	final UUID uuid = UUID.randomUUID();
	final String workId = uuid.toString();

	//out.println("creating work [" + workId + "] : " + work.getClass().getSimpleName());
	jedis.hset("work:" + workId, "base64", Util.encodeMethod(method));
	jedis.hset("work:" + workId, "date", DateUtil.newDate().toString());
	jedis.hset("work:" + workId, "sync", Boolean.toString(sync));
	//On publie la demande de travaux
	jedis.lpush("works:todo", workId);
	return workId;
}
 
開發者ID:KleeGroup,項目名稱:vertigo-labs,代碼行數:13,代碼來源:ZClientWork.java

示例7: scheduleWithCron

import io.vertigo.util.DateUtil; //導入依賴的package包/類
/** {@inheritDoc} */
@Override
public void scheduleWithCron(final ProcessDefinition processDefinition) {
	scheduleAtRecurrent(processDefinition, DateUtil.newDateTime(), Collections.emptyMap());

}
 
開發者ID:KleeGroup,項目名稱:alpha-pfm,代碼行數:7,代碼來源:MemoryProcessSchedulerPlugin.java


注:本文中的io.vertigo.util.DateUtil類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。