use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.
the class CuLocaleValuesFinder method getKeyValues.
/**
* @see org.kuali.kfs.krad.keyvalues.KeyValuesFinder#getKeyValues()
*/
public List<KeyValue> getKeyValues() {
List<KeyValue> keyValues = new ArrayList<KeyValue>();
keyValues.add(new ConcreteKeyValue(KFSConstants.EMPTY_STRING, KFSConstants.EMPTY_STRING));
// In this case, the source map is a "linked" one, so we can rely on consistent iteration order.
for (Map.Entry<String, String> locale : CUVendorConstants.LOCALES_LABEL_MAP.entrySet()) {
keyValues.add(new ConcreteKeyValue(locale.getKey(), locale.getValue()));
}
return keyValues;
}
use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.
the class EinvoiceIndicatorValuesFinder method getKeyValues.
@Override
public List<KeyValue> getKeyValues() {
List<KeyValue> keyValues = new ArrayList<>();
keyValues.add(new ConcreteKeyValue(EinvoiceIndicator.NONE.code, EinvoiceIndicator.NONE.description));
keyValues.add(new ConcreteKeyValue(EinvoiceIndicator.SFTP.code, EinvoiceIndicator.SFTP.description));
keyValues.add(new ConcreteKeyValue(EinvoiceIndicator.WEB.code, EinvoiceIndicator.WEB.description));
return keyValues;
}
use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.
the class ActionListFilterAction method getUserWorkgroupsDropDownList.
private List<? extends KeyValue> getUserWorkgroupsDropDownList(String principalId) {
List<String> userWorkgroups = KimApiServiceLocator.getGroupService().getGroupIdsByPrincipalId(principalId);
// note that userWorkgroups is unmodifiable so we need to create a new list that we can sort
List<String> userGroupsToSort = new ArrayList<String>(userWorkgroups);
List<KeyValue> sortedUserWorkgroups = new ArrayList<KeyValue>();
KeyValue keyValue = null;
keyValue = new ConcreteKeyValue(KewApiConstants.NO_FILTERING, KewApiConstants.NO_FILTERING);
sortedUserWorkgroups.add(keyValue);
if (userGroupsToSort != null && userGroupsToSort.size() > 0) {
Collections.sort(userGroupsToSort);
Group group;
for (String groupId : userGroupsToSort) {
group = KimApiServiceLocator.getGroupService().getGroup(groupId);
keyValue = new ConcreteKeyValue(groupId, group.getName());
sortedUserWorkgroups.add(keyValue);
}
}
return sortedUserWorkgroups;
}
use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.
the class GroupTitleLineRenderer method buildFavoriteAccounts.
private String buildFavoriteAccounts(String accountPrefix) {
int itemIdx = getItemIdx(accountPrefix);
Integer accountLineId = null;
if (isDocumentIntegratedFavoriteAccount()) {
if (itemIdx >= 0) {
accountLineId = ((PurchasingItemBase) ((PurchasingDocumentBase) this.getAccountingDocument()).getItem(itemIdx)).getFavoriteAccountLineIdentifier();
} else {
accountLineId = ((PurchasingDocumentBase) this.getAccountingDocument()).getFavoriteAccountLineIdentifier();
}
}
StringBuffer favoriteAccountLine = new StringBuffer();
favoriteAccountLine.append("<tr>");
favoriteAccountLine.append("<th colspan=\"2\" align=\"right\" valign=\"middle\" class=\"bord-l-b\">");
favoriteAccountLine.append("<div align=\"right\">");
favoriteAccountLine.append("Favorite Account");
favoriteAccountLine.append("</div>");
favoriteAccountLine.append("</th>");
if (StringUtils.isBlank(accountPrefix)) {
accountPrefix = "document.";
}
favoriteAccountLine.append("<td colspan=\"7\" class=\"infoline\">");
favoriteAccountLine.append("<select name=\"").append(accountPrefix).append("favoriteAccountLineIdentifier\" id=\"").append(accountPrefix).append("favoriteAccountLineIdentifier\" title=\"* Favorite Account\">");
FavoriteAccountValuesFinder accounts = new FavoriteAccountValuesFinder();
accounts.setBusinessObjectService(getBusinessObjectService());
for (KeyValue keyValue : (List<KeyValue>) accounts.getKeyValues()) {
favoriteAccountLine.append("<option value=\"").append(keyValue.getKey());
if (checkToAddError(accountPrefix + "favoriteAccountLineIdentifier")) {
favoriteAccountLine.append(getSelected(accountLineId, keyValue.getKey()));
} else {
favoriteAccountLine.append("\" >");
}
favoriteAccountLine.append(keyValue.getValue());
favoriteAccountLine.append("</option>\n");
}
favoriteAccountLine.append("</select>");
if (checkToAddError(accountPrefix + "favoriteAccountLineIdentifier")) {
favoriteAccountLine.append(getErrorIconImageTag());
}
favoriteAccountLine.append("</td>");
favoriteAccountLine.append("<td valign=\"top\" class=\"infoline\">");
favoriteAccountLine.append("<div style=\"text-align: center;\">");
favoriteAccountLine.append("<input type=\"image\" name=\"methodToCall.addFavoriteAccount.line").append(itemIdx).append(".anchorFavoriteAnchor\" src=\"static/images/tinybutton-add1.gif\" tabindex=\"0\" class=\"tinybutton\"");
favoriteAccountLine.append(" title=\"Add Favorite Accounting Line\" alt=\"Add Favorite Accounting Line\">");
favoriteAccountLine.append("</input>");
favoriteAccountLine.append("<br></div></td>");
favoriteAccountLine.append("</tr>");
return favoriteAccountLine.toString();
}
use of org.kuali.kfs.core.api.util.KeyValue in project cu-kfs by CU-CommunityApps.
the class TestPayeeAchIdTypeValuesFinder method getKeyValues.
@Override
public List<KeyValue> getKeyValues() {
List<KeyValue> keyValues = new ArrayList<>();
keyValues.add(new ConcreteKeyValue(PayeeIdTypeCodes.EMPLOYEE, TestPayeeIdTypeLabels.EMPLOYEE));
keyValues.add(new ConcreteKeyValue(PayeeIdTypeCodes.FEIN, TestPayeeIdTypeLabels.FEIN));
keyValues.add(new ConcreteKeyValue(PayeeIdTypeCodes.SSN, TestPayeeIdTypeLabels.SSN));
keyValues.add(new ConcreteKeyValue(PayeeIdTypeCodes.ENTITY, TestPayeeIdTypeLabels.ENTITY));
keyValues.add(new ConcreteKeyValue(PayeeIdTypeCodes.VENDOR_ID, TestPayeeIdTypeLabels.VENDOR_ID));
keyValues.add(new ConcreteKeyValue(PayeeIdTypeCodes.OTHER, TestPayeeIdTypeLabels.OTHER));
return keyValues;
}
Aggregations