use of org.wso2.carbon.identity.role.mgt.core.RoleManagementEventPublisherProxy in project carbon-identity-framework by wso2.
the class RoleManagementServiceImpl method deleteRole.
@Override
public void deleteRole(String roleID, String tenantDomain) throws IdentityRoleManagementException {
RoleManagementEventPublisherProxy roleManagementEventPublisherProxy = RoleManagementEventPublisherProxy.getInstance();
roleManagementEventPublisherProxy.publishPreDeleteRole(roleID, tenantDomain);
roleDAO.deleteRole(roleID, tenantDomain);
roleManagementEventPublisherProxy.publishPostDeleteRole(roleID, tenantDomain);
if (log.isDebugEnabled()) {
log.debug(String.format("%s deleted role of id : %s successfully.", getUser(tenantDomain), roleID));
}
audit.info(String.format(auditMessage, getUser(tenantDomain), "Delete role by id", roleID, getAuditData(tenantDomain), success));
}
use of org.wso2.carbon.identity.role.mgt.core.RoleManagementEventPublisherProxy in project carbon-identity-framework by wso2.
the class RoleManagementServiceImpl method updateRoleName.
@Override
public RoleBasicInfo updateRoleName(String roleID, String newRoleName, String tenantDomain) throws IdentityRoleManagementException {
RoleManagementEventPublisherProxy roleManagementEventPublisherProxy = RoleManagementEventPublisherProxy.getInstance();
roleManagementEventPublisherProxy.publishPreUpdateRoleName(roleID, newRoleName, tenantDomain);
RoleBasicInfo roleBasicInfo = roleDAO.updateRoleName(roleID, newRoleName, tenantDomain);
roleManagementEventPublisherProxy.publishPostUpdateRoleName(roleID, newRoleName, tenantDomain);
if (log.isDebugEnabled()) {
log.debug(String.format("%s updated role name of role id : %s successfully.", getUser(tenantDomain), roleID));
}
audit.info(String.format(auditMessage, getUser(tenantDomain), "Update role name by ID", roleID, getAuditData(tenantDomain, newRoleName), success));
return roleBasicInfo;
}
use of org.wso2.carbon.identity.role.mgt.core.RoleManagementEventPublisherProxy in project carbon-identity-framework by wso2.
the class RoleManagementServiceImpl method getRole.
@Override
public Role getRole(String roleID, String tenantDomain) throws IdentityRoleManagementException {
RoleManagementEventPublisherProxy roleManagementEventPublisherProxy = RoleManagementEventPublisherProxy.getInstance();
roleManagementEventPublisherProxy.publishPreGetRole(roleID, tenantDomain);
Role role = roleDAO.getRole(roleID, tenantDomain);
roleManagementEventPublisherProxy.publishPostGetRole(roleID, tenantDomain);
if (log.isDebugEnabled()) {
log.debug(String.format("%s get role of id : %s successfully.", getUser(tenantDomain), roleID));
}
return role;
}
use of org.wso2.carbon.identity.role.mgt.core.RoleManagementEventPublisherProxy in project carbon-identity-framework by wso2.
the class RoleManagementServiceImpl method updateGroupListOfRole.
@Override
public RoleBasicInfo updateGroupListOfRole(String roleID, List<String> newGroupIDList, List<String> deletedGroupIDList, String tenantDomain) throws IdentityRoleManagementException {
RoleManagementEventPublisherProxy roleManagementEventPublisherProxy = RoleManagementEventPublisherProxy.getInstance();
roleManagementEventPublisherProxy.publishPreUpdateGroupListOfRole(roleID, newGroupIDList, deletedGroupIDList, tenantDomain);
RoleBasicInfo roleBasicInfo = roleDAO.updateGroupListOfRole(roleID, newGroupIDList, deletedGroupIDList, tenantDomain);
roleManagementEventPublisherProxy.publishPostUpdateGroupListOfRole(roleID, newGroupIDList, deletedGroupIDList, tenantDomain);
if (log.isDebugEnabled()) {
log.debug(String.format("%s updated list of groups of role of id : %s successfully.", getUser(tenantDomain), roleID));
}
audit.info(String.format(auditMessage, getUser(tenantDomain), "Update group list of role by id", roleID, getAuditData(tenantDomain), success));
return roleBasicInfo;
}
use of org.wso2.carbon.identity.role.mgt.core.RoleManagementEventPublisherProxy in project carbon-identity-framework by wso2.
the class RoleManagementServiceImpl method getGroupListOfRole.
@Override
public List<GroupBasicInfo> getGroupListOfRole(String roleID, String tenantDomain) throws IdentityRoleManagementException {
RoleManagementEventPublisherProxy roleManagementEventPublisherProxy = RoleManagementEventPublisherProxy.getInstance();
roleManagementEventPublisherProxy.publishPreGetUserListOfRole(roleID, tenantDomain);
List<GroupBasicInfo> groupBasicInfoList = roleDAO.getGroupListOfRole(roleID, tenantDomain);
roleManagementEventPublisherProxy.publishPostGetUserListOfRole(roleID, tenantDomain);
if (log.isDebugEnabled()) {
log.debug(String.format("%s get list of groups of role of id : %s successfully.", getUser(tenantDomain), roleID));
}
return groupBasicInfoList;
}
Aggregations