/** * MailArchiver is an application that provides services for storing and managing e-mail messages through a Web Services SOAP interface. * Copyright (C) 2012 Marcio Andre Scholl Levien and Fernando Alberto Reuter Wendt and Jose Ronaldo Nogueira Fonseca Junior * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as * published by the Free Software Foundation, either version 3 of the * License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Affero General Public License for more details. * * You should have received a copy of the GNU Affero General Public License * along with this program. If not, see . */ /******************************************************************************\ * * This product was developed by * * SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), * * a government company established under Brazilian law (5.615/70), * at Department of Development of Porto Alegre. * \******************************************************************************/ package serpro.mailarchiver.view; import java.util.UUID; import javax.annotation.PostConstruct; import org.springframework.beans.factory.annotation.Configurable; import com.eventrouter.SubscriptionRegistry; import com.eventrouter.annotation.AnnotationProcessor; import com.vaadin.data.Container; import com.vaadin.ui.Component; import com.vaadin.ui.ComponentContainer; import com.vaadin.ui.FormFieldFactory; import com.vaadin.ui.Layout; public final class BaseComponent { private BaseComponent() {} // @Configurable public static abstract class VerticalLayout extends com.vaadin.ui.VerticalLayout implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public VerticalLayout() {} //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class HorizontalLayout extends com.vaadin.ui.HorizontalLayout implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public HorizontalLayout() {} //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class GridLayout extends com.vaadin.ui.GridLayout implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public GridLayout() {} public GridLayout(int columns, int rows) { super(columns, rows); } //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class Panel extends com.vaadin.ui.Panel implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public Panel() {} public Panel(String caption) { super(caption); } public Panel(ComponentContainer content) { super(content); } public Panel(String caption, ComponentContainer content) { super(caption, content); } //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class Window extends com.vaadin.ui.Window implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public Window() {} public Window(String caption) { super(caption); } public Window(String caption, ComponentContainer content) { super(caption, content); } //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class Table extends com.vaadin.ui.Table implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public Table() {} public Table(String caption) { super(caption); } public Table(String caption, Container dataSource) { super(caption, dataSource); } //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class Tree extends com.vaadin.ui.Tree implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public Tree() {} public Tree(String caption) { super(caption); } public Tree(String caption, Container dataSource) { super(caption, dataSource); } //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class Form extends com.vaadin.ui.Form implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public Form() {} public Form(Layout formLayout) { super(formLayout); } public Form(Layout formLayout, FormFieldFactory fieldFactory) { super(formLayout, fieldFactory); } //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class MenuBar extends com.vaadin.ui.MenuBar implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public MenuBar() {} //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // // @Configurable public static abstract class CustomComponent extends com.vaadin.ui.CustomComponent implements Initializable { private String displayId; @PostConstruct private void postConstruct() { SubscriptionRegistry subscriptionRegistry = BaseApplication.getInstance().getDispatchContext().getSubscriptionRegistry(); AnnotationProcessor processor = new AnnotationProcessor(subscriptionRegistry); processor.process(this); init(); } //-------------------------------------------------------------------------- public CustomComponent() {} public CustomComponent(Component compositionRoot) { super(compositionRoot); } //-------------------------------------------------------------------------- @Override public String getDisplayId() { if(displayId == null) { displayId = UUID.randomUUID().toString(); } return displayId; } @Override public final String getDebugId() { return getDisplayId(); } } // }