use of edu.cornell.kfs.module.purap.businessobject.IWantView in project cu-kfs by CU-CommunityApps.
the class CuPurapServiceImpl method saveRoutingDataForRelatedDocuments.
// ==== CU Customization (KFSPTS-1656): Save IWantDocument routing data. ====
@Override
public void saveRoutingDataForRelatedDocuments(Integer accountsPayablePurchasingDocumentLinkIdentifier) {
super.saveRoutingDataForRelatedDocuments(accountsPayablePurchasingDocumentLinkIdentifier);
try {
// Save IWNT routing data.
@SuppressWarnings("unchecked") List<IWantView> iWantViews = getRelatedViews(IWantView.class, accountsPayablePurchasingDocumentLinkIdentifier);
for (Iterator<IWantView> iterator = iWantViews.iterator(); iterator.hasNext(); ) {
IWantView view = (IWantView) iterator.next();
Document doc = documentService.getByDocumentHeaderId(view.getDocumentNumber());
doc.getDocumentHeader().getWorkflowDocument().saveDocumentData();
}
} catch (WorkflowException e) {
throw new InfrastructureException("unable to save routing data for related docs", e);
}
}
use of edu.cornell.kfs.module.purap.businessobject.IWantView in project cu-kfs by CU-CommunityApps.
the class CuPurapServiceImpl method getRelatedDocumentIds.
// ==== CU Customization (KFSPTS-1656): Get IWantDocument views. ====
@Override
public List<String> getRelatedDocumentIds(Integer accountsPayablePurchasingDocumentLinkIdentifier) {
List<String> documentIdList = super.getRelatedDocumentIds(accountsPayablePurchasingDocumentLinkIdentifier);
// Get IWNT views.
@SuppressWarnings("unchecked") List<IWantView> iWantViews = getRelatedViews(IWantView.class, accountsPayablePurchasingDocumentLinkIdentifier);
for (Iterator<IWantView> iterator = iWantViews.iterator(); iterator.hasNext(); ) {
IWantView view = (IWantView) iterator.next();
documentIdList.add(view.getDocumentNumber());
}
return documentIdList;
}
Aggregations