当前位置: 首页>>代码示例>>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;未经允许,请勿转载。