org.apache.wicket.injection.Injector Java Examples
The following examples show how to use
org.apache.wicket.injection.Injector.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: NextServerSession.java From nextreports-server with Apache License 2.0 | 6 votes |
public NextServerSession(Request request) { super(request); Injector.get().inject(this); sectionContexts = new HashMap<String, SectionContext>(); List<Section> sections = sectionManager.getSections(); for (Section section : sections) { sectionContexts.put(section.getId(), SectionContextFactory.createSectionContext(section)); } // if (!sections.isEmpty()) { // selectedSectionId = sections.get(0).getId(); // } String language = storageService.getSettings().getLanguage(); Locale locale = LanguageManager.getInstance().getLocale(language); setLocale(locale); LOG.info("--------------------> Set locale to: " + language); }
Example #2
Source File: DashboardPopupMenuModel.java From nextreports-server with Apache License 2.0 | 6 votes |
@Override protected List<MenuItem> load() { Injector.get().inject(this); List<MenuItem> menuItems = new ArrayList<MenuItem>(); Object dashboard = model.getObject(); DashboardSection dashboardSection = (DashboardSection)sectionManager.getSection(DashboardSection.ID); List<ActionContributor> popupContributors = dashboardSection.getPopupContributors(); if (popupContributors != null) { for (ActionContributor contributor : popupContributors) { if (contributor.isVisible()) { AbstractLink link = contributor.getLink(createActionContext(dashboard)); if (link.isVisible()) { menuItems.add(new MenuItem(link, contributor.getActionName(), contributor.getActionImage())); } } } } //MenuItem menuItem = new MenuItem("images/" + ThemesManager.getActionImage(storageService.getSettings().getColorTheme()), null); MenuItem menuItem = new MenuItem("images/actions.png", null); menuItem.setMenuItems(menuItems); return Arrays.asList(menuItem); }
Example #3
Source File: NextPivotDataSource.java From nextreports-server with Apache License 2.0 | 6 votes |
public NextPivotDataSource(PivotWidget widget, Map<String, Object> urlQueryParameters) throws ReportRunnerException { Injector.get().inject(this); Entity entity = DashboardUtil.getEntity(widget, storageService); if (!(entity instanceof Chart) && !(entity instanceof Report)) { throw new IllegalArgumentException("Entity for NextPivotDataSource must be a report or a chart!"); } DataSource dataSource = getDataSource(entity); Connection connection = null; try { connection = ConnectionUtil.createConnection(storageService, dataSource); init(getQueryResult(connection, widget, urlQueryParameters)); } catch (Exception e) { throw new ReportRunnerException(e); } finally { ConnectionUtil.closeConnection(connection); } }
Example #4
Source File: NewPollFrontendModel.java From projectforge-webapp with GNU General Public License v3.0 | 5 votes |
/** * */ public NewPollFrontendModel(final PollDO pollDo) { Injector.get().inject(this); this.pollDo = pollDo; this.allEvents = new LinkedList<PollEventDO>(); this.pollAttendeeList = new LinkedList<PollAttendeeDO>(); this.pollGroupList = new LinkedList<GroupDO>(); }
Example #5
Source File: ArtifactDataProvider.java From artifact-listener with Apache License 2.0 | 5 votes |
public ArtifactDataProvider(IModel<String> searchTerm, IModel<ArtifactDeprecationStatus> deprecationModel) { super(); this.searchTermModel = searchTerm; this.deprecationModel = deprecationModel; Injector.get().inject(this); }
Example #6
Source File: FriendsFeedDataProvider.java From sakai with Educational Community License v2.0 | 5 votes |
public FriendsFeedDataProvider(final String userUuid) { this.userUuid = userUuid; Injector.get().inject(this); //calculate the number we'll have in the feed, 0 < n < ProfileConstants.MAX_FRIENDS_FEED_ITEMS int count = connectionsLogic.getConnectionsForUserCount(userUuid); subListSize = ProfileConstants.MAX_FRIENDS_FEED_ITEMS; if(count < subListSize) { subListSize = count; } }
Example #7
Source File: UsernameTextField.java From wicket-spring-boot with Apache License 2.0 | 5 votes |
public UsernameTextField(String id) { super(id); Injector.get().inject(this); add(StringValidator.minimumLength(3)); setRequired(true); add(new UsernameExistsValidator()); }
Example #8
Source File: MenuNewCounterMeb.java From projectforge-webapp with GNU General Public License v3.0 | 5 votes |
@Override public Integer getObject() { if (mebDao == null) { Injector.get().inject(this); } return mebDao.getRecentMEBEntries(null); }
Example #9
Source File: PasswordValidator.java From nextreports-server with Apache License 2.0 | 5 votes |
public PasswordValidator(FormComponent formComponent) { if (formComponent == null) { throw new IllegalArgumentException("argument formComponent cannot be null"); } components = new FormComponent[]{formComponent}; Injector.get().inject(this); }
Example #10
Source File: OmTreeProvider.java From openmeetings with Apache License 2.0 | 5 votes |
public OmTreeProvider(Long roomId) { Injector.get().inject(this); this.roomId = roomId; PUBLIC = Application.getString("861"); GROUP_FILE = Application.getString("files.root.group"); GROUP_REC = Application.getString("recordings.root.group"); refreshRoots(true); }
Example #11
Source File: RecommendedArtifactDataProvider.java From artifact-listener with Apache License 2.0 | 5 votes |
public RecommendedArtifactDataProvider(IModel<String> globalSearchModel, IModel<String> searchGroupModel, IModel<String> searchArtifactModel) { Injector.get().inject(this); if (globalSearchModel == null || searchGroupModel == null || searchArtifactModel == null) { throw new IllegalArgumentException("Null models are not supported."); } this.globalSearchModel = globalSearchModel; this.searchGroupModel = searchGroupModel; this.searchArtifactModel = searchArtifactModel; }
Example #12
Source File: ReportsDataProvider.java From sakai with Educational Community License v2.0 | 5 votes |
public ReportsDataProvider(PrefsData prefsData, ReportDef reportDef, boolean logInfo) { Injector.get().inject(this); this.prefsData = prefsData; this.setReportDef(reportDef); this.logInfo = logInfo; // set default sort if(!reportDef.getReportParams().isHowSort() || reportDef.getReportParams().getHowSortBy() == null) { setSort(COL_USERNAME, SortOrder.ASCENDING); }else{ setSort(reportDef.getReportParams().getHowSortBy(), reportDef.getReportParams().getHowSortAscending() ? SortOrder.ASCENDING : SortOrder.DESCENDING); } }
Example #13
Source File: PollsSubMenu.java From openmeetings with Apache License 2.0 | 5 votes |
public PollsSubMenu(final RoomPanel room, final RoomMenuPanel mp) { Injector.get().inject(this); this.room = room; this.mp = mp; mp.add(createPoll = new CreatePollDialog("createPoll", room.getRoom().getId())); mp.add(vote = new VoteDialog("vote")); mp.add(pollResults = new PollResultsDialog("pollResults", createPoll, room.getRoom().getId())); visible = !room.getRoom().isHidden(RoomElement.POLL_MENU); }
Example #14
Source File: MenuNewCounterOrder.java From projectforge-webapp with GNU General Public License v3.0 | 5 votes |
@Override public Integer getObject() { if (auftragDao == null) { Injector.get().inject(this); } return auftragDao.getAbgeschlossenNichtFakturiertAnzahl(); }
Example #15
Source File: ReportsDataProvider.java From sakai with Educational Community License v2.0 | 5 votes |
public ReportsDataProvider(PrefsData prefsData, ReportDef reportDef, boolean logInfo) { Injector.get().inject(this); this.prefsData = prefsData; this.setReportDef(reportDef); this.logInfo = logInfo; // set default sort if(!reportDef.getReportParams().isHowSort() || reportDef.getReportParams().getHowSortBy() == null) { setSort(COL_USERNAME, SortOrder.ASCENDING); }else{ setSort(reportDef.getReportParams().getHowSortBy(), reportDef.getReportParams().getHowSortAscending() ? SortOrder.ASCENDING : SortOrder.DESCENDING); } }
Example #16
Source File: ReportDefsProvider.java From sakai with Educational Community License v2.0 | 5 votes |
public ReportDefsProvider(String siteId, int mode, boolean filterWithToolsInSite, boolean includeHidden) { Injector.get().inject(this); this.siteId = siteId; this.mode = mode; this.filterWithToolsInSite = filterWithToolsInSite; this.includeHidden = includeHidden; }
Example #17
Source File: TableResource.java From nextreports-server with Apache License 2.0 | 5 votes |
public TableResource(TableData data, String fileName) { super("excel/ms-excel"); this.data = data; this.fileName = fileName; Injector.get().inject(this); }
Example #18
Source File: AnalysisDataProvider.java From nextreports-server with Apache License 2.0 | 5 votes |
public AnalysisDataProvider(IModel<Analysis> model) { this.analysis = model.getObject(); if ((analysis != null) && (analysis.getSortProperty() != null) && !analysis.getSortProperty().isEmpty()) { SortOrder order = analysis.getAscending().get(0) ? SortOrder.ASCENDING : SortOrder.DESCENDING; setSort(analysis.getSortProperty().get(0), order); } Injector.get().inject(this); }
Example #19
Source File: TableDataProvider.java From nextreports-server with Apache License 2.0 | 5 votes |
public TableDataProvider(String widgetId, DrillEntityContext drillContext, Map<String, Object> urlQueryParameters) { this.widgetId = widgetId; this.drillContext = drillContext; this.urlQueryParameters = urlQueryParameters; Injector.get().inject(this); }
Example #20
Source File: DeleteActionLink.java From nextreports-server with Apache License 2.0 | 4 votes |
public DeleteActionLink(AnalysisActionContext actionContext) { super(MenuPanel.LINK_ID, new StringResourceModel("AnalysisPopupMenuModel.deleteAsk", null, new Object[] { actionContext.getEntity().getName() }).getString()); this.actionContext = actionContext; Injector.get().inject(this); }
Example #21
Source File: DetachablePersonModel.java From sakai with Educational Community License v2.0 | 4 votes |
public DetachablePersonModel(Person p) { super(p); this.userUuid = p.getUuid(); Injector.get().inject(this); }
Example #22
Source File: DetachableMessageModel.java From sakai with Educational Community License v2.0 | 4 votes |
/** * @param m */ public DetachableMessageModel(Message m){ this.id = m.getId(); Injector.get().inject(this); }
Example #23
Source File: MessageThreadsDataProvider.java From sakai with Educational Community License v2.0 | 4 votes |
public MessageThreadsDataProvider(String userUuid) { this.userUuid = userUuid; Injector.get().inject(this); }
Example #24
Source File: ConfirmedFriendsDataProvider.java From sakai with Educational Community License v2.0 | 4 votes |
public ConfirmedFriendsDataProvider(final String userUuid) { this.userUuid = userUuid; Injector.get().inject(this); }
Example #25
Source File: WallItemDataProvider.java From sakai with Educational Community License v2.0 | 4 votes |
public WallItemDataProvider(String userUuid) { this.userUuid = userUuid; Injector.get().inject(this); }
Example #26
Source File: DetachableMessageThreadModel.java From sakai with Educational Community License v2.0 | 4 votes |
/** * @param id */ public DetachableMessageThreadModel(String id){ this.id = id; Injector.get().inject(this); }
Example #27
Source File: BootstrapDesignRequestCycleListener.java From AppStash with Apache License 2.0 | 4 votes |
public BootstrapDesignRequestCycleListener() { Injector.get().inject(this); }
Example #28
Source File: DetachableMessageModel.java From sakai with Educational Community License v2.0 | 4 votes |
/** * @param id */ public DetachableMessageModel(String id){ this.id = id; Injector.get().inject(this); }
Example #29
Source File: GalleryImageDataProvider.java From sakai with Educational Community License v2.0 | 4 votes |
public GalleryImageDataProvider(String userUuid) { this.userUuid = userUuid; Injector.get().inject(this); }
Example #30
Source File: DetachableMessageThreadModel.java From sakai with Educational Community License v2.0 | 4 votes |
/** * @param m */ public DetachableMessageThreadModel(MessageThread m){ this.id = m.getId(); Injector.get().inject(this); }