Package org.tsugi.lti13
Class DeepLinkResponse
- java.lang.Object
-
- org.tsugi.lti13.DeepLinkResponse
-
public class DeepLinkResponse extends Object
-
-
Field Summary
-
Constructor Summary
Constructors Constructor Description DeepLinkResponse(String id_token)We check for the fields essential for the class to operate here.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.simple.JSONObjectgetContentItem()Retrieve the parsed tool_proxyorg.json.simple.JSONArraygetDeepLinks()Retrieve the @graph from the content itemorg.json.simple.JSONObjectgetItemOfType(String itemType)Retrieve a particular type from the graphstatic booleanisRequest(String id_token)Check if the incoming request is a DeepLinkResponsestatic booleanisRequest(HttpServletRequest req)Check if the incoming request is a DeepLinkResponseStringtoString()Return a stringbooleanvalidate(Key publicKey)Validate the incoming request
-
-
-
Field Detail
-
DEEP_LINKS
public static final String DEEP_LINKS
- See Also:
- Constant Field Values
-
DATA
public static final String DATA
- See Also:
- Constant Field Values
-
ACCEPT_MEDIA_TYPES
public static final String ACCEPT_MEDIA_TYPES
- See Also:
- Constant Field Values
-
MEDIA_LTILINKITEM
public static String MEDIA_LTILINKITEM
-
MEDIA_CC_1_1
public static final String MEDIA_CC_1_1
- See Also:
- Constant Field Values
-
MEDIA_CC_1_2
public static final String MEDIA_CC_1_2
- See Also:
- Constant Field Values
-
MEDIA_CC_1_3
public static final String MEDIA_CC_1_3
- See Also:
- Constant Field Values
-
MEDIA_CC
public static final String MEDIA_CC
- See Also:
- Constant Field Values
-
TYPE
public static final String TYPE
- See Also:
- Constant Field Values
-
TYPE_LINKITEM
public static final String TYPE_LINKITEM
- See Also:
- Constant Field Values
-
TYPE_LTILINKITEM
public static final String TYPE_LTILINKITEM
- See Also:
- Constant Field Values
-
TYPE_CONTENTITEM
public static final String TYPE_CONTENTITEM
- See Also:
- Constant Field Values
-
TYPE_FILEITEM
public static final String TYPE_FILEITEM
- See Also:
- Constant Field Values
-
TITLE
public static final String TITLE
- See Also:
- Constant Field Values
-
TEXT
public static final String TEXT
- See Also:
- Constant Field Values
-
URL
public static final String URL
- See Also:
- Constant Field Values
-
LINEITEM
public static final String LINEITEM
- See Also:
- Constant Field Values
-
CUSTOM
public static final String CUSTOM
- See Also:
- Constant Field Values
-
ICON
public static final String ICON
- See Also:
- Constant Field Values
-
AVAILABLE
public static final String AVAILABLE
Indicates the initial start and end time this activity should be made available to learners. A platform may choose to make an item not accessible by hiding it, or by disabling the link, or some other method which prevents the link from being opened by a learner. The initial value may subsequently be changed within the platform and the tool may use the ResourceLink.available.startDateTime and ResourceLink.available.endDateTime substitution parameters defined in LTI Core specification [LTI-13] within custom parameters to get the actual values at launch time. ISO 8601 date and time- See Also:
- Constant Field Values
-
AVAILABLE_STARTDATETIME
public static final String AVAILABLE_STARTDATETIME
- See Also:
- Constant Field Values
-
AVAILABLE_ENDDATETIME
public static final String AVAILABLE_ENDDATETIME
- See Also:
- Constant Field Values
-
RESOURCELINK_AVAILABLE_STARTDATETIME
public static final String RESOURCELINK_AVAILABLE_STARTDATETIME
- See Also:
- Constant Field Values
-
RESOURCELINK_AVAILABLE_ENDDATETIME
public static final String RESOURCELINK_AVAILABLE_ENDDATETIME
- See Also:
- Constant Field Values
-
SUBMISSION
public static final String SUBMISSION
Indicates the initial start and end time submissions for this activity can be made by learners. The initial value may subsequently be changed within the platform and the tool may use the ResourceLink.submission.startDateTime and ResourceLink.submission.endDateTime substitution parameters defined in LTI Core specification [LTI-13] within custom parameters to get the actual values at launch time. ISO 8601 date and time- See Also:
- Constant Field Values
-
SUBMISSION_STARTDATETIME
public static final String SUBMISSION_STARTDATETIME
- See Also:
- Constant Field Values
-
SUBMISSION_ENDDATETIME
public static final String SUBMISSION_ENDDATETIME
- See Also:
- Constant Field Values
-
RESOURCELINK_SUBMISSION_STARTDATETIME
public static final String RESOURCELINK_SUBMISSION_STARTDATETIME
- See Also:
- Constant Field Values
-
RESOURCELINK_SUBMISSION_ENDDATETIME
public static final String RESOURCELINK_SUBMISSION_ENDDATETIME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
DeepLinkResponse
public DeepLinkResponse(String id_token)
We check for the fields essential for the class to operate here.
-
-
Method Detail
-
isRequest
public static boolean isRequest(HttpServletRequest req)
Check if the incoming request is a DeepLinkResponse
-
isRequest
public static boolean isRequest(String id_token)
Check if the incoming request is a DeepLinkResponse
-
validate
public boolean validate(Key publicKey)
Validate the incoming request- Parameters:
URL- The URL of the incoming request. If this in null, the URL is taken from the request object. Sometimes the request object can be misleading when sitting behind a load balancer or some kind of proxy.
-
getContentItem
public org.json.simple.JSONObject getContentItem()
Retrieve the parsed tool_proxy
-
getDeepLinks
public org.json.simple.JSONArray getDeepLinks()
Retrieve the @graph from the content item
-
getItemOfType
public org.json.simple.JSONObject getItemOfType(String itemType)
Retrieve a particular type from the graph- Parameters:
String- messageType - Which item type you are looking for
-
-