Package edu.uiuc.ncsa.sas.thing.action
Class ActionDeserializer
- java.lang.Object
-
- edu.uiuc.ncsa.sas.thing.action.ActionDeserializer
-
- All Implemented Interfaces:
SASConstants
public class ActionDeserializer extends Object implements SASConstants
Convert the request payload into objectsCreated by Jeff Gaynor
on 8/15/22 at 8:42 AM
-
-
Field Summary
-
Fields inherited from interface edu.uiuc.ncsa.sas.SASConstants
ACTION_EXECUTE, ACTION_INVOKE, ACTION_LOGOFF, ACTION_LOGON, ACTION_NEW_KEY, CLIENT_ID_HEAD, HEADER_SESSION_ID, KEYS_ACTION, KEYS_ARGUMENT, KEYS_COMMENT, KEYS_EXECUTABLE_NAME, KEYS_INTERNAL_ID, KEYS_METHOD, KEYS_PROMPT, KEYS_SAS, KEYS_STATE, KEYS_SUBJECT, KEYS_SUBJECT_ID, KEYS_SUBJECT_SESSION_ID, KEYS_TYPE, REQUEST_TYPE, RESPONSE_CONTENT, RESPONSE_MESSAGE, RESPONSE_PROMPT, RESPONSE_SESSION_ID, RESPONSE_STATUS, RESPONSE_STATUS_ERROR, RESPONSE_STATUS_OK, RESPONSE_SYMMETRIC_KEY, RESPONSE_TYPE, RESPONSE_TYPE_ERROR, RESPONSE_TYPE_LOGOFF, RESPONSE_TYPE_LOGON, RESPONSE_TYPE_NEW_KEY, RESPONSE_TYPE_OUTPUT, RESPONSE_TYPE_PROMPT
-
-
Constructor Summary
Constructors Constructor Description ActionDeserializer()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getAction(net.sf.json.JSONObject json)
Returns the action to be done.Action
rsaDeserialize(SessionRecord sessionRecord, String payload)
List<Action>
rsaDeserialize(SessionRecord sessionRecord, javax.servlet.http.HttpServletRequest request)
Given the request, grab the body of the postList<Action>
sDeserialize(SessionRecord sessionRecord, String payload)
List<Action>
sDeserialize(SessionRecord sessionRecord, javax.servlet.http.HttpServletRequest request)
Action
toAction(net.sf.json.JSONObject jsonObject)
Takes a single known action item and returns the right oneList<Action>
toActions(net.sf.json.JSONObject jsonObject)
Options for format are
-
-
-
Method Detail
-
rsaDeserialize
public List<Action> rsaDeserialize(SessionRecord sessionRecord, javax.servlet.http.HttpServletRequest request) throws IOException
Given the request, grab the body of the post- Parameters:
sessionRecord
-request
-- Returns:
- Throws:
IOException
-
sDeserialize
public List<Action> sDeserialize(SessionRecord sessionRecord, javax.servlet.http.HttpServletRequest request) throws IOException
- Throws:
IOException
-
rsaDeserialize
public Action rsaDeserialize(SessionRecord sessionRecord, String payload)
-
sDeserialize
public List<Action> sDeserialize(SessionRecord sessionRecord, String payload)
-
toActions
public List<Action> toActions(net.sf.json.JSONObject jsonObject)
Options for format are{"sas":{simple action}}
or{"sas":[{action0}, {action1},...]}
This method always returns aList
.- Parameters:
jsonObject
-- Returns:
-
toAction
public Action toAction(net.sf.json.JSONObject jsonObject)
Takes a single known action item and returns the right one- Parameters:
jsonObject
-- Returns:
-
getAction
public String getAction(net.sf.json.JSONObject json)
Returns the action to be done.- Parameters:
json
-- Returns:
-
-