All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.invms.x.controllers.basis.SessionController Maven / Gradle / Ivy

The newest version!
package com.invms.x.controllers.basis;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.invms.x.builders.ArgsBuilder;
import com.invms.x.controllers.BaseController;
import com.invms.x.models.DataModel;
import com.invms.x.services.basis.HtmlService;
import com.invms.x.services.basis.SessionService;

@RestController
@RequestMapping(value = "/basis/session")
public class SessionController extends BaseController {
	@Autowired
	private HtmlService htmlService;

	@Autowired
	private SessionService sessionService;

	@RequestMapping(value = "/current")
	public Object current() throws Exception {
		ArgsBuilder argsBuilder = createArgsBuilder();
		Object data = sessionService.getCurrent(argsBuilder);
		return DataModel.createTrue(data);
	}

	@RequestMapping(value = "/clearCache")
	public Object clearCache() throws Exception {
		ArgsBuilder argsBuilder = createArgsBuilder();
		Object data = sessionService.clearCache(argsBuilder);
		return DataModel.createTrue(data);
	}

	@RequestMapping(value = "/keepAlive")
	public Object keepAlive() throws Exception {
		ArgsBuilder argsBuilder = createArgsBuilder();
		Object data = sessionService.keepAlive(argsBuilder, null);
		return DataModel.createTrue(data);
	}

	@RequestMapping(value = "/htmlModel")
	public Object htmlModel() throws Exception {
		ArgsBuilder argsBuilder = createArgsBuilder();
		Object data = htmlService.getHtmlModel(argsBuilder);
		return DataModel.createTrue(data);
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy