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


Java ICompanyRepository類代碼示例

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


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

示例1: prepareData

import org.ligoj.app.iam.ICompanyRepository; //導入依賴的package包/類
@Before
public void prepareData() throws IOException {
	persistEntities("csv",
			new Class[] { DelegateOrg.class, ContainerScope.class, CacheCompany.class, CacheUser.class, CacheGroup.class, CacheMembership.class },
			StandardCharsets.UTF_8.name());
	CacheManager.getInstance().getCache("container-scopes").removeAll();

	iamProvider = Mockito.mock(IamProvider.class);
	final IamConfiguration configuration = Mockito.mock(IamConfiguration.class);
	Mockito.when(iamProvider.getConfiguration()).thenReturn(configuration);
	userRepository = Mockito.mock(IUserRepository.class);
	groupRepository = Mockito.mock(IGroupRepository.class);
	companyRepository = Mockito.mock(ICompanyRepository.class);
	Mockito.when(configuration.getUserRepository()).thenReturn(userRepository);
	Mockito.when(configuration.getCompanyRepository()).thenReturn(companyRepository);
	Mockito.when(configuration.getGroupRepository()).thenReturn(groupRepository);
}
 
開發者ID:ligoj,項目名稱:plugin-id,代碼行數:18,代碼來源:AbstractContainerResourceTest.java

示例2: prepareData

import org.ligoj.app.iam.ICompanyRepository; //導入依賴的package包/類
@Before
public void prepareData() throws IOException {
	persistEntities("csv",
			new Class[] { DelegateOrg.class, CacheCompany.class, CacheGroup.class, CacheUser.class, CacheMembership.class },
			StandardCharsets.UTF_8.name());
	iamProvider = Mockito.mock(IamProvider.class);
	final IamConfiguration configuration = Mockito.mock(IamConfiguration.class);
	Mockito.when(iamProvider.getConfiguration()).thenReturn(configuration);
	userRepository = Mockito.mock(IUserRepository.class);
	groupRepository = Mockito.mock(IGroupRepository.class);
	companyRepository = Mockito.mock(ICompanyRepository.class);
	Mockito.when(configuration.getUserRepository()).thenReturn(userRepository);
	Mockito.when(configuration.getCompanyRepository()).thenReturn(companyRepository);
	Mockito.when(configuration.getGroupRepository()).thenReturn(groupRepository);
	resource = new UserOrgResource();
	applicationContext.getAutowireCapableBeanFactory().autowireBean(resource);
	resource.setIamProvider(new IamProvider[] { iamProvider });
	Mockito.when(companyRepository.getTypeName()).thenReturn("company");
}
 
開發者ID:ligoj,項目名稱:plugin-id,代碼行數:20,代碼來源:UserOrgResourceTest.java

示例3: getRepository

import org.ligoj.app.iam.ICompanyRepository; //導入依賴的package包/類
@Override
public ICompanyRepository getRepository() {
	return getCompany();
}
 
開發者ID:ligoj,項目名稱:plugin-id,代碼行數:5,代碼來源:CompanyResource.java

示例4: getCompany

import org.ligoj.app.iam.ICompanyRepository; //導入依賴的package包/類
/**
 * Company repository provider.
 * 
 * @return Company repository provider.
 */
protected ICompanyRepository getCompany() {
	return iamProvider[0].getConfiguration().getCompanyRepository();
}
 
開發者ID:ligoj,項目名稱:plugin-id,代碼行數:9,代碼來源:AbstractOrgResource.java


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