use of org.kuali.kfs.kns.lookup.HtmlData in project cu-kfs by CU-CommunityApps.
the class CuOrganizationRoutingModelNameLookupableHelperServiceImplTest method testGetReturnUrl.
public void testGetReturnUrl() {
BusinessObjectRestrictionsBase businessObjectRestrictions = new BusinessObjectRestrictionsBase();
Map<String, String> fieldConversions = new HashMap<String, String>();
fieldConversions.put("organizationCode", "modelOrganizationCode");
fieldConversions.put("chartOfAccountsCode", "modelChartOfAccountsCode");
fieldConversions.put("accountDelegateModelName", "modelName");
lookupableHelperServiceImpl.setFieldConversions(fieldConversions);
lookupableHelperServiceImpl.setBusinessObjectClass(AccountDelegateModel.class);
LookupForm lookupForm = new LookupForm();
lookupForm.setFieldConversions(fieldConversions);
lookupForm.setLookupableImplServiceName("organizationRoutingModelLookupable");
AccountDelegateModel accountDelegateModel = new AccountDelegateModel();
accountDelegateModel.setAccountDelegateModelName("Stuff");
accountDelegateModel.setChartOfAccountsCode("IT");
accountDelegateModel.setOrganizationCode("1000");
List<String> returnKeys = new ArrayList<String>();
returnKeys.add("chartOfAccountsCode");
returnKeys.add("organizationCode");
returnKeys.add("accountDelegateModelName");
String befoerBackLocation = lookupForm.getBackLocation();
HtmlData results = lookupableHelperServiceImpl.getReturnUrl(accountDelegateModel, lookupForm, returnKeys, businessObjectRestrictions);
assertEquals("return value", results.getDisplayText());
assertEquals(befoerBackLocation, lookupForm.getBackLocation());
}
use of org.kuali.kfs.kns.lookup.HtmlData in project cu-kfs by CU-CommunityApps.
the class CreateDoneBatchFileLookupableHelperServiceImpl method getCustomActionUrls.
@Override
public List<HtmlData> getCustomActionUrls(BusinessObject businessObject, List pkNames) {
List<HtmlData> links = new ArrayList<HtmlData>();
BatchFile batchFile = (BatchFile) businessObject;
if (canCreateDoneFile(batchFile)) {
links.add(getCreateDoneUrl(batchFile));
}
return links;
}
Aggregations