本文整理汇总了Java中org.kuali.rice.kim.api.services.KimApiServiceLocator.getIdentityService方法的典型用法代码示例。如果您正苦于以下问题:Java KimApiServiceLocator.getIdentityService方法的具体用法?Java KimApiServiceLocator.getIdentityService怎么用?Java KimApiServiceLocator.getIdentityService使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.kuali.rice.kim.api.services.KimApiServiceLocator
的用法示例。
在下文中一共展示了KimApiServiceLocator.getIdentityService方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: testGroupImportXml
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
/**
*
* Verify that a workgroup with a bad user in the xml is not going to be put in the db.
*
* @throws Exception
*/
@Test public void testGroupImportXml() throws Exception {
loadXmlFile("GroupXmlImportTest.xml");
IdentityService identityService = KimApiServiceLocator.getIdentityService();
GroupService groupService = KimApiServiceLocator.getGroupService();
//verify that the group was ingested
Group group = groupService.getGroupByNamespaceCodeAndName(KimConstants.KIM_GROUP_WORKFLOW_NAMESPACE_CODE,
"TestUserGroup");
assertNotNull(group);
List<String> members = groupService.getMemberPrincipalIds(group.getId());
List<String> groups = groupService.getMemberGroupIds(group.getId());
assertTrue(groupService.isMemberOfGroup(identityService.getPrincipalByPrincipalName("ewestfal").getPrincipalId(), group.getId()));
assertTrue(groupService.isMemberOfGroup(identityService.getPrincipalByPrincipalName("rkirkend").getPrincipalId(), group.getId()));
assertTrue(groupService.isMemberOfGroup("2015", group.getId()));
assertTrue(KimApiServiceLocator.getGroupService().isGroupMemberOfGroup(groupService.getGroupByNamespaceCodeAndName(
KimConstants.KIM_GROUP_WORKFLOW_NAMESPACE_CODE, "TestWorkgroup").getId(), group.getId()));
}
示例2: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
if (this.identityService == null) {
this.identityService = KimApiServiceLocator.getIdentityService();
}
return this.identityService;
}
示例3: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
if (identityService == null) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例4: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
/**
* @return the identityService
*/
public static IdentityService getIdentityService() {
if ( identityService == null ) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例5: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
/**
* @return the identityService
*/
protected static IdentityService getIdentityService() {
if ( identityService == null ) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例6: testKEWServicesAreAccessible
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
@Test
public void testKEWServicesAreAccessible() throws Exception {
IdentityService identityService = KimApiServiceLocator.getIdentityService();
assertNotNull(identityService);
LOG.info("Default KIM IdentityManagementService: " + identityService);
SendNotificationService notification = (SendNotificationService) GlobalResourceLoader.getService(new QName(
KenApiConstants.Namespaces.KEN_NAMESPACE_2_0, "sendNotificationService"));
assertNotNull(notification);
// XmlIngesterService is = SpringServiceLocator..getXmlIngesterService();
// check that the quickstart user is present
//assertNotNull(userService.getWorkflowUser(new WorkflowUserId("quickstart")));
}
示例7: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
if ( identityService == null ) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例8: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
if ( identityService == null ) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例9: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
private static IdentityService getIdentityService() {
if ( identityService == null ) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例10: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected static IdentityService getIdentityService() {
if ( identityService == null ) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例11: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
if ( identityService == null ) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例12: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
public IdentityService getIdentityService() {
if ( identityService == null) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例13: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
if ( identityService == null) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}
示例14: assertExport
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
/**
* This overridden method ...
*
* @see org.kuali.rice.kew.xml.export.XmlExporterTestCase#assertExport()
*/
@Override
protected void assertExport() throws Exception {
IdentityService identityService = KimApiServiceLocator.getIdentityService();
GroupService groupService = KimApiServiceLocator.getGroupService();
List<? extends Group> oldGroups = groupService.getGroupsByPrincipalId(
identityService.getPrincipalByPrincipalName("ewestfal").getPrincipalId());
KewExportDataSet dataSet = new KewExportDataSet();
dataSet.getGroups().addAll(oldGroups);
byte[] xmlBytes = CoreApiServiceLocator.getXmlExporterService().export(dataSet.createExportDataSet());
assertTrue("XML should be non empty.", xmlBytes != null && xmlBytes.length > 0);
StringBuffer output = new StringBuffer();
for (int i=0; i < xmlBytes.length; i++){
output.append((char)xmlBytes[i]);
}
System.out.print(output.toString());
// now clear the tables
//ClearDatabaseLifecycle clearLifeCycle = new ClearDatabaseLifecycle();
//clearLifeCycle.getTablesToClear().add("EN_RULE_BASE_VAL_T");
//clearLifeCycle.getTablesToClear().add("EN_RULE_ATTRIB_T");
//clearLifeCycle.getTablesToClear().add("EN_RULE_TMPL_T");
//clearLifeCycle.getTablesToClear().add("EN_DOC_TYP_T");
//clearLifeCycle.start();
//new ClearCacheLifecycle().stop();
//KimImplServiceLocator.getGroupService().
// import the exported xml
//loadXmlStream(new BufferedInputStream(new ByteArrayInputStream(xmlBytes)));
/*
List newRules = KEWServiceLocator.getRuleService().fetchAllRules(true);
assertEquals("Should have same number of old and new Rules.", oldRules.size(), newRules.size());
for (Iterator iterator = oldRules.iterator(); iterator.hasNext();) {
RuleBaseValues oldRule = (RuleBaseValues) iterator.next();
boolean foundRule = false;
for (Iterator iterator2 = newRules.iterator(); iterator2.hasNext();) {
RuleBaseValues newRule = (RuleBaseValues) iterator2.next();
if (oldRule.getDescription().equals(newRule.getDescription())) {
assertRuleExport(oldRule, newRule);
foundRule = true;
}
}
assertTrue("Could not locate the new rule for description " + oldRule.getDescription(), foundRule);
}
*/
}
示例15: getIdentityService
import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
public IdentityService getIdentityService() {
if ( identityService == null ) {
identityService = KimApiServiceLocator.getIdentityService();
}
return identityService;
}