本文整理汇总了Java中org.kuali.rice.kim.api.role.RoleResponsibility类的典型用法代码示例。如果您正苦于以下问题:Java RoleResponsibility类的具体用法?Java RoleResponsibility怎么用?Java RoleResponsibility使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
RoleResponsibility类属于org.kuali.rice.kim.api.role包,在下文中一共展示了RoleResponsibility类的19个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: saveRoleMember
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
public RoleMemberBo saveRoleMember(RoleMemberBo roleMember){
//need to find what responsibilities changed so we can notify interested clients. Like workflow.
List<RoleResponsibility> oldRoleResp = getRoleResponsibilities(roleMember.getRoleId());
// add row to member table
RoleMemberBo member = dataObjectService.save( roleMember, PersistenceOption.FLUSH );
//need to find what responsibilities changed so we can notify interested clients. Like workflow.
// the new member has been added
List<RoleResponsibility> newRoleResp = getRoleResponsibilities(roleMember.getRoleId());
updateActionRequestsForResponsibilityChange(getChangedRoleResponsibilityIds(oldRoleResp, newRoleResp));
return member;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:18,代码来源:ResponsibilityInternalServiceImpl.java
示例2: removeRoleMember
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
public void removeRoleMember(RoleMemberBo roleMember){
//need to find what responsibilities changed so we can notify interested clients. Like workflow.
List<RoleResponsibility> oldRoleResp = getRoleResponsibilities(roleMember.getRoleId());
// need to set end date to inactivate, not delete
roleMember.setActiveToDateValue(dateTimeService.getCurrentTimestamp());
roleMember = dataObjectService.save( roleMember, PersistenceOption.FLUSH );
// Notify the RoleTypeService for this role that the member was removed
KimApiServiceLocator.getRoleService().notifyOnMemberRemoval(RoleMemberBo.to(roleMember));
//need to find what responsibilities changed so we can notify interested clients. Like workflow.
// the new member has been added
List<RoleResponsibility> newRoleResp = getRoleResponsibilities(roleMember.getRoleId());
updateActionRequestsForResponsibilityChange(getChangedRoleResponsibilityIds(oldRoleResp, newRoleResp));
}
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:ResponsibilityInternalServiceImpl.java
示例3: setupRoleRspActions
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
protected void setupRoleRspActions(PersonDocumentRole role, KimDocumentRoleMember rolePrncpl) {
for (RoleResponsibility roleResp : getResponsibilityInternalService().getRoleResponsibilities(role.getRoleId())) {
if (getResponsibilityInternalService().areActionsAtAssignmentLevelById(roleResp.getResponsibilityId())) {
KimDocumentRoleResponsibilityAction roleRspAction = new KimDocumentRoleResponsibilityAction();
roleRspAction.setRoleResponsibilityId("*");
// not linked to a role responsibility - so we set the referenced object to null
roleRspAction.setRoleResponsibility(null);
roleRspAction.setDocumentNumber(role.getDocumentNumber());
if(rolePrncpl.getRoleRspActions()==null || rolePrncpl.getRoleRspActions().isEmpty()){
if(rolePrncpl.getRoleRspActions()==null) {
rolePrncpl.setRoleRspActions(new ArrayList<KimDocumentRoleResponsibilityAction>());
}
rolePrncpl.getRoleRspActions().add(roleRspAction);
}
}
}
}
开发者ID:kuali,项目名称:kc-rice,代码行数:19,代码来源:IdentityManagementPersonDocumentAction.java
示例4: saveRoleMember
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
public RoleMemberBo saveRoleMember(RoleMemberBo roleMember){
//need to find what responsibilities changed so we can notify interested clients. Like workflow.
List<RoleResponsibility> oldRoleResp = getRoleResponsibilities(roleMember.getRoleId());
// add row to member table
RoleMemberBo member = getBusinessObjectService().save( roleMember );
//need to find what responsibilities changed so we can notify interested clients. Like workflow.
// the new member has been added
List<RoleResponsibility> newRoleResp = getRoleResponsibilities(roleMember.getRoleId());
updateActionRequestsForResponsibilityChange(getChangedRoleResponsibilityIds(oldRoleResp, newRoleResp));
return member;
}
开发者ID:aapotts,项目名称:kuali_rice,代码行数:18,代码来源:ResponsibilityInternalServiceImpl.java
示例5: from
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
public static RoleResponsibilityBo from(RoleResponsibility immutable) {
if (immutable == null) {
return null;
}
RoleResponsibilityBo bo = new RoleResponsibilityBo();
bo.roleResponsibilityId = immutable.getRoleResponsibilityId();
bo.roleId = immutable.getRoleId();
bo.responsibilityId = immutable.getResponsibilityId();
bo.active = immutable.isActive();
bo.setVersionNumber(immutable.getVersionNumber());
return bo;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:13,代码来源:RoleResponsibilityBo.java
示例6: getRoleResponsibilities
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
public List<RoleResponsibility> getRoleResponsibilities(String roleId) throws RiceIllegalStateException {
incomingParamCheck(roleId, "roleId");
List<RoleResponsibilityBo> roleResponsibilityBos = getDataObjectService().findMatching(
RoleResponsibilityBo.class, QueryByCriteria.Builder.forAttribute(
KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, roleId).build()).getResults();
List<RoleResponsibility> roleResponsibilities = new ArrayList<RoleResponsibility>();
for (RoleResponsibilityBo roleResponsibilityImpl : roleResponsibilityBos) {
roleResponsibilities.add(RoleResponsibilityBo.to(roleResponsibilityImpl));
}
return Collections.unmodifiableList(roleResponsibilities);
}
开发者ID:kuali,项目名称:kc-rice,代码行数:15,代码来源:RoleServiceImpl.java
示例7: updateActionRequestsForRoleChange
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void updateActionRequestsForRoleChange(String roleId) {
List<RoleResponsibility> newRoleResp = getRoleResponsibilities(roleId);
updateActionRequestsForResponsibilityChange(getChangedRoleResponsibilityIds(Collections.EMPTY_LIST, newRoleResp));
}
开发者ID:kuali,项目名称:kc-rice,代码行数:8,代码来源:ResponsibilityInternalServiceImpl.java
示例8: getRoleResponsibilities
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
public List<RoleResponsibility> getRoleResponsibilities(String roleId){
List<RoleResponsibilityBo> rrBoList = dataObjectService.findMatching( RoleResponsibilityBo.class, QueryByCriteria.Builder.fromPredicates(
PredicateFactory.equal(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, roleId),
PredicateFactory.equal(KRADPropertyConstants.ACTIVE,Boolean.TRUE) ) ).getResults();
List<RoleResponsibility> result = new ArrayList<RoleResponsibility>( rrBoList.size() );
for ( RoleResponsibilityBo bo : rrBoList ) {
result.add( RoleResponsibilityBo.to(bo) );
}
return result;
}
开发者ID:kuali,项目名称:kc-rice,代码行数:12,代码来源:ResponsibilityInternalServiceImpl.java
示例9: updateDelegationRole
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
/**
* Updates the role that this delegate is part of, to account for the changes in this delegate
*/
@Override
@Transactional
public void updateDelegationRole() {
final RoleService roleManagementService = KimApiServiceLocator.getRoleService();
final String roleId = roleManagementService.getRoleIdByNamespaceCodeAndName(OLEConstants.CoreModuleNamespaces.OLE, OLEConstants.SysKimApiConstants.FISCAL_OFFICER_KIM_ROLE_NAME);
if (!StringUtils.isBlank(roleId)) {
List<RoleResponsibility> newRoleResp = roleManagementService.getRoleResponsibilities(roleId);
KEWServiceLocator.getActionRequestService().updateActionRequestsForResponsibilityChange(getChangedRoleResponsibilityIds(newRoleResp));
}
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:14,代码来源:AccountDelegateServiceImpl.java
示例10: getChangedRoleResponsibilityIds
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
protected Set<String> getChangedRoleResponsibilityIds( List<RoleResponsibility> newRoleResp){
Set<String> lRet = new HashSet<String>();
if(ObjectUtils.isNotNull(newRoleResp)){
for(RoleResponsibility roleResp: newRoleResp){
lRet.add(roleResp.getResponsibilityId());
}
}
return lRet;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:10,代码来源:AccountDelegateServiceImpl.java
示例11: getNumberOfResponsibilitiesWithRoleMemberLevelActions
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
protected int getNumberOfResponsibilitiesWithRoleMemberLevelActions( Role role ) {
List<RoleResponsibility> roleResponsibilities = roleService.getRoleResponsibilities(role.getId());
assertNotNull( "There should have been responsibilities assigned to the role (was null)", roleResponsibilities );
assertFalse( "There should have been responsibilities assigned to the role", roleResponsibilities.isEmpty() );
int num = 0;
for ( RoleResponsibility rr : roleResponsibilities ) {
Responsibility r = responsibilityService.getResponsibility(rr.getResponsibilityId());
if ( Boolean.parseBoolean( r.getAttributes().get(KimConstants.AttributeConstants.ACTION_DETAILS_AT_ROLE_MEMBER_LEVEL) ) ) {
num++;
}
}
return num;
}
开发者ID:VU-libtech,项目名称:OLE-INST,代码行数:14,代码来源:OrgReviewRoleTestBase.java
示例12: updateDelegationRole
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
/**
* Updates the role that this delegate is part of, to account for the changes in this delegate
*/
@Override
@Transactional
public void updateDelegationRole() {
final RoleService roleManagementService = KimApiServiceLocator.getRoleService();
final String roleId = roleManagementService.getRoleIdByNamespaceCodeAndName(KFSConstants.ParameterNamespaces.KFS, KFSConstants.SysKimApiConstants.FISCAL_OFFICER_KIM_ROLE_NAME);
if (!StringUtils.isBlank(roleId)) {
List<RoleResponsibility> newRoleResp = roleManagementService.getRoleResponsibilities(roleId);
KEWServiceLocator.getActionRequestService().updateActionRequestsForResponsibilityChange(getChangedRoleResponsibilityIds(newRoleResp));
}
}
开发者ID:kuali,项目名称:kfs,代码行数:14,代码来源:AccountDelegateServiceImpl.java
示例13: addGroupToRole
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
public void addGroupToRole(EdoGroup group) {
// assign the group to a role
RoleMember roleMember = KimApiServiceLocator.getRoleService().assignGroupToRole(group.getKimGroupId(), EdoConstants.EDO_NAME_SPACE, group.getKimRoleName(), group.getGrpAttributes());
List<RoleResponsibility> kimRoleResponsibilities = KimApiServiceLocator.getRoleService().getRoleResponsibilities(roleMember.getRoleId());
for (RoleResponsibility kimRoleResp : kimRoleResponsibilities) {
Role kimRole = KimApiServiceLocator.getRoleService().getRole(kimRoleResp.getRoleId());
Responsibility kimResponsibility = KimApiServiceLocator.getResponsibilityService().getResponsibility(kimRoleResp.getResponsibilityId());
List<EdoRoleResponsibility> edoRoleResponsibilityList = EdoServiceLocator.getEdoRoleResponsibilityService().getEdoRoleResponsibilityByRoleAndResponsibility(kimRole.getName(),kimResponsibility.getName());
for (EdoRoleResponsibility edoRoleResp : edoRoleResponsibilityList) {
RoleResponsibilityAction.Builder roleRespActionBuilder = RoleResponsibilityAction.Builder.create();
roleRespActionBuilder.setRoleResponsibility(kimRoleResp);
roleRespActionBuilder.setRoleResponsibilityId(kimRoleResp.getRoleResponsibilityId());
roleRespActionBuilder.setRoleMemberId(roleMember.getId());
roleRespActionBuilder.setForceAction(edoRoleResp.isKimForceAction());
roleRespActionBuilder.setActionTypeCode(edoRoleResp.getKimActionTypeCode());
roleRespActionBuilder.setActionPolicyCode(edoRoleResp.getKimActionPolicyCode());
roleRespActionBuilder.setPriorityNumber(edoRoleResp.getKimPriority());
RoleResponsibilityAction roleResponsibilityAction = roleRespActionBuilder.build();
// and add it to the list
RoleResponsibilityAction foo = KimApiServiceLocator.getRoleService().createRoleResponsibilityAction(roleResponsibilityAction);
}
}
return;
}
开发者ID:kuali-mirror,项目名称:kpme,代码行数:32,代码来源:EdoGroupServiceImpl.java
示例14: getRoleResponsibilities
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
public List<RoleResponsibility> getRoleResponsibilities(String roleId) throws RiceIllegalStateException {
incomingParamCheck(roleId, "roleId");
Map<String, String> criteria = new HashMap<String, String>(1);
criteria.put(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, roleId);
List<RoleResponsibilityBo> roleResponsibilityBos = (List<RoleResponsibilityBo>)
getBusinessObjectService().findMatching(RoleResponsibilityBo.class, criteria);
List<RoleResponsibility> roleResponsibilities = new ArrayList<RoleResponsibility>();
for (RoleResponsibilityBo roleResponsibilityImpl : roleResponsibilityBos) {
roleResponsibilities.add(RoleResponsibilityBo.to(roleResponsibilityImpl));
}
return Collections.unmodifiableList(roleResponsibilities);
}
开发者ID:aapotts,项目名称:kuali_rice,代码行数:16,代码来源:RoleServiceImpl.java
示例15: removeRoleMember
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
public void removeRoleMember(RoleMemberBo roleMember){
//need to find what responsibilities changed so we can notify interested clients. Like workflow.
List<RoleResponsibility> oldRoleResp = getRoleResponsibilities(roleMember.getRoleId());
// need to set end date to inactivate, not delete
roleMember.setActiveToDateValue(new java.sql.Timestamp(System.currentTimeMillis()));
getBusinessObjectService().save( roleMember );
//need to find what responsibilities changed so we can notify interested clients. Like workflow.
// the new member has been added
List<RoleResponsibility> newRoleResp = getRoleResponsibilities(roleMember.getRoleId());
updateActionRequestsForResponsibilityChange(getChangedRoleResponsibilityIds(oldRoleResp, newRoleResp));
}
开发者ID:aapotts,项目名称:kuali_rice,代码行数:16,代码来源:ResponsibilityInternalServiceImpl.java
示例16: updateActionRequestsForRoleChange
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@Override
@SuppressWarnings("unchecked")
public void updateActionRequestsForRoleChange(String roleId) {
List<RoleResponsibility> newRoleResp = getRoleResponsibilities(roleId);
updateActionRequestsForResponsibilityChange(getChangedRoleResponsibilityIds(Collections.EMPTY_LIST, newRoleResp));
}
开发者ID:aapotts,项目名称:kuali_rice,代码行数:8,代码来源:ResponsibilityInternalServiceImpl.java
示例17: getRoleResponsibilities
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
@SuppressWarnings("unchecked")
public List<RoleResponsibility> getRoleResponsibilities(String roleId){
List<RoleResponsibilityBo> rrBoList =
(List<RoleResponsibilityBo>)getBusinessObjectService()
.findMatching(RoleResponsibilityBo.class, Collections.singletonMap(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, roleId));
List<RoleResponsibility> result = new ArrayList<RoleResponsibility>( rrBoList.size() );
for ( RoleResponsibilityBo bo : rrBoList ) {
result.add( RoleResponsibilityBo.to(bo) );
}
return result;
}
开发者ID:aapotts,项目名称:kuali_rice,代码行数:12,代码来源:ResponsibilityInternalServiceImpl.java
示例18: to
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
public static RoleResponsibility to(RoleResponsibilityBo bo) {
if (bo == null) {
return null;
}
return RoleResponsibility.Builder.create(bo).build();
}
开发者ID:kuali,项目名称:kc-rice,代码行数:7,代码来源:RoleResponsibilityBo.java
示例19: getRoleResponsibilities
import org.kuali.rice.kim.api.role.RoleResponsibility; //导入依赖的package包/类
/**
* Get all the role-responsibility records attached to the given role.
*/
public List<RoleResponsibility> getRoleResponsibilities(String roleId);
开发者ID:kuali,项目名称:kc-rice,代码行数:5,代码来源:ResponsibilityInternalService.java
注:本文中的org.kuali.rice.kim.api.role.RoleResponsibility类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论