I'm sure there is an easy way to do this, basically I am trying to override the loadInventoryData and update the inventory results based on the current user.
I know when I extend the API by using addRequestHandler the sender is sent as a a parameter in handleClientRequest but I am wondering how I can get this user info inside the following:
@Override
public String loadInventoryData(String inventoryId)
{
}
Sorry if this is documented somewhere but I have looked and haven't found how to do this.
Getting user details when overriding methods
But is the Current User not accessible as a global variable already somewhere?
I already have some information stored in the session for the user from a previous request and I am just trying to get access to this session info in the loadInventoryData method. I am sure all I am missing is the correct syntax here.
@Override
public String loadInventoryData(String inventoryId)
{
//Get Current User\Session
//Use the user info to return subset of inventory items
}
I already have some information stored in the session for the user from a previous request and I am just trying to get access to this session info in the loadInventoryData method. I am sure all I am missing is the correct syntax here.
@Override
public String loadInventoryData(String inventoryId)
{
//Get Current User\Session
//Use the user info to return subset of inventory items
}
Return to “OpenSpace v2 discussions and help”
Who is online
Users browsing this forum: No registered users and 13 guests