|
From: Matthew T. <mt...@wc...> - 2004-09-07 17:44:08
|
Archiving this on the list for when we can come back to it...
-----Forwarded Message-----
From: Matthew Todd
Subject: HPRM -> extract contract code?
Date: Fri, 13 Aug 2004 10:51:38 -0400
Hey, for whoever works on the contract-management state-checking code,
what would you think about extracting a component like this from the
PrayerRequestManager?
public interface ContractManager {
UserContract initiate(String requestor, String intercessor);
UserContract accept(String requestor, String intercessor);
UserContract decline(String requestor, String intercessor);
UserContract remove(String requestor, String intercessor);
List getContractsForRequestor(String requestor);
List getContractsForIntercessor(String intercessor);
/* or, alternatively:
List getContracts(String user);
*/
}
This way the component hides the work of manipulating the contract, in
addition to just persisting external changes to it. Gets logic down out
of the portlet layer.
Could use some thought-refinement, probably.
This would deprecate the following methods in PrayerRequestManager:
addContract(UserContract contract);
getCurrentIntercessors(String requestor);
getCurrentRequestors(String intercessor);
getRequestorOrganizationsForIntercessor(String intercessor);
getRequestorsForIntercessor(String intercessor);
updateContractStatus(UserContract contract);
- Matthew
|