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


Java SpringView类代码示例

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


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

示例1: viewsEnterAdvisor

import com.vaadin.spring.annotation.SpringView; //导入依赖的package包/类
/**
 * @return customizableTraceInterceptor sur les méthodes enter des vues
 */
@Bean
public Advisor viewsEnterAdvisor() {
	return new StaticMethodMatcherPointcutAdvisor(customizableTraceInterceptor()) {

		/**serialVersionUID**/
		private static final long serialVersionUID = 3484525172356507679L;

		@Override
		public boolean matches(Method method, Class<?> clazz) {
			return clazz.isAnnotationPresent(SpringView.class) && "enter".equals(method.getName());
		}
	};
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:17,代码来源:TraceFullConfig.java

示例2: viewsEnterAdvisor

import com.vaadin.spring.annotation.SpringView; //导入依赖的package包/类
/**
 * @return customizableTraceInterceptor sur les méthodes enter des vues
 */
@Bean
public Advisor viewsEnterAdvisor() {
	return new StaticMethodMatcherPointcutAdvisor(customizableTraceInterceptor()) {
		

		/**serialVersionUID**/
		private static final long serialVersionUID = -1111119064011020300L;

		@Override
		public boolean matches(Method method, Class<?> clazz) {
			return clazz.isAnnotationPresent(SpringView.class) && "enter".equals(method.getName());
		}
	};
}
 
开发者ID:EsupPortail,项目名称:esup-ecandidat,代码行数:18,代码来源:TraceConfig.java

示例3: scanForItems

import com.vaadin.spring.annotation.SpringView; //导入依赖的package包/类
private void scanForItems() {
    logger.debug("Scanning for side bar items");
    String[] beanNames = applicationContext.getBeanNamesForAnnotation(SideBarItem.class);
    for (String beanName : beanNames) {
        logger.debug("Bean [{}] declares a side bar item", beanName);
        Class<?> beanType = applicationContext.getType(beanName);
        if (Runnable.class.isAssignableFrom(beanType)) {
            logger.debug("Adding side bar item for action [{}]", beanType);
            this.items.add(new SideBarItemDescriptor.ActionItemDescriptor(beanName, applicationContext));
        } else if (View.class.isAssignableFrom(beanType) && beanType.isAnnotationPresent(SpringView.class)) {
            logger.debug("Adding side bar item for view [{}]", beanType);
            this.items.add(new SideBarItemDescriptor.ViewItemDescriptor(beanName, applicationContext));
        }
    }
}
 
开发者ID:peholmst,项目名称:vaadin4spring,代码行数:16,代码来源:SideBarUtils.java

示例4: isAccessGranted

import com.vaadin.spring.annotation.SpringView; //导入依赖的package包/类
@Override
public boolean isAccessGranted(UI ui, String beanName) {
    final SpringView annotation = applicationContext.findAnnotationOnBean(beanName, SpringView.class);
    if (annotation != null) {
        return allowedViews.contains(annotation.name());
    } else {
        return false;
    }
}
 
开发者ID:peholmst,项目名称:vaadin4spring,代码行数:10,代码来源:AccessControlView.java

示例5: ViewItemDescriptor

import com.vaadin.spring.annotation.SpringView; //导入依赖的package包/类
/**
 * You should never need to create instances of this class directly.
 *
 * @param beanName           the name of the bean that implements the view to go to, must not be {@code null}.
 * @param applicationContext the application context to use when looking up beans, must not be {@code null}.
 */
public ViewItemDescriptor(String beanName, ApplicationContext applicationContext) {
    super(beanName, applicationContext);
    this.vaadinView = applicationContext.findAnnotationOnBean(beanName, SpringView.class);
}
 
开发者ID:peholmst,项目名称:vaadin4spring,代码行数:11,代码来源:SideBarItemDescriptor.java


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