• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

knowledgepixels / nanodash / 31467088259

11 Aug 2026 06:58AM UTC coverage: 35.579% (+0.2%) from 35.418%
31467088259

push

github

web-flow
Merge pull request #588 from knowledgepixels/584-governed-status-line

fix: recognize space-governed updates in the "Status" line

2740 of 8470 branches covered (32.35%)

Branch coverage included in aggregate %.

5239 of 13956 relevant lines covered (37.54%)

5.83 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
src/main/java/com/knowledgepixels/nanodash/component/OutdatedSourceErrorItem.java
1
package com.knowledgepixels.nanodash.component;
2

3
import org.apache.wicket.markup.html.WebPage;
4
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
5
import org.apache.wicket.markup.html.panel.Panel;
6
import org.apache.wicket.request.mapper.parameter.PageParameters;
7

8
import com.knowledgepixels.nanodash.NavigationContext;
9
import com.knowledgepixels.nanodash.QueryApiAccess;
10
import com.knowledgepixels.nanodash.page.ExplorePage;
11

12
/**
13
 * Panel to display an error message when the nanopublication that is to be
14
 * superseded or overridden is not the latest version anymore. It is shown
15
 * instead of the publish form, so the user doesn't fill in a form that cannot
16
 * be published anyway.
17
 */
18
public class OutdatedSourceErrorItem extends Panel {
19

20
    /**
21
     * Constructor for OutdatedSourceErrorItem.
22
     *
23
     * @param id the component id
24
     * @param pageParams the page parameters that ask to supersede or override
25
     * an outdated nanopublication
26
     * @param publishPageClass the class of the publish page, used to link to
27
     * the same action on the latest version
28
     */
29
    public OutdatedSourceErrorItem(String id, final PageParameters pageParams, Class<? extends WebPage> publishPageClass) {
30
        super(id);
×
31
        String sourceNpId = PublishForm.getSupersededOrOverriddenNanopubId(pageParams);
×
32
        String latestNpId = QueryApiAccess.getLatestVersionId(sourceNpId);
×
33
        add(new BookmarkablePageLink<Void>("latest-link", ExplorePage.class, new PageParameters().set("id", latestNpId))
×
34
                .add(NavigationContext.pageContextFallback()));
×
35
        add(new BookmarkablePageLink<Void>("latest-action-link", publishPageClass, PublishForm.withSourceNanopub(pageParams, latestNpId)));
×
36
    }
×
37

38
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc