当前位置: 首页>>代码示例>>Java>>正文


Java Injector类代码示例

本文整理汇总了Java中org.apache.wicket.injection.Injector的典型用法代码示例。如果您正苦于以下问题:Java Injector类的具体用法?Java Injector怎么用?Java Injector使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


Injector类属于org.apache.wicket.injection包,在下文中一共展示了Injector类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: doRender

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
protected BootstrapRendererInformation doRender(INode value, Locale locale) {
	if (!initialized) {
		Injector.get().inject(this);
		initialized = true;
	}
	
	if (value == null) {
		return BootstrapRendererInformation.builder().build();
	}
	
	if (infinispanClusterService.getMembers().contains(value.getAddress())) {
		return BootstrapRendererInformation.builder()
				.icon("fa fa-toggle-on")
				.label(getString("business.infinispan.node.connected", locale))
				.build();
	}
	
	return BootstrapRendererInformation.builder()
			.icon("fa fa-toggle-off")
			.label(getString("business.infinispan.node.disconnected", locale))
			.build();
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:24,代码来源:INodeRenderer.java

示例2: load

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
protected List<MenuItem> load() {
	Injector.get().inject(this);
       List<MenuItem> menuItems = new ArrayList<MenuItem>();
       menuItems.add(new MenuItem(createEditLink(model), new StringResourceModel("WidgetPopupMenu.editSettings", null).getString(), "images/edit.png"));
       if (model.getObject().saveToExcel()) {
       	menuItems.add(new MenuItem(createSaveToExcelLink(model), new StringResourceModel("WidgetPopupMenu.saveExcel", null).getString(), "images/excel.gif"));
       }
       menuItems.add(new MenuItem(createGoToLink(model), new StringResourceModel("WidgetPopupMenu.gotoEntity", null).getString(), "images/widget_go.png"));
       menuItems.add(new MenuItem(createRefreshLink(model), new StringResourceModel("WidgetPopupMenu.refresh", null).getString(), "images/refresh.gif"));
       menuItems.add(new MenuItem(createDetachLink(model), new StringResourceModel("WidgetPopupMenu.detach", null).getString(), "images/detach.png"));
       menuItems.add(new MenuItem(createEmbedCodeLink(model), new StringResourceModel("WidgetPopupMenu.embeddedCode", null).getString(), "images/embed_code.png"));
       menuItems.add(new MenuItem(createMoveLink(model), new StringResourceModel("WidgetPopupMenu.copyMove", null).getString(), "images/move_widget.png"));
       menuItems.add(new MenuItem(createDeleteLink(model), new StringResourceModel("WidgetPopupMenu.delete", null).getString(), "images/delete.gif"));
       MenuItem menuItem = new MenuItem("images/actions.png", null);
       menuItem.setMenuItems(menuItems);
       
       return Arrays.asList(menuItem);        
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:20,代码来源:WidgetPopupMenuModel.java

示例3: load

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@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);
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:26,代码来源:DashboardPopupMenuModel.java

示例4: load

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
protected List<MenuItem> load() {
	Injector.get().inject(this);
       List<MenuItem> menuItems = new ArrayList<MenuItem>();
       Object analysis = model.getObject();
       
       AnalysisSection analysisSection = (AnalysisSection)sectionManager.getSection(AnalysisSection.ID);
       List<ActionContributor> popupContributors = analysisSection.getPopupContributors();
       if (popupContributors != null) {
       	for (ActionContributor contributor : popupContributors) {    
       			if (contributor.isVisible()) {
        			AbstractLink link = contributor.getLink(createActionContext(analysis));
        			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);
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:26,代码来源:AnalysisPopupMenuModel.java

示例5: NextServerSession

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
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);		
	}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:18,代码来源:NextServerSession.java

示例6: NextPivotDataSource

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
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);	
       }
}
 
开发者ID:nextreports,项目名称:nextreports-server,代码行数:22,代码来源:NextPivotDataSource.java

示例7: StepModel

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public StepModel(String sessionId, StepWrapper step) {
    this.sessionId = sessionId;
    sectionIndex = step.getScenario().getSection().getIndex();
    scenarioIndex = step.getScenario().getIndex();
    stepIndex = step.getIndex();
    Injector.get().inject(this);
}
 
开发者ID:intuit,项目名称:karate,代码行数:8,代码来源:StepModel.java

示例8: MidPointAuthWebSession

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public MidPointAuthWebSession(Request request) {
    super(request);
    Injector.get().inject(this);

    Locale locale = getLocale();
    LOGGER.debug("Found locale {}", locale);
    if (locale == null || !MidPointApplication.containsLocale(locale)) {
        //default locale for web application
        setLocale(MidPointApplication.getDefaultLocale());
    }
    LOGGER.debug("Using {} as locale", getLocale());
}
 
开发者ID:Pardus-Engerek,项目名称:engerek,代码行数:13,代码来源:MidPointAuthWebSession.java

示例9: render

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
@Override
public String render(HistoryValue value, Locale locale) {
	if (!initialized) {
		Injector.get().inject(this);
		initialized = true;
	}
	return historyValueService.render(value, locale);
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:9,代码来源:HistoryValueRenderer.java

示例10: LessCssResource

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public LessCssResource(Class<?> scope, String name, Locale locale, String style, String variation) {
	super(scope, name, locale, style, variation);
	
	Injector.get().inject(this);
	
	this.name = name;
	this.locale = locale;
	this.variation = variation;
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:10,代码来源:LessCssResource.java

示例11: ScssResource

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public ScssResource(Class<?> scope, String name, Locale locale, String style, String variation) {
	super(scope, name, locale, style, variation);
	
	Injector.get().inject(this);
	
	this.name = name;
	this.locale = locale;
	this.variation = variation;
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:10,代码来源:ScssResource.java

示例12: LocalizedGenericListItemListModel

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public LocalizedGenericListItemListModel(Class<T> clazz, Comparator<? super T> comparator, EnabledFilter enabledFilter) {
	super();
	Injector.get().inject(this);
	
	this.clazz = clazz;
	this.enabledFilter = enabledFilter;
	this.comparator = comparator;
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:9,代码来源:LocalizedGenericListItemListModel.java

示例13: GenericListItemListModel

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
public GenericListItemListModel(Class<T> clazz, @Nullable Comparator<? super T> comparator, EnabledFilter enabledFilter) {
	super();
	Injector.get().inject(this);
	
	this.clazz = clazz;
	this.enabledFilter = enabledFilter;
	this.comparator = comparator;
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:9,代码来源:GenericListItemListModel.java

示例14: AbstractSessionThreadSafeGenericEntityCollectionModel

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
protected AbstractSessionThreadSafeGenericEntityCollectionModel(Class<E> clazz, Supplier<? extends C> newCollectionSupplier) {
	super();
	Injector.get().inject(this);
	
	this.clazz = clazz;
	this.newCollectionSupplier = newCollectionSupplier;
	setObject(null); // Sets to an empty collection
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:9,代码来源:AbstractSessionThreadSafeGenericEntityCollectionModel.java

示例15: AbstractGenericEntityCollectionModel

import org.apache.wicket.injection.Injector; //导入依赖的package包/类
protected AbstractGenericEntityCollectionModel(Class<E> clazz, Supplier<? extends C> newCollectionSupplier) {
	super();
	Injector.get().inject(this);
	
	this.clazz = clazz;
	this.newCollectionSupplier = newCollectionSupplier;
	setObject(null); // Sets to an empty collection
}
 
开发者ID:openwide-java,项目名称:owsi-core-parent,代码行数:9,代码来源:AbstractGenericEntityCollectionModel.java


注:本文中的org.apache.wicket.injection.Injector类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。