public interface PartnerManager
This manager is for use by the
| Modifier and Type | Interface and Description |
|---|---|
static class |
PartnerManager.UpdateField
The UpdateField enum specifies the registration attributes
a partner application controls and can modify by calling
update(String, List). |
| Modifier and Type | Method and Description |
|---|---|
boolean |
exists(java.lang.String partnerRef)
Returns whether a partner reference exists (as a registered ASSISTments partner).
|
Partner |
getMyPartner()
Returns the current application's or service's Partner object originating from the
PartnerCredentials as defined in the current application's configuration file (xml). |
int |
getMyPartnerId()
Returns the current application's or service's Partner ID originating from persisted version of
PartnerCredentials as defined in the current application's configuration file (xml). |
java.lang.String |
getMyPartnerRef()
Returns the current application's or service's Partner external reference name originating from the
PartnerCredentials as defined in the current application's configuration file (xml). |
Partner |
getPartner(java.lang.String partnerRef)
Returns the Partner object for the named partner
|
int |
getPartnerId(java.lang.String partnerRef)
Returns the database ID for a partner reference
Note: For use only by Service Administrators.
|
java.util.List<java.lang.String> |
getPartnerReferences()
Returns a list of all partner references
|
java.util.List<Partner> |
getPartners() |
Partner |
getRequestingPartner()
Returns the Partner object for the requesting application or service.
|
int |
getRequestingPartnerId()
Returns the persisted Partner ID for the requesting application or service.
|
java.lang.String |
getRequestingPartnerRef()
Returns the Partner reference for the requesting application or service.
|
java.util.List<Partner> |
registerDependencies(PartnerCredentials pCreds) |
Partner |
registerOrUpdate(PartnerCredentials partnerCreds)
Registers a new application with the ASSISTmetns Service (AS)
|
void |
update(java.util.List<Pair<PartnerManager.UpdateField,java.lang.String>> values) |
void |
update(java.lang.String partnerRef,
java.util.List<Pair<PartnerManager.UpdateField,java.lang.String>> values)
Updates a partner application's select registration fields
|
void |
updateRegistration(Partner partner)
Updates a partner application's registration.
|
Partner registerOrUpdate(PartnerCredentials partnerCreds) throws AlreadyExistsException
Only the AS admin applications is allowed to call this method.
partnerCreds - Partner application to registerAlreadyExistsException - If partnerRef is already in usejava.util.List<Partner> registerDependencies(PartnerCredentials pCreds)
void updateRegistration(Partner partner)
Note: Presently for use only by System Administrators. Going forward, the API should allow partner applications to update a subset of their registration data.
Replaces all partner application fields with the values provided. The correct use of this method
is to call getPartner(String), update the returned PartnerApplication object
and to pass the updated object to this method.
partner - New settingsInvalidPartnerException - If either adminRef or appRef is not validgetPartner(String)boolean exists(java.lang.String partnerRef)
Note: For use only by Service Administrators.
partnerRef - Partner reference of interestjava.util.List<java.lang.String> getPartnerReferences()
java.util.List<Partner> getPartners()
Partner getPartner(java.lang.String partnerRef) throws NotFoundException
Note: For use only by Service Administrators.
For their application, partners call #getPartner().
partnerRef - Partner referenceNotFoundException - If the named application is not a registered partner.Partner getMyPartner() throws NotFoundException
PartnerCredentials as defined in the current application's configuration file (xml).
Note: Use with caution. In most cases you are interested in the requesting
partner as your application is acting on behalf of that requestor. See getRequestingPartner().
NotFoundException - If somehow the current application does not have a persisted entry. Unexpected.java.lang.String getMyPartnerRef()
PartnerCredentials as defined in the current application's configuration file (xml).
Note: Use with caution. In most cases you are interested in the requesting
partner as your application is acting on behalf of that requestor. See getRequestingPartnerRef().
NotFoundException - If somehow the current application does not have a persisted entry. Unexpected.int getMyPartnerId()
throws NotFoundException
PartnerCredentials as defined in the current application's configuration file (xml).
Note: Use with caution. In most cases you are interested in the requesting
partner as your application is acting on behalf of that requestor. See getRequestingPartnerId().
NotFoundException - If somehow the current application does not have a persisted entry. Unexpected.Partner getRequestingPartner() throws NotFoundException
NotFoundException - If the requestor presented an invalid partner reference.java.lang.String getRequestingPartnerRef()
throws NotFoundException
NotFoundException - If the requestor presented an invalid partner reference.int getRequestingPartnerId()
throws NotFoundException
NotFoundException - If the requestor presented an invalid partner reference.int getPartnerId(java.lang.String partnerRef)
throws NotFoundException
#getPartnerId().partnerRef - Partner reference of interestNotFoundException - If the specified partnerRef is not foundvoid update(java.lang.String partnerRef,
java.util.List<Pair<PartnerManager.UpdateField,java.lang.String>> values)
partnerRef - Partner application reference to updatevalues - List of fields and values to updateInvalidPartnerException - If appRef is not valid.void update(java.util.List<Pair<PartnerManager.UpdateField,java.lang.String>> values)