Package at.riemers.zero.base.model

Examples of at.riemers.zero.base.model.User


    }
   
    @RequestMapping(value="/user/statistic.do", method = RequestMethod.GET)   
    public ModelAndView statistic(HttpSession session, HttpServletRequest request) throws Exception {
        log.debug("user statistic action");
        User user = getUser();
       
        ZeroView view = new ZeroView(getMessages(), request.getLocale());
               
        view.addWidget(new SimpleWidget(ZeroView.DIV_CONTENT, "user_userstatistic"));           
        view.addWidget(new SimpleWidget("functions", "user_userstatistic_func"));           
View Full Code Here


   
    @RequestMapping(value="/user/statistic.do", method = RequestMethod.POST)   
    public ModelAndView statistic_post(@ModelAttribute("statisticForm") StatisticForm statisticForm, HttpSession session, HttpServletRequest request) throws Exception {
        log.debug("user statistic action");
                       
        User user = getUser();
       
        logFunction("user-statistic");
        ZeroView view = new ZeroView(getMessages(), request.getLocale());
              
        view.addWidget(new SimpleWidget(ZeroView.DIV_CONTENT, "user_userstatistic"));           
View Full Code Here

    }

    @RequestMapping(value = "/user/currentUserList.do", method = RequestMethod.GET)
    public ModelAndView list(HttpSession session, HttpServletRequest request) throws Exception {

        User user = (User) getUser();
        ZeroView view = new ZeroView(getMessages(), request.getLocale());

        logFunction("user-current-list");

        log.debug("currentUserList");

        if (user.checkAuthorisation(UserModule.AUTH_CURRENT_USERS)) {

            List<UserSession> userList = new ArrayList();

            for (Object obj : sessionRegistry.getAllPrincipals()) {
                log.debug(obj.getClass().getName() + " " + obj.toString());
View Full Code Here

        ZeroView view = new ZeroView(getMessages(), request.getLocale());
        log.debug("kick User");


        User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();

        logFunction("user-kick");

        if (user.checkAuthorisation(UserModule.AUTH_CURRENT_USERS)) {

            HtmlTableWidget userListComponent = (HtmlTableWidget) getWidgetManager(session).getWidget("CURRENTUSERLIST");

            for ( String selectedRow : selected.getSelected().keySet()) {
                log.debug(selectedRow);
View Full Code Here

            @ModelAttribute("selected") Selected selected,  BindingResult result,  SessionStatus status,  HttpSession session,  HttpServletRequest request) throws Exception {

        ZeroView view = new ZeroView(getMessages(), request.getLocale());
        log.debug("send message");

        User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();

        if (user.checkAuthorisation(UserModule.AUTH_CURRENT_USERS)) {

            HtmlTableWidget userListComponent = (HtmlTableWidget) getWidgetManager(session).getWidget("CURRENTUSERLIST");

            List<UserSession> sendMessageSessions = new ArrayList();
            for ( String selectedRow : selected.getSelected().keySet()) {
View Full Code Here

            @ModelAttribute("text") TextForm text,  BindingResult result,  SessionStatus status,  HttpSession session,  HttpServletRequest request) throws Exception {

        ZeroView view = new ZeroView(getMessages(), request.getLocale());
        log.debug("send message");

        User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();

        logFunction("user-send-message");

        List<UserSession> sendMessageSessions = (List<UserSession>) session.getAttribute("sendMessageSessions");
View Full Code Here

            if (SecurityContextHolder.getContext() != null
                    && SecurityContextHolder.getContext().getAuthentication() != null
                    && SecurityContextHolder.getContext().getAuthentication().getPrincipal() instanceof User) {
//                log.debug("user found");
                User user = (User) SecurityContextHolder.getContext().getAuthentication().getPrincipal();
                if (user != null) {
//                    log.debug("user != null");
                    if (user.getClient() != null && !user.getClient().getHost().equals(host)) {
                        log.debug("logout");
                        sendRedirect((HttpServletRequest) request, (HttpServletResponse) response, "j_spring_security_logout");
                    }
                }
            } else {
View Full Code Here

    UserDao userDao;

    public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
        try {
            log.info("loadUserByUsername: " + username);
            User user = userDao.getUser(username);
            if (user == null) {
                throw new UsernameNotFoundException("");
            }
            log.debug("user="+user.getUsername());
            return new SpringUserDetails((ZeroUser) user);
        } catch (Exception ex) {
            log.info("load user failed", ex);
            throw new UsernameNotFoundException(ex.getMessage());
        }
View Full Code Here

    }

    public User getUser() {
        String username = userContextManager.getUser();
        if (username != null) {
            User user;
            try {
                user = userDao.getUser(username);
                return user;
            } catch (Exception ex) {
                java.util.logging.Logger.getLogger(AbstractController.class.getName()).log(Level.SEVERE, null, ex);
View Full Code Here

            Call call = new Call("v2js_header", "zero_header");
            view.addCall(call);
        }


        User user = getUser();

        if (user != null) {
            String username = user.getUsername();

            Menu menu = (Menu) session.getAttribute(ZeroConstants.MENU_KEY);

            if (menu == null) {
                menu = new Menu(getMessages(), request.getLocale());
View Full Code Here

TOP

Related Classes of at.riemers.zero.base.model.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.