I have this class constructor AppData(Map params, Operations operation)
where Operations is
public enum Operations
{
create,update,delete,view,compare
}
How can I instantiate AppData with parameters constructor?
for the map parameter its fine i get that from servlet, (req.getParameterMap())
but the main problem for me is knowing the operation type, which also comes from the map parameter, So in order to do this AppData data=new AppData(req.getParameterMap(),op);
what shall I assign to op
or what shall an op
type be?
Note: I can get the String create
, update
... from req.getParameterMap()
by using iterator and Map.Entry object.getKey() and Value