本文整理汇总了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);
}
}
示例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);
}
示例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());
}
示例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");
}
示例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());
}
示例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;
}
示例7: scheduleWithCron
import io.vertigo.util.DateUtil; //导入依赖的package包/类
/** {@inheritDoc} */
@Override
public void scheduleWithCron(final ProcessDefinition processDefinition) {
scheduleAtRecurrent(processDefinition, DateUtil.newDateTime(), Collections.emptyMap());
}