本文整理汇总了Java中org.apache.isis.applib.services.clock.ClockService类的典型用法代码示例。如果您正苦于以下问题:Java ClockService类的具体用法?Java ClockService怎么用?Java ClockService使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ClockService类属于org.apache.isis.applib.services.clock包,在下文中一共展示了ClockService类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: ToDoSystemBuilder
import org.apache.isis.applib.services.clock.ClockService; //导入依赖的package包/类
public ToDoSystemBuilder() {
//withFixtures( ... reference data fixtures ...); // if we had any...
withLoggingAt(org.apache.log4j.Level.INFO);
with(testConfiguration());
with(new DataNucleusPersistenceMechanismInstaller());
withServices(
new ToDoItems(),
new ToDoItemAnalysis(),
new ToDoItemContributions(),
new ToDoItemsFixturesService(),
new ClassDiscoveryServiceUsingReflections(),
new ToDoItemSubscriptions(),
new WrapperFactoryDefault(),
new IsisJdoSupportImpl(),
new Bulk.InteractionContext(),
new EventBusServiceJdo(),
new QueryResultsCache(),
new MementoServiceDefault(),
new BookmarkServiceDefault(),
new ClockService()
);
}
示例2: setUp
import org.apache.isis.applib.services.clock.ClockService; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
clockService = new ClockService();
fake = new FakeDataService();
ReflectUtils.inject(fake, clockService);
fake.init();
freeMarkerService = new FreeMarkerService();
ReflectUtils.inject(freeMarkerService, "configurationService", mockConfigurationService);
final ImmutableMap<String, String> props = ImmutableMap.of();
freeMarkerService.init(props);
templateName = "Template name";
}
示例3: setUp
import org.apache.isis.applib.services.clock.ClockService; //导入依赖的package包/类
@Before
public void setUp() throws Exception {
lease = new Lease();
service = new LeaseStatusService();
service.clockService = new ClockService() {
@Override
public LocalDate now() {
// TODO Auto-generated method stub
return new LocalDate(2014, 4, 1);
}
};
}
示例4: setup
import org.apache.isis.applib.services.clock.ClockService; //导入依赖的package包/类
@Before
public void setup() {
asset = new FixedAssetForTesting();
property = new Property();
leaseRepository = new LeaseRepository() {
@Override
protected <T> T uniqueMatch(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderMethod.UNIQUE_MATCH);
return (T) new Lease();
}
@Override
protected List<Lease> allInstances() {
finderInteraction = new FinderInteraction(null, FinderMethod.ALL_INSTANCES);
return null;
}
@Override
protected <T> List<T> allMatches(Query<T> query) {
finderInteraction = new FinderInteraction(query, FinderMethod.ALL_MATCHES);
return null;
}
};
leaseRepository.clockService = new ClockService();
}
示例5: getClockService
import org.apache.isis.applib.services.clock.ClockService; //导入依赖的package包/类
protected ClockService getClockService() {
return clockService;
}