
com.morpheusdata.views.ViewModel Maven / Gradle / Ivy
package com.morpheusdata.views;
import javax.servlet.ServletRequest;
import javax.servlet.ServletResponse;
import com.morpheusdata.model.User;
import java.util.Map;
/**
* This model will be provided from Morpheus-ui to the plugin controller. It contains the request/response
* @param Type of object in the model.
*/
public class ViewModel {
public T object;
public ServletRequest request;
public ServletResponse response;
public Integer status = 200;
public User user;
public Map opts;
/**
* Helper method to create a successful ViewModel of an object
* @param data The object to base the model off of
* @return a ViewModel
*/
static ViewModel> of(Object data) {
ViewModel
© 2015 - 2025 Weber Informatics LLC | Privacy Policy