本文整理汇总了Java中org.kuali.rice.krad.util.KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE属性的典型用法代码示例。如果您正苦于以下问题:Java KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE属性的具体用法?Java KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE怎么用?Java KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.kuali.rice.krad.util.KRADConstants
的用法示例。
在下文中一共展示了KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE属性的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: isModuleLocked
/**
* Determines the module associated with the given request and then checks whether the module is locked
*
* @param request request object to pull parameters from
* @return boolean true if the associated module is locked, false if not or no associated module was found
*/
protected boolean isModuleLocked(HttpServletRequest request) {
ModuleService moduleService = getModuleService(request);
if (moduleService != null && moduleService.isLocked()) {
String principalId = GlobalVariables.getUserSession().getPrincipalId();
String namespaceCode = KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE;
String permissionName = KimConstants.PermissionNames.ACCESS_LOCKED_MODULE;
Map<String, String> permissionDetails = new HashMap<String, String>();
Map<String, String> qualification = new HashMap<String, String>();
if (!KimApiServiceLocator.getPermissionService().isAuthorized(principalId, namespaceCode, permissionName,
qualification)) {
return true;
}
}
return false;
}
示例2: canInitiate
public final boolean canInitiate(String documentTypeName, Person user) {
String nameSpaceCode = KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE;
Map<String, String> permissionDetails = new HashMap<String, String>();
permissionDetails.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, documentTypeName);
return getPermissionService().isAuthorizedByTemplate(user.getPrincipalId(), nameSpaceCode,
KimConstants.PermissionTemplateNames.INITIATE_DOCUMENT, permissionDetails,
Collections.<String, String>emptyMap());
}
示例3: isModuleLocked
protected boolean isModuleLocked(ActionForm form, String methodToCall, HttpServletRequest request) {
String boClass = request.getParameter(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE);
ModuleService moduleService = null;
if(StringUtils.isNotBlank(boClass)) {
try {
moduleService = getKualiModuleService().getResponsibleModuleService(Class.forName(boClass));
} catch (ClassNotFoundException classNotFoundException) {
LOG.warn("BO class not found: " + boClass, classNotFoundException);
}
} else {
moduleService = getKualiModuleService().getResponsibleModuleService(this.getClass());
}
if(moduleService != null && moduleService.isLocked()) {
String principalId = GlobalVariables.getUserSession().getPrincipalId();
String namespaceCode = KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE;
String permissionName = KimConstants.PermissionNames.ACCESS_LOCKED_MODULE;
Map<String, String> qualification = getRoleQualification(form, methodToCall);
if(!KimApiServiceLocator.getPermissionService().isAuthorized(principalId, namespaceCode, permissionName, qualification)) {
ParameterService parameterSerivce = CoreFrameworkServiceLocator.getParameterService();
String messageParamNamespaceCode = moduleService.getModuleConfiguration().getNamespaceCode();
String messageParamComponentCode = KRADConstants.DetailTypes.ALL_DETAIL_TYPE;
String messageParamName = KRADConstants.SystemGroupParameterNames.OLTP_LOCKOUT_MESSAGE_PARM;
String lockoutMessage = parameterSerivce.getParameterValueAsString(messageParamNamespaceCode, messageParamComponentCode, messageParamName);
if(StringUtils.isBlank(lockoutMessage)) {
String defaultMessageParamName = KRADConstants.SystemGroupParameterNames.OLTP_LOCKOUT_DEFAULT_MESSAGE;
lockoutMessage = parameterSerivce.getParameterValueAsString(KRADConstants.KNS_NAMESPACE, messageParamComponentCode, defaultMessageParamName);
}
request.setAttribute(KRADConstants.MODULE_LOCKED_MESSAGE_REQUEST_PARAMETER, lockoutMessage);
return true;
}
}
return false;
}
示例4: canInitiate
public boolean canInitiate(String documentTypeName, Person user) {
String nameSpaceCode = KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE;
Map<String, String> permissionDetails = new HashMap<String, String>();
permissionDetails.put(KimConstants.AttributeConstants.DOCUMENT_TYPE_NAME, documentTypeName);
return getPermissionService().isAuthorizedByTemplate(user.getPrincipalId(), nameSpaceCode,
KimConstants.PermissionTemplateNames.INITIATE_DOCUMENT, permissionDetails,
Collections.<String, String>emptyMap());
}
示例5: isModuleLocked
protected boolean isModuleLocked(ActionForm form, String methodToCall, HttpServletRequest request) {
String boClass = request.getParameter(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE);
ModuleService moduleService = null;
if(StringUtils.isNotBlank(boClass)) {
try {
moduleService = KRADServiceLocatorWeb.getKualiModuleService().getResponsibleModuleService(Class.forName(boClass));
} catch (ClassNotFoundException e) {
LOG.warn("Module locking mechanism experienced a class not found exception while trying to load " + boClass, e);
}
} else {
moduleService = KRADServiceLocatorWeb.getKualiModuleService().getResponsibleModuleService(this.getClass());
}
if(moduleService != null && moduleService.isLocked()) {
String principalId = GlobalVariables.getUserSession().getPrincipalId();
String namespaceCode = KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE;
String permissionName = KimConstants.PermissionNames.ACCESS_LOCKED_MODULE;
Map<String, String> permissionDetails = new HashMap<String, String>();
Map<String, String> qualification = new HashMap<String, String>(getRoleQualification(form, methodToCall));
if(!KimApiServiceLocator.getPermissionService().isAuthorized(principalId, namespaceCode, permissionName, qualification)) {
ParameterService parameterSerivce = CoreFrameworkServiceLocator.getParameterService();
String messageParamNamespaceCode = moduleService.getModuleConfiguration().getNamespaceCode();
String messageParamComponentCode = KRADConstants.DetailTypes.ALL_DETAIL_TYPE;
String messageParamName = KRADConstants.SystemGroupParameterNames.OLTP_LOCKOUT_MESSAGE_PARM;
String lockoutMessage = parameterSerivce.getParameterValueAsString(messageParamNamespaceCode, messageParamComponentCode, messageParamName);
if(StringUtils.isBlank(lockoutMessage)) {
String defaultMessageParamName = KRADConstants.SystemGroupParameterNames.OLTP_LOCKOUT_DEFAULT_MESSAGE;
lockoutMessage = parameterSerivce.getParameterValueAsString(KRADConstants.KNS_NAMESPACE, messageParamComponentCode, defaultMessageParamName);
}
request.setAttribute(KRADConstants.MODULE_LOCKED_MESSAGE_REQUEST_PARAMETER, lockoutMessage);
return true;
}
}
return false;
}