Java 类com.vaadin.server.UIClassSelectionEvent 实例源码

项目:KrishnasSpace    文件:CustomVaadinServlet.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {

    VaadinRequest request = event.getRequest();

    String url = parseUIMapping(request);
    // If url is login, return LoginUI class
    if (url.contains("login")) {
        return LoginUI.class;
    }

    // If url is an empty url then return Secure if user is an
    // authenticated else return login UI
    if (url.isEmpty()) {
        Principal principal = request.getUserPrincipal();
        if (null == principal) {

            return LoginUI.class;
        }
        return SecureUI.class;
    }
    // Return the secured UI
    if (url.contains("secured")) {
        return SecureUI.class;
    }

    return null;
}
项目:root    文件:WoundManagementUIProvider.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
    String userAgent = event.getRequest().getHeader("user-agent").toLowerCase();
    if (overrideMobileUA() || userAgent.contains("mobile")) {
        return WoundManagementUI.class;
    } else {
        return WoundManagementUI.class;
    }
}
项目:vaadin4spring    文件:SpringAwareUIProvider.java   
@Override
@SuppressWarnings("unchecked")
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
    Object uiClassNameObj = event.getService()
            .getDeploymentConfiguration()
            .getApplicationOrSystemProperty(VaadinSession.UI_PARAMETER, null);

    if (uiClassNameObj instanceof String) {
        String uiClassName = uiClassNameObj.toString();
        return uiNameToUiClassMap.get(uiClassName);
    }
    return null;
}
项目:extacrm    文件:MyUIProvider.java   
/** {@inheritDoc} */
@Override
public Class<? extends UI> getUIClass(final UIClassSelectionEvent event) {

    final VaadinRequest request = event.getRequest();
    if (request.getPathInfo().startsWith("/ui/elifui"))
        return LeadInputFormUI.class;
    else
        return ExtaCrmUI.class;
}
项目:panifex-platform    文件:ModularUIProviderTest.java   
/**
 * Asserts the {@link ModularUIProvider#getUIClass(com.vaadin.server.UIClassSelectionEvent)}
 * always returns the {@link PageletAwareUI} class.
 */
@Test
public void testGetUIClass() {
    UIClassSelectionEvent event = createMock(UIClassSelectionEvent.class);

    Class<?> uiClass = provider.getUIClass(event);

    assertEquals(PageletAwareUI.class, uiClass);
}
项目:CloTouch    文件:MyUIProvider.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
    String userAgent = event.getRequest().getHeader("user-agent").toLowerCase();
    if(userAgent.contains("webkit")) {
        return MyTouchKitUI.class;
    } else {
        return MyFallbackUI.class;
    }
}
项目:jdal    文件:SpringUIProvider.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
    checkUiRequestMapping();
    Class<?extends UI> clazz = this.uiMapping.getUiClass(event.getRequest());

    return clazz != null ? clazz : super.getUIClass(event);
}
项目:osc-core    文件:MainUIProvider.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
    return MainUI.class;
}
项目:awplab-core    文件:VaadinUIProvider.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent uiClassSelectionEvent) {
    return vaadinProvider.getUIClass();
}
项目:jesterj    文件:IngestUiProvider.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
  return uiClass;
}
项目:panifex-platform    文件:ModularUIProvider.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent event) {
    return PageletAwareUI.class;
}
项目:vaadin-osgi    文件:BaseVaadinUIProvider.java   
@Override
public Class<? extends UI> getUIClass(UIClassSelectionEvent uiClassSelectionEvent) {
    return BaseVaadinUI.class;
}