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


Java KimApiServiceLocator.getIdentityService方法代码示例

本文整理汇总了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()));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:26,代码来源:GroupXmlImportTest.java

示例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;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:UserLoginFilter.java

示例3: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
    if (identityService == null) {
        identityService = KimApiServiceLocator.getIdentityService();
    }

    return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:RoleServiceBase.java

示例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;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:PersonImpl.java

示例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;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:10,代码来源:ActionRequestFactory.java

示例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")));
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:KEWIntegrationTest.java

示例7: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
	if ( identityService == null ) {
		identityService = KimApiServiceLocator.getIdentityService();
	}
	return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:PrincipalDerivedRoleTypeServiceImpl.java

示例8: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
    if ( identityService == null ) {
        identityService = KimApiServiceLocator.getIdentityService();
    }
    return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:KimRemoteModuleService.java

示例9: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
private static IdentityService getIdentityService() {
	if ( identityService == null ) {
		identityService = KimApiServiceLocator.getIdentityService();
	}
	return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:KimInternalSuppressUtils.java

示例10: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected static IdentityService getIdentityService() {
    if ( identityService == null ) {
        identityService = KimApiServiceLocator.getIdentityService();
    }
    return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:BaseSendNotificationController.java

示例11: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
   	if ( identityService == null ) {
   		identityService = KimApiServiceLocator.getIdentityService();
   	}
	return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:IdentityManagementDocumentActionBase.java

示例12: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
public IdentityService getIdentityService() {
    if ( identityService == null) {
        identityService = KimApiServiceLocator.getIdentityService();
    }
    return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:IdentityManagementGroupDocumentRule.java

示例13: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
protected IdentityService getIdentityService() {
    if ( identityService == null) {
        identityService = KimApiServiceLocator.getIdentityService();
    }
    return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:IdentityManagementRoleDocumentRule.java

示例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);
        }
*/
    }
 
开发者ID:kuali,项目名称:kc-rice,代码行数:52,代码来源:GroupXmlExporterTest.java

示例15: getIdentityService

import org.kuali.rice.kim.api.services.KimApiServiceLocator; //导入方法依赖的package包/类
public IdentityService getIdentityService() {
	if ( identityService == null ) {
		identityService = KimApiServiceLocator.getIdentityService();
	}
	return identityService;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:IdentityManagementServiceImpl.java


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