In Java, how can I check whether a user has permission to do an action on the model. This should be something similar to javascript - SPT.getModel("modelname")...
If you have the model object (i.e. you know which row), the best option is probably com.onenetwork.platform.data.model.ModelDataService.validateWritePermission(ModelWriteRequest<m>, PlatformUserContext). You create a ModelWriteRequest and give the model you want to execute the action on, along with the action to be executed. This API will perform all checks, including role type checks, state checks, etc, without actually writing.
If you have just the model type (but don't know which "row") then the answer may be a bit different, so let us know.
I think it is model type. The rest request send each Id and the corresponding ModelName to Java JSONArray.
In this case, you can lookup those models by their IDs using ModelDataService.readByIds(). Then create a ModelList with those models on it, and put the desired action on it. When you execute, it will come back with errors on models you're not allowed to execute that action on.
Again, the answer here could be different if you're looking to get a list of all possible actions. Do you need a list of all possible actions on those models, or just a "yes or no, can i execute this particular action?"