1 /* |
1 /* |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
2 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER. |
3 * |
3 * |
4 * Copyright 2018 Mike Becker. All rights reserved. |
4 * Copyright 2021 Mike Becker. All rights reserved. |
5 * |
5 * |
6 * Redistribution and use in source and binary forms, with or without |
6 * Redistribution and use in source and binary forms, with or without |
7 * modification, are permitted provided that the following conditions are met: |
7 * modification, are permitted provided that the following conditions are met: |
8 * |
8 * |
9 * 1. Redistributions of source code must retain the above copyright |
9 * 1. Redistributions of source code must retain the above copyright |
52 urlPatterns = "/teams/*" |
52 urlPatterns = "/teams/*" |
53 ) |
53 ) |
54 public final class UsersModule extends AbstractServlet { |
54 public final class UsersModule extends AbstractServlet { |
55 |
55 |
56 private static final Logger LOG = LoggerFactory.getLogger(UsersModule.class); |
56 private static final Logger LOG = LoggerFactory.getLogger(UsersModule.class); |
57 |
|
58 @Override |
|
59 protected String getResourceBundleName() { |
|
60 return "localization.users"; |
|
61 } |
|
62 |
57 |
63 @RequestMapping(method = HttpMethod.GET) |
58 @RequestMapping(method = HttpMethod.GET) |
64 public void index(HttpServletRequest req, HttpServletResponse resp, DataAccessObject dao) throws SQLException, ServletException, IOException { |
59 public void index(HttpServletRequest req, HttpServletResponse resp, DataAccessObject dao) throws SQLException, ServletException, IOException { |
65 final var viewModel = new UsersView(); |
60 final var viewModel = new UsersView(); |
66 viewModel.setUsers(dao.listUsers()); |
61 viewModel.setUsers(dao.listUsers()); |