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.resources.app.action; |
35 |
|
|
36 |
|
import info.magnolia.context.Context; |
37 |
|
import info.magnolia.i18nsystem.SimpleTranslator; |
38 |
|
import info.magnolia.resources.app.utils.ResourceUtils; |
39 |
|
import info.magnolia.resources.app.workbench.ResourcesContainer; |
40 |
|
import info.magnolia.ui.api.action.ActionExecutionException; |
41 |
|
import info.magnolia.ui.api.app.AppContext; |
42 |
|
import info.magnolia.ui.api.context.UiContext; |
43 |
|
import info.magnolia.ui.api.location.Location; |
44 |
|
import info.magnolia.ui.api.location.LocationController; |
45 |
|
import info.magnolia.ui.contentapp.browser.action.ShowVersionsAction; |
46 |
|
import info.magnolia.ui.dialog.formdialog.FormDialogPresenter; |
47 |
|
import info.magnolia.ui.vaadin.integration.jcr.DefaultProperty; |
48 |
|
|
49 |
|
import javax.inject.Inject; |
50 |
|
|
51 |
|
import com.vaadin.data.Item; |
52 |
|
|
53 |
|
|
54 |
|
|
55 |
|
|
56 |
|
|
57 |
|
|
58 |
|
@see |
59 |
|
|
|
|
| 0% |
Uncovered Elements: 7 (7) |
Complexity: 3 |
Complexity Density: 0.6 |
|
60 |
|
public class ShowResourcesVersionsAction extends ShowVersionsAction<ShowResourcesVersionsActionDefinition> { |
61 |
|
|
|
|
| 0% |
Uncovered Elements: 1 (1) |
Complexity: 1 |
Complexity Density: 1 |
|
62 |
0 |
@Inject... |
63 |
|
public ShowResourcesVersionsAction(ShowResourcesVersionsActionDefinition definition, AppContext appContext, LocationController locationController, UiContext uiContext, FormDialogPresenter formDialogPresenter, Item resourceItem, SimpleTranslator i18n, Context context) { |
64 |
0 |
super(definition, appContext, locationController, uiContext, formDialogPresenter, ResourceUtils.getJcrNodeAdapterFor(context, resourceItem), i18n, getContentConnectorForDeprecations(uiContext)); |
65 |
|
} |
66 |
|
|
|
|
| 0% |
Uncovered Elements: 4 (4) |
Complexity: 2 |
Complexity Density: 0.5 |
|
67 |
0 |
@Override... |
68 |
|
protected Location getLocation() throws ActionExecutionException { |
69 |
0 |
try { |
70 |
0 |
nodeAdapter.addItemProperty(ResourcesContainer.RESOURCE_PATH, new DefaultProperty<>(getNode().getPath())); |
71 |
|
} catch (Exception e) { |
72 |
0 |
throw new ActionExecutionException("Could not get path from nodeAdapter " + nodeAdapter.getItemId()); |
73 |
|
} |
74 |
0 |
return super.getLocation(); |
75 |
|
} |
76 |
|
} |