1 |
|
|
2 |
|
|
3 |
|
|
4 |
|
|
5 |
|
|
6 |
|
|
7 |
|
|
8 |
|
|
9 |
|
|
10 |
|
|
11 |
|
|
12 |
|
|
13 |
|
|
14 |
|
|
15 |
|
|
16 |
|
|
17 |
|
|
18 |
|
|
19 |
|
|
20 |
|
|
21 |
|
|
22 |
|
|
23 |
|
|
24 |
|
|
25 |
|
|
26 |
|
|
27 |
|
|
28 |
|
|
29 |
|
|
30 |
|
|
31 |
|
|
32 |
|
|
33 |
|
|
34 |
|
package info.magnolia.module.rssaggregator.app; |
35 |
|
|
36 |
|
import info.magnolia.cms.security.AccessManager; |
37 |
|
import info.magnolia.cms.security.Permission; |
38 |
|
import info.magnolia.context.MgnlContext; |
39 |
|
import info.magnolia.module.rssaggregator.RSSAggregatorConstants; |
40 |
|
import info.magnolia.module.rssaggregator.app.subapps.aggregationconfig.RSSAggregatorSimpleConfigSubApp; |
41 |
|
import info.magnolia.objectfactory.ComponentProvider; |
42 |
|
import info.magnolia.ui.api.app.AppContext; |
43 |
|
import info.magnolia.ui.api.app.AppView; |
44 |
|
import info.magnolia.ui.api.location.DefaultLocation; |
45 |
|
import info.magnolia.ui.api.location.Location; |
46 |
|
import info.magnolia.ui.contentapp.ContentApp; |
47 |
|
|
48 |
|
import javax.inject.Inject; |
49 |
|
|
50 |
|
|
51 |
|
|
52 |
|
|
|
|
| 0% |
Uncovered Elements: 12 (12) |
Complexity: 4 |
Complexity Density: 0.67 |
|
53 |
|
public class RSSAggregatorApp extends ContentApp { |
54 |
|
|
55 |
|
public static final String APP_NAME = "rssAggregator"; |
56 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
57 |
0 |
@Inject... |
58 |
|
public RSSAggregatorApp(AppContext appContext, AppView view, ComponentProvider componentProvider) { |
59 |
0 |
super(appContext, view, componentProvider); |
60 |
|
} |
61 |
|
|
|
|
| 0% |
Uncovered Elements: 9 (9) |
Complexity: 3 |
Complexity Density: 0.6 |
|
62 |
0 |
@Override... |
63 |
|
public void start(Location location) { |
64 |
0 |
AccessManager accessManager = MgnlContext.getAccessManager(RSSAggregatorConstants.WORKSPACE); |
65 |
0 |
if (accessManager != null) { |
66 |
0 |
if (accessManager.isGranted("/", Permission.WRITE)) { |
67 |
0 |
getAppContext().openSubApp(new DefaultLocation(Location.LOCATION_TYPE_APP, APP_NAME, RSSAggregatorSimpleConfigSubApp.CONFIG_SUBAPP_ID)); |
68 |
|
} |
69 |
|
} |
70 |
0 |
super.start(location); |
71 |
|
} |
72 |
|
} |