package com.intel.media.mts.action.user;

import com.intel.media.mts.model.User;
import com.intel.media.mts.service.UserService;
import com.opensymphony.xwork2.ActionSupport;

public class UpdateUserAction extends ActionSupport {
	private UserService userService;
	private User user;
	public UserService getUserService() {
		return userService;
	}
	public void setUserService(UserService userService) {
		this.userService = userService;
	}
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	@Override
	public String execute() throws Exception {
		if(null != user){
			this.userService.update(user);
			return SUCCESS;
		}
		return ERROR;
	}
}
