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


Java KRADConstants.KUALI_RICE_SYSTEM_NAMESPACE属性代码示例

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

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

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

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

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


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