Revision 42621
Added by Sandro La Bruzzo almost 8 years ago
ModuleEntryPoint.java | ||
---|---|---|
1 | 1 |
package eu.dnetlib.functionality.modular.ui; |
2 | 2 |
|
3 | 3 |
import java.net.URLEncoder; |
4 |
|
|
5 | 4 |
import javax.annotation.Resource; |
6 | 5 |
import javax.servlet.http.HttpServletRequest; |
7 | 6 |
import javax.servlet.http.HttpServletResponse; |
8 | 7 |
|
8 |
import eu.dnetlib.functionality.modular.ui.users.AuthorizationManager; |
|
9 |
import eu.dnetlib.functionality.modular.ui.users.User; |
|
10 |
import eu.dnetlib.functionality.modular.ui.utils.ShutdownUtils; |
|
9 | 11 |
import org.apache.commons.lang3.StringUtils; |
10 | 12 |
import org.springframework.beans.factory.BeanNameAware; |
13 |
import org.springframework.beans.factory.annotation.Autowired; |
|
11 | 14 |
import org.springframework.beans.factory.annotation.Required; |
12 | 15 |
import org.springframework.beans.factory.annotation.Value; |
13 | 16 |
import org.springframework.ui.ModelMap; |
... | ... | |
15 | 18 |
import org.springframework.web.servlet.mvc.Controller; |
16 | 19 |
import org.springframework.web.servlet.view.RedirectView; |
17 | 20 |
|
18 |
import eu.dnetlib.functionality.modular.ui.users.AuthorizationManager; |
|
19 |
import eu.dnetlib.functionality.modular.ui.users.User; |
|
20 |
import eu.dnetlib.functionality.modular.ui.utils.ShutdownUtils; |
|
21 |
|
|
22 | 21 |
public abstract class ModuleEntryPoint extends MenuEntry implements Controller, BeanNameAware { |
23 | 22 |
|
23 |
@Autowired |
|
24 |
protected EntryPointsAggregator aggregator; |
|
25 |
@Resource(name = "modularUiAuthorizationManager") |
|
26 |
protected AuthorizationManager authorizationManager; |
|
24 | 27 |
private String beanName; |
25 |
|
|
26 | 28 |
private boolean validMenuEntry = true; |
27 |
|
|
28 | 29 |
private String group; |
29 | 30 |
private int groupOrder = 50; |
30 |
|
|
31 | 31 |
@Value("${dnet.modular.ui.authentication.url}") |
32 | 32 |
private String authenticationUrl; |
33 |
|
|
34 | 33 |
@Value("${dnet.modular.ui.logout.url}") |
35 | 34 |
private String logoutUrl; |
36 |
|
|
37 | 35 |
@Value("${dnet.modular.ui.ribbon.environment}") |
38 | 36 |
private String environment; |
39 |
|
|
40 | 37 |
@Value("${dnet.modular.ui.ribbon.accent}") |
41 | 38 |
private String ribbonAccent; |
42 |
|
|
43 |
@Resource |
|
44 |
protected EntryPointsAggregator aggregator; |
|
45 |
|
|
46 |
@Resource |
|
39 |
@Autowired |
|
47 | 40 |
private ShutdownUtils shutdownUtils; |
48 | 41 |
|
49 |
@Resource(name = "modularUiAuthorizationManager") |
|
50 |
protected AuthorizationManager authorizationManager; |
|
51 |
|
|
52 | 42 |
@Override |
53 | 43 |
public ModelAndView handleRequest(final HttpServletRequest request, final HttpServletResponse response) throws Exception { |
54 | 44 |
|
Also available in: Unified diff
Chnaged Resource to Autowired