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


Java KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR属性代码示例

本文整理汇总了Java中org.kuali.rice.krad.util.KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR属性的典型用法代码示例。如果您正苦于以下问题:Java KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR属性的具体用法?Java KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR怎么用?Java KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR使用的例子?那么恭喜您, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在org.kuali.rice.krad.util.KRADConstants的用法示例。


在下文中一共展示了KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR属性的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: getGroupTypeOptions

private List<KeyValue> getGroupTypeOptions() {
	List<KeyValue> options = new ArrayList<KeyValue>();
	options.add(new ConcreteKeyValue("", ""));

	Collection<KimType> kimGroupTypes = KimApiServiceLocator.getKimTypeInfoService().findAllKimTypes();
	// get the distinct list of type IDs from all groups in the system
       for (KimType kimType : kimGroupTypes) {
           if (KimTypeLookupableHelperServiceImpl.hasGroupTypeService(kimType) && groupTypeValuesCache.get(kimType.getId()) == null) {
               String value = kimType.getNamespaceCode().trim() + KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR + kimType.getName().trim();
               options.add(new ConcreteKeyValue(kimType.getId(), value));
           }
       }
       Collections.sort(options, new Comparator<KeyValue>() {
          @Override
          public int compare(KeyValue k1, KeyValue k2) {
              return k1.getValue().compareTo(k2.getValue());
          }
       });
	return options;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:GroupLookupableHelperServiceImpl.java

示例2: getRoleTypeOptions

private List<KeyValue> getRoleTypeOptions() {
	List<KeyValue> options = new ArrayList<KeyValue>();
	options.add(new ConcreteKeyValue("", ""));

	Collection<KimType> kimGroupTypes = KimApiServiceLocator.getKimTypeInfoService().findAllKimTypes();
	// get the distinct list of type IDs from all roles in the system
       for (KimType kimType : kimGroupTypes) {
           if (KimTypeLookupableHelperServiceImpl.hasRoleTypeService(kimType)) {
               String value = kimType.getNamespaceCode().trim() + KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR + kimType.getName().trim();
               options.add(new ConcreteKeyValue(kimType.getId(), value));
           }
       }
       Collections.sort(options, new Comparator<KeyValue>() {
          @Override
	public int compare(KeyValue k1, KeyValue k2) {
              return k1.getValue().compareTo(k2.getValue());
          }
       });
	return options;
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:20,代码来源:RoleLookupableHelperServiceImpl.java

示例3: setFieldDirectInquiry

/**
 * Sets whether a field should have direct inquiries enabled.  The direct inquiry is the functionality on a page such that if the primary key for
 * a quickfinder is filled in and the direct inquiry button is pressed, then a new window will popup showing an inquiry page without going through
 * the lookup first.
 *
 * For this method to work properly, it must be called after setFieldQuickfinder
 * //TODO: chb: that should not be the case -- the relationship object the two rely upon should be established outside of the lookup/quickfinder code
 *
 *
 * @param field
 */
private static void setFieldDirectInquiry(Field field) {
    if (StringUtils.isNotBlank(field.getFieldConversions())) {
        boolean directInquiriesEnabled = CoreFrameworkServiceLocator.getParameterService().getParameterValueAsBoolean(
                KRADConstants.KNS_NAMESPACE, KRADConstants.DetailTypes.ALL_DETAIL_TYPE, KRADConstants.SystemGroupParameterNames.ENABLE_DIRECT_INQUIRIES_IND);
        if (directInquiriesEnabled) {
            if (StringUtils.isNotBlank(field.getFieldConversions())) {
                String fieldConversions = field.getFieldConversions();
                String newInquiryParameters = KRADConstants.EMPTY_STRING;
                String[] conversions = StringUtils.split(fieldConversions, KRADConstants.FIELD_CONVERSIONS_SEPARATOR);

                for (int l = 0; l < conversions.length; l++) {
                    String conversion = conversions[l];
                    //String[] conversionPair = StringUtils.split(conversion, KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR);
                    String[] conversionPair = StringUtils.split(conversion, KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR, 2);
                    String conversionFrom = conversionPair[0];
                    String conversionTo = conversionPair[1];
                    newInquiryParameters += (conversionTo + KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR + conversionFrom);

                    if (l < conversions.length - 1) {
                        newInquiryParameters += KRADConstants.FIELD_CONVERSIONS_SEPARATOR;
                    }
                }

                field.setInquiryParameters(newInquiryParameters);
            }
        }
        field.setFieldDirectInquiryEnabled(directInquiriesEnabled);
    }
    else {
        field.setFieldDirectInquiryEnabled(false);
    }
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:43,代码来源:LookupUtils.java

示例4: renderRoleMemberSelection

protected ActionForward renderRoleMemberSelection(ActionMapping mapping, HttpServletRequest request, IdentityManagementPersonDocumentForm impdForm) {
    Properties props = new Properties();

    props.put(KRADConstants.SUPPRESS_ACTIONS, Boolean.toString(true));
    props.put(KRADConstants.BUSINESS_OBJECT_CLASS_ATTRIBUTE, KimDocumentRoleMember.class.getName());
    props.put(KRADConstants.LOOKUP_ANCHOR, KRADConstants.ANCHOR_TOP_OF_FORM);
    props.put(KRADConstants.LOOKED_UP_COLLECTION_NAME, KimConstants.KimUIConstants.ROLE_MEMBERS_COLLECTION_NAME);

    String conversionPatttern = "{0}" + KRADConstants.FIELD_CONVERSION_PAIR_SEPARATOR + "{0}";
    StringBuilder fieldConversion = new StringBuilder();
    fieldConversion.append(MessageFormat.format(conversionPatttern, 
   		KimConstants.PrimaryKeyConstants.SUB_ROLE_ID)).append(KRADConstants.FIELD_CONVERSIONS_SEPARATOR);
    fieldConversion.append(MessageFormat.format(conversionPatttern, 
       		KimConstants.PrimaryKeyConstants.ROLE_MEMBER_ID)).append(KRADConstants.FIELD_CONVERSIONS_SEPARATOR);

    props.put(KRADConstants.CONVERSION_FIELDS_PARAMETER, fieldConversion);

    props.put(KimConstants.PrimaryKeyConstants.SUB_ROLE_ID, impdForm.getNewDelegationMember().getRoleBo().getId());

    props.put(KRADConstants.RETURN_LOCATION_PARAMETER, this.getReturnLocation(request, mapping));
 //   props.put(KRADConstants.BACK_LOCATION, this.getReturnLocation(request, mapping));

    props.put(KRADConstants.LOOKUP_AUTO_SEARCH, "Yes");
    props.put(KRADConstants.DISPATCH_REQUEST_PARAMETER, KRADConstants.SEARCH_METHOD);

    props.put(KRADConstants.DOC_FORM_KEY, GlobalVariables.getUserSession().addObjectWithGeneratedKey(impdForm));
 //   props.put(KRADConstants.DOC_NUM, impdForm.getDocument().getDocumentNumber());

    // TODO: how should this forward be handled
    String url = UrlFactory.parameterizeUrl(getApplicationBaseUrl() + "/kr/" + KRADConstants.LOOKUP_ACTION, props);

    impdForm.registerEditableProperty("methodToCall");

    return new ActionForward(url, true);
}
 
开发者ID:kuali,项目名称:kc-rice,代码行数:35,代码来源:IdentityManagementPersonDocumentAction.java


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