Search in sources :

Example 1 with BooleanFormatter

use of org.kuali.rice.core.web.format.BooleanFormatter in project cu-kfs by CU-CommunityApps.

the class BatchDisbursementVoucherNonResidentAlienTax method setIncomeTaxGrossUpCode.

/**
 * Takes a <code>String</code> and attempt to format as <code>Boolean</code> for setting the incomeTaxGrossUpCode field
 *
 * @param incomeTaxGrossUpCode as string
 */
public void setIncomeTaxGrossUpCode(String incomeTaxGrossUpCode) {
    if (StringUtils.isNotBlank(incomeTaxGrossUpCode)) {
        Boolean incomeTaxGrossUp = (Boolean) (new BooleanFormatter()).convertFromPresentationFormat(incomeTaxGrossUpCode);
        super.setIncomeTaxGrossUpCode(incomeTaxGrossUp);
    }
}
Also used : BooleanFormatter(org.kuali.rice.core.web.format.BooleanFormatter)

Example 2 with BooleanFormatter

use of org.kuali.rice.core.web.format.BooleanFormatter in project cu-kfs by CU-CommunityApps.

the class BatchDisbursementVoucherWireTransfer method setDisbursementVoucherWireTransferFeeWaiverIndicator.

/**
 * Takes a <code>String</code> and attempt to format as <code>Boolean</code> for setting the
 * disbursementVoucherWireTransferFeeWaiverIndicator field
 *
 * @param disbursementVoucherWireTransferFeeWaiverIndicator as string
 */
public void setDisbursementVoucherWireTransferFeeWaiverIndicator(String disbursementVoucherWireTransferFeeWaiverIndicator) {
    if (StringUtils.isNotBlank(disbursementVoucherWireTransferFeeWaiverIndicator)) {
        Boolean disbursementVoucherWireTransferFeeWaiver = (Boolean) (new BooleanFormatter()).convertFromPresentationFormat(disbursementVoucherWireTransferFeeWaiverIndicator);
        super.setWireTransferFeeWaiverIndicator(disbursementVoucherWireTransferFeeWaiver);
    }
}
Also used : BooleanFormatter(org.kuali.rice.core.web.format.BooleanFormatter)

Example 3 with BooleanFormatter

use of org.kuali.rice.core.web.format.BooleanFormatter in project cu-kfs by CU-CommunityApps.

the class BatchDisbursementVoucherDocument method setDisbVchrAttachmentCode.

/**
 * Takes a <code>String</code> and attempt to format as <code>Boolean</code> for setting the disbVchrAttachmentCode field
 *
 * @param disbVchrAttachmentCode as string
 */
public void setDisbVchrAttachmentCode(String disbVchrAttachmentCode) {
    if (StringUtils.isNotBlank(disbVchrAttachmentCode)) {
        Boolean disbVchrAttachment = (Boolean) (new BooleanFormatter()).convertFromPresentationFormat(disbVchrAttachmentCode);
        super.setDisbVchrAttachmentCode(disbVchrAttachment);
    }
}
Also used : BooleanFormatter(org.kuali.rice.core.web.format.BooleanFormatter)

Example 4 with BooleanFormatter

use of org.kuali.rice.core.web.format.BooleanFormatter in project cu-kfs by CU-CommunityApps.

the class AccountGlobalSearchLookupableHelperServiceImpl method getSearchResults.

/**
 * @see org.kuali.kfs.coa.businessobject.lookup.KualiAccountLookupableHelperServiceImpl#getSearchResults(java.util.Map)
 */
@Override
public List<? extends BusinessObject> getSearchResults(Map<String, String> parameters) {
    setBackLocation(parameters.get(KRADConstants.BACK_LOCATION));
    setDocFormKey(parameters.get(KRADConstants.DOC_FORM_KEY));
    setReferencesToRefresh(parameters.get(KRADConstants.REFERENCES_TO_REFRESH));
    if (parameters.containsKey("useOrgHierarchy")) {
        String includeOrgHierarchyStr = parameters.get("useOrgHierarchy");
        Boolean includeOrgHierarchy = (Boolean) new BooleanFormatter().convertFromPresentationFormat(includeOrgHierarchyStr);
        if (includeOrgHierarchy == null)
            // Both was selected
            includeOrgHierarchy = true;
        if (includeOrgHierarchy) {
            String chartOfAccountsCode = null;
            if (parameters.containsKey(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE)) {
                chartOfAccountsCode = parameters.get(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
            }
            String organizationCode = null;
            if (parameters.containsKey(KFSPropertyConstants.ORGANIZATION_CODE)) {
                organizationCode = parameters.get(KFSPropertyConstants.ORGANIZATION_CODE);
            }
            if (parameters.containsKey(KFSPropertyConstants.CLOSED)) {
                final String closedValue = parameters.get(KFSPropertyConstants.CLOSED);
                if (closedValue != null && closedValue.length() != 0) {
                    if ("Y1T".indexOf(closedValue) > -1) {
                        parameters.put(KFSPropertyConstants.ACTIVE, "N");
                    } else if ("N0F".indexOf(closedValue) > -1) {
                        parameters.put(KFSPropertyConstants.ACTIVE, "Y");
                    }
                }
                parameters.remove(KFSPropertyConstants.CLOSED);
            }
            parameters.remove("useOrgHierarchy");
            List<? extends BusinessObject> searchResults;
            if (fixPrincipalNameParameters(parameters)) {
                searchResults = (List<? extends BusinessObject>) accountGlobalSearchDao.getAccountsByOrgHierarchy(chartOfAccountsCode, organizationCode, parameters);
                List defaultSortColumns = getDefaultSortColumns();
                if (defaultSortColumns.size() > 0) {
                    Collections.sort(searchResults, new BeanPropertyComparator(defaultSortColumns, true));
                }
            } else {
                searchResults = Collections.EMPTY_LIST;
            }
            return searchResults;
        }
    }
    parameters.remove("useOrgHierarchy");
    return super.getSearchResults(parameters);
}
Also used : BeanPropertyComparator(org.kuali.kfs.krad.util.BeanPropertyComparator) BooleanFormatter(org.kuali.rice.core.web.format.BooleanFormatter) List(java.util.List)

Example 5 with BooleanFormatter

use of org.kuali.rice.core.web.format.BooleanFormatter in project cu-kfs by CU-CommunityApps.

the class BatchDisbursementVoucherNonResidentAlienTax method setIncomeTaxTreatyExemptCode.

/**
 * Takes a <code>String</code> and attempt to format as <code>Boolean</code> for setting the incomeTaxTreatyExemptCode field
 *
 * @param incomeTaxTreatyExemptCode as string
 */
public void setIncomeTaxTreatyExemptCode(String incomeTaxTreatyExemptCode) {
    if (StringUtils.isNotBlank(incomeTaxTreatyExemptCode)) {
        Boolean incomeTaxTreatyExempt = (Boolean) (new BooleanFormatter()).convertFromPresentationFormat(incomeTaxTreatyExemptCode);
        super.setIncomeTaxTreatyExemptCode(incomeTaxTreatyExempt);
    }
}
Also used : BooleanFormatter(org.kuali.rice.core.web.format.BooleanFormatter)

Aggregations

BooleanFormatter (org.kuali.rice.core.web.format.BooleanFormatter)10 List (java.util.List)1 BeanPropertyComparator (org.kuali.kfs.krad.util.BeanPropertyComparator)1