当前位置: 首页>>代码示例>>Java>>正文


Java CachedList.load方法代码示例

本文整理汇总了Java中com.belladati.sdk.util.CachedList.load方法的典型用法代码示例。如果您正苦于以下问题:Java CachedList.load方法的具体用法?Java CachedList.load怎么用?Java CachedList.load使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在com.belladati.sdk.util.CachedList的用法示例。


在下文中一共展示了CachedList.load方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: loadDataSource

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Import is loaded correctly from getService(). */
public void loadDataSource() {
	registerSingleImport(
		builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval, customIntervalLength));

	CachedList<DataSourceImport> imports = getService().getDataSourceImports(dsId);
	imports.load();
	server.assertRequestUris(importUri);
	assertEquals(imports.toList().size(), 1);

	DataSourceImport exec = imports.toList().get(0);

	assertEquals(exec.getId(), id);
	assertEquals(exec.getCallerName(), caller);
	Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
	expectedImport.set(2012, 3, 16, 10, 17, 26);
	expectedImport.set(Calendar.MILLISECOND, 0);
	assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
	assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
	assertTrue(exec.isOverwriting());
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:22,代码来源:DataSourceImportTest.java

示例2: loadFromDataSet

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Import is loaded correctly from data source. */
public void loadFromDataSet() {
	registerSingleImport(
		builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval, customIntervalLength));

	DataSource source = new DataSourceImpl(getService(), builder.buildDataSourceNode(dsId, "", ""));
	CachedList<DataSourceImport> imports = source.getImports();
	imports.load();
	server.assertRequestUris(importUri);
	assertEquals(imports.toList().size(), 1);

	DataSourceImport exec = imports.toList().get(0);

	assertEquals(exec.getId(), id);
	assertEquals(exec.getCallerName(), caller);
	Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
	expectedImport.set(2012, 3, 16, 10, 17, 26);
	expectedImport.set(Calendar.MILLISECOND, 0);
	assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
	assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
	assertTrue(exec.isOverwriting());
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:23,代码来源:DataSourceImportTest.java

示例3: loadDataSource

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Data source is loaded correctly from service. */
public void loadDataSource() {
	registerSingleDataSource(builder.buildDataSourceNode(id, name, type));

	CachedList<DataSource> dataSources = getService().getDataSources(dsId);
	dataSources.load();
	server.assertRequestUris(dataSourcesUri);
	assertEquals(dataSources.toList().size(), 1);

	DataSource source = dataSources.toList().get(0);

	assertEquals(source.getId(), id);
	assertEquals(source.getName(), name);
	assertEquals(source.getType(), type);

	assertEquals(source.toString(), name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:18,代码来源:DataSourcesTest.java

示例4: loadFromDataSet

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Data source is loaded correctly from data set. */
public void loadFromDataSet() {
	registerSingleDataSource(builder.buildDataSourceNode(id, name, type));

	DataSet dataSet = new DataSetImpl(getService(), builder.buildDataSetNode(dsId, "", null, null, null));
	CachedList<DataSource> dataSources = dataSet.getDataSources();
	dataSources.load();
	server.assertRequestUris(dataSourcesUri);
	assertEquals(dataSources.toList().size(), 1);

	DataSource source = dataSources.toList().get(0);

	assertEquals(source.getId(), id);
	assertEquals(source.getName(), name);
	assertEquals(source.getType(), type);

	assertEquals(source.toString(), name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:19,代码来源:DataSourcesTest.java

示例5: loadForms_withElements

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
public void loadForms_withElements() {
	server.registerPaginatedItem(baseUri, "importForms", builder.buildFormNode(id, name, recordTimestamp, testElements()));

	CachedList<Form> list = getService().getImportForms();
	list.load();
	server.assertRequestUris(baseUri);
	assertEquals(list.get().size(), 1);

	Form form = list.get().get(0);
	assertEquals(form.getId(), id);
	assertEquals(form.getName(), name);
	assertEquals(form.getRecordTimestamp() + "", recordTimestamp);
	assertEquals(form.toString(), name);
	assertEquals(form.getElements().size(), 6);
	assertElements(form.getElements());
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:17,代码来源:FormTest.java

示例6: loadDomainInfo

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Regular domain info data is loaded correctly. */
public void loadDomainInfo() {
	server.registerPaginatedItem(baseUri, "domains", builder.buildDomainInfoNode(id, name, description, active));

	CachedList<DomainInfo> infos = getService().getDomainInfo();
	infos.load();
	server.assertRequestUris(baseUri);
	assertEquals(infos.get().size(), 1);

	DomainInfo info = infos.get().get(0);
	assertEquals(info.getId(), id);
	assertEquals(info.getName(), name);
	assertEquals(info.getDescription(), description);
	assertEquals(info.getActive() + "", active);
	assertEquals(info.toString(), name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:17,代码来源:DomainTest.java

示例7: loadUsers_withoutGroupFilter

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Users (without group filter) are loaded correctly from getService(). */
public void loadUsers_withoutGroupFilter() {
	registerSingleUser(builder.buildUserNode(user_id, user_name, "", "", "", "", "", "", null, null, id, null, null));

	ObjectNode node = builder.buildDomainNode(id, name, description, dateFormat, timeFormat, timeZone, locale, active);
	Domain domain = new DomainImpl(getService(), node);
	CachedList<User> list = domain.loadUsers(null);
	list.load();
	server.assertRequestUris(usersUri);
	assertEquals(list.toList().size(), 1);

	User item = list.toList().get(0);

	assertEquals(item.getId(), user_id);
	assertEquals(item.getUsername(), user_name);
	assertEquals(item.getDomainId(), id);
	assertEquals(item.getUserGroups().size(), 0);

	assertEquals(item.toString(), user_name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:21,代码来源:DomainTest.java

示例8: loadUsers_withGroupFilter

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Users (with group filter) are loaded correctly from getService(). */
public void loadUsers_withGroupFilter() {
	registerSingleUser(
		builder.buildUserNode(user_id, user_name, "", "", "", "", "", "", null, null, id, null, userGroupsJson));

	ObjectNode infoJson = builder.buildDomainInfoNode(id, name, description, active);
	DomainInfo domainInfo = new DomainInfoImpl(getService(), infoJson);
	CachedList<User> list = domainInfo.loadUsers(userGroup_id);
	list.load();
	server.assertRequestUris(usersUri);
	assertEquals(list.toList().size(), 1);

	User item = list.toList().get(0);

	assertEquals(item.getId(), user_id);
	assertEquals(item.getUsername(), user_name);
	assertEquals(item.getDomainId(), id);
	assertEquals(item.getUserGroups().size(), 1);
	UserGroup[] groups = item.getUserGroups().toArray(new UserGroup[1]);
	assertEquals(groups[0].getId(), userGroup_id);
	assertEquals(groups[0].getName(), userGroup_name);
	assertEquals(groups[0].getDescription(), "");

	assertEquals(item.toString(), user_name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:26,代码来源:DomainTest.java

示例9: loadUserGroups_fromDomain

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Loads UserGroups from Domain. */
public void loadUserGroups_fromDomain() {
	ObjectNode infoJson = builder.buildDomainInfoNode(id, name, description, active);
	server.register(apiUri + id, infoJson.toString());
	registerSingleUserGroup(builder.buildUserGroupNode(userGroup_id, userGroup_name, description));

	DomainInfo domainInfo = new DomainInfoImpl(getService(), infoJson);
	assertEquals(domainInfo.getId(), id);
	Domain domain = domainInfo.loadDetails();
	CachedList<UserGroup> list = domain.loadUserGroups();

	list.load();
	assertEquals(list.toList().size(), 1);

	UserGroup item = list.toList().get(0);
	assertEquals(item.getId(), userGroup_id);
	assertEquals(item.getName(), userGroup_name);
	assertEquals(item.getDescription(), description);
	assertEquals(item.toString(), userGroup_name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:21,代码来源:DomainTest.java

示例10: loadUserGroups_fromDomainInfo

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Loads UserGroups from DomainInfo. */
public void loadUserGroups_fromDomainInfo() {
	registerSingleUserGroup(builder.buildUserGroupNode(userGroup_id, userGroup_name, description));

	ObjectNode infoJson = builder.buildDomainInfoNode(id, name, description, active);
	DomainInfo domainInfo = new DomainInfoImpl(getService(), infoJson);
	assertEquals(domainInfo.getId(), id);
	CachedList<UserGroup> list = domainInfo.loadUserGroups();

	list.load();
	assertEquals(list.toList().size(), 1);

	UserGroup item = list.toList().get(0);
	assertEquals(item.getId(), userGroup_id);
	assertEquals(item.getName(), userGroup_name);
	assertEquals(item.getDescription(), description);
	assertEquals(item.toString(), userGroup_name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:19,代码来源:DomainTest.java

示例11: loadDataSource

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Import is loaded correctly from service. */
public void loadDataSource() {
	CachedList<DataSourceImport> imports = service.getDataSourceImports(dsId);

	registerSingleImport(builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval,
		customIntervalLength));

	imports.load();
	server.assertRequestUris(importUri);
	assertEquals(imports.toList().size(), 1);

	DataSourceImport exec = imports.toList().get(0);

	assertEquals(exec.getId(), id);
	assertEquals(exec.getCallerName(), caller);
	Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
	expectedImport.set(2012, 3, 16, 10, 17, 26);
	expectedImport.set(Calendar.MILLISECOND, 0);
	assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
	assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
	assertTrue(exec.isOverwriting());
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-android,代码行数:23,代码来源:DataSourceImportTest.java

示例12: loadFromDataSet

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Import is loaded correctly from data source. */
public void loadFromDataSet() {
	DataSource source = new DataSourceImpl(service, builder.buildDataSourceNode(dsId, "", ""));
	CachedList<DataSourceImport> imports = source.getImports();

	registerSingleImport(builder.buildSourceImportNode(id, caller, lastImport, overwritePolicy, interval,
		customIntervalLength));

	imports.load();
	server.assertRequestUris(importUri);
	assertEquals(imports.toList().size(), 1);

	DataSourceImport exec = imports.toList().get(0);

	assertEquals(exec.getId(), id);
	assertEquals(exec.getCallerName(), caller);
	Calendar expectedImport = Calendar.getInstance(TimeZone.getTimeZone("GMT"));
	expectedImport.set(2012, 3, 16, 10, 17, 26);
	expectedImport.set(Calendar.MILLISECOND, 0);
	assertEquals(exec.getNextExecutionDate(), expectedImport.getTime());
	assertEquals(exec.getRepeatInterval().getMinutes(), customIntervalLength);
	assertTrue(exec.isOverwriting());
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-android,代码行数:24,代码来源:DataSourceImportTest.java

示例13: loadDataSource

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Data source is loaded correctly from service. */
public void loadDataSource() {
	CachedList<DataSource> dataSources = service.getDataSources(dsId);

	registerSingleDataSource(builder.buildDataSourceNode(id, name, type));

	dataSources.load();
	server.assertRequestUris(dataSourcesUri);
	assertEquals(dataSources.toList().size(), 1);

	DataSource source = dataSources.toList().get(0);

	assertEquals(source.getId(), id);
	assertEquals(source.getName(), name);
	assertEquals(source.getType(), type);

	assertEquals(source.toString(), name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-android,代码行数:19,代码来源:DataSourcesTest.java

示例14: loadFromDataSet

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
/** Data source is loaded correctly from data set. */
public void loadFromDataSet() {
	DataSet dataSet = new DataSetImpl(service, builder.buildDataSetNode(dsId, "", null, null, null));
	CachedList<DataSource> dataSources = dataSet.getDataSources();

	registerSingleDataSource(builder.buildDataSourceNode(id, name, type));

	dataSources.load();
	server.assertRequestUris(dataSourcesUri);
	assertEquals(dataSources.toList().size(), 1);

	DataSource source = dataSources.toList().get(0);

	assertEquals(source.getId(), id);
	assertEquals(source.getName(), name);
	assertEquals(source.getType(), type);

	assertEquals(source.toString(), name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-android,代码行数:20,代码来源:DataSourcesTest.java

示例15: loadForms_withoutElements

import com.belladati.sdk.util.CachedList; //导入方法依赖的package包/类
public void loadForms_withoutElements() {
	server.registerPaginatedItem(baseUri, "importForms", builder.buildFormNode(id, name, recordTimestamp));

	CachedList<Form> list = getService().getImportForms();
	list.load();
	server.assertRequestUris(baseUri);
	assertEquals(list.get().size(), 1);

	Form form = list.get().get(0);
	assertEquals(form.getId(), id);
	assertEquals(form.getName(), name);
	assertEquals(form.getRecordTimestamp() + "", recordTimestamp);
	assertEquals(form.getElements().size(), 0);
	assertEquals(form.toString(), name);
}
 
开发者ID:BellaDati,项目名称:belladati-sdk-java,代码行数:16,代码来源:FormTest.java


注:本文中的com.belladati.sdk.util.CachedList.load方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。