Interface SponsorService
-
public interface SponsorService
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description SponsorContractgetSponsor(String sponsorCode)This method will retrieves aSponsorContractby sponsorCode.StringgetSponsorName(String sponsorCode)This method will retrieves a sponsor name by sponsorCode.booleanisValidSponsor(SponsorContract sponsor)This method determines whether a sponsor object is valid to be a sponsor.
-
-
-
Method Detail
-
getSponsor
SponsorContract getSponsor(String sponsorCode)
This method will retrieves aSponsorContractby sponsorCode. The sponsorCode cannot be blank.- Parameters:
sponsorCode- the sponsorCode. Cannot be null.- Returns:
- the
SponsorContractor null if not found. - Throws:
IllegalArgumentException- if the sponsorCode is blank
-
getSponsorName
String getSponsorName(String sponsorCode)
This method will retrieves a sponsor name by sponsorCode. The sponsorCode cannot be blank.- Parameters:
sponsorCode- the sponsorCode. Cannot be null.- Returns:
- the sponsor name or null if not found.
- Throws:
IllegalArgumentException- if the sponsorCode is blank
-
isValidSponsor
boolean isValidSponsor(SponsorContract sponsor)
This method determines whether a sponsor object is valid to be a sponsor. A valid sponsor is a non-null active sponsor. The sponsor argument can be null.- Parameters:
sponsor- the sponsor to check- Returns:
- true if valid, false if not valid
-
-