|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface ExternalIntegrationProvider
| Field Summary | |
|---|---|
static String |
SESSION_ID
The recommended param key to use for sending in session ids in requests |
| Method Summary | ||
|---|---|---|
Object |
fetchEntity(String reference)
Fetches a concrete object representing this entity reference from an external system Note that this object may be a String or Map and does not have to be a POJO,
the type of object should be determined out of bandThis should return null if the entity exists but has no available object |
|
|
findService(Class<T> type)
Allows services in the external system to be located (this is used to find external providers for overriding the default internal services) |
|
void |
fireEvent(String eventName,
String reference)
Fires events from EB using an external event system You can assume the eventName is not null and the reference has been validated and normalized NOTE: if you have no way to handle external events then throw UnsupportedOperationException |
|
|
getConfigurationSetting(String settingName,
T defaultValue)
Retrieves settings from the configuration service (sakai.properties) |
|
String |
getMaxJSONLevel()
Gets the entitybroker.maxJSONLevel config string from sakai.properties via ServerConfigurationService. |
|
String |
getServerUrl()
Gets the full server URL for the server which this is being used on |
|
String |
handleEntityError(javax.servlet.http.HttpServletRequest req,
Throwable error)
Handles an error which occurs while processing an entity request, e.g. by sending an email and logging extra info about the failure |
|
void |
handleUserSessionKey(javax.servlet.http.HttpServletRequest req)
Allows the external system to create a session based on a passed in session key (or other data in the request), no returns are necessary and this method can simple be left unimplemented if it is not used Most likely all requests will not include session keys so you should not fail if one is not set in most cases |
|
| Field Detail |
|---|
static final String SESSION_ID
| Method Detail |
|---|
<T> T findService(Class<T> type)
T - type - the service API class
void fireEvent(String eventName,
String reference)
UnsupportedOperationException
eventName - a string which represents the name of the event (e.g. announcement.create),
cannot be null or emptyreference - a globally unique reference to an entity,
consists of the entity prefix and optionally the local id,
cannot be null or empty
IllegalArgumentException - if the event arguments are invalid or the event cannot be thrown
UnsupportedOperationException - if the external system does not handle eventsString getServerUrl()
UnsupportedOperationException - if the external system cannot handle thisString getMaxJSONLevel()
Object fetchEntity(String reference)
String or Map and does not have to be a POJO,
the type of object should be determined out of band
reference - a string representing a unique reference to an entity (e.g. /type/id/extra)
SecurityException - if the entity cannot be accessed by the current user or is not publicly accessible
IllegalArgumentException - if the reference is invalid
UnsupportedOperationException - if the external system cannot handle this
IllegalStateException - if any other error occurs
String handleEntityError(javax.servlet.http.HttpServletRequest req,
Throwable error)
req - the current requesterror - the current error that occurred
UnsupportedOperationException - if the external system cannot handle thisvoid handleUserSessionKey(javax.servlet.http.HttpServletRequest req)
req - the request as it is coming in (before any other processing has occurred)
IllegalArgumentException - if this request is invalid in some way
SecurityException - if this request is not allowed for security reasons
<T> T getConfigurationSetting(String settingName,
T defaultValue)
settingName - the name of the setting to retrieve, Should be a string name: e.g. auto.ddl,
mystuff.config, etc.defaultValue - a specified default value to return if this setting cannot be found,
NOTE: You can set the default value to null but you must specify the class type in parens
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||