|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface RedirectControllable
This entity type has the ability to define and handle configurable URLs
This adds the ability to control all redirects via a central method
URLs like this can be handled and supported:
/gradebook/7890/student/70987 to view all the grades for a student from a course
/gradebook/6758/item/Quiz1 to view a particular item in a gradebook by it's human readable name
/gradebook/item/6857657 to maybe just a view an item by its unique id.
This is one of the capability extensions for the EntityProvider interface
The convention interface is at Redirectable, there is also a capability
for handling simple redirects at RedirectDefinable
| Method Summary | |
|---|---|
String[] |
defineHandledTemplatePatterns()
Defines all the URL patterns that will be matched and passed through to #handleRedirects(String, String[], Map)
NOTE: /{prefix}/ must be included as the start of the template |
String |
handleRedirects(String matchedTemplate,
String incomingURL,
String[] incomingSegments,
Map<String,String> incomingVariables)
Explicitly handles all the incoming URLs which match the patterns given by defineHandledTemplatePatterns()
do some processing to turn it into an outgoing URL OR just do some processing OR
indicate that a failure has occurred |
| Methods inherited from interface org.sakaiproject.entitybroker.entityprovider.EntityProvider |
|---|
getEntityPrefix |
| Method Detail |
|---|
String[] defineHandledTemplatePatterns()
#handleRedirects(String, String[], Map)
NOTE: /{prefix}/ must be included as the start of the template
String handleRedirects(String matchedTemplate,
String incomingURL,
String[] incomingSegments,
Map<String,String> incomingVariables)
defineHandledTemplatePatterns()
do some processing to turn it into an outgoing URL OR just do some processing OR
indicate that a failure has occurred
matchedPattern - the template pattern that was matchedincomingURL - the incoming URL that was matched by a URL patternincomingSegments - incoming URL segments, Example: /prefix/123/apple => {'prefix','123','apple'}incomingVariables - a map of the values in the {} (prefix is always included),
Example: pattern: /prefix/{thing}/apple, url: /prefix/123/apple, would yield: 'thing' => '123'
IllegalStateException - if there is a failure, this will cause the server to return a redirect failure
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||