package module.fileManagement.presentationTier.data; import java.util.Collection; import java.util.List; import pt.ist.bennu.core.domain.Presentable; import pt.ist.vaadinframework.data.AbstractBufferedContainer; import pt.ist.vaadinframework.data.reflect.DomainItem; import com.vaadin.data.Property; public abstract class AbstractSearchContainer extends AbstractBufferedContainer> { public AbstractSearchContainer(Class elementType, Hint... hints) { super(elementType, hints); } public AbstractSearchContainer(Property wrapped, Class elementType, Hint... hints) { super(wrapped, elementType, hints); } public AbstractSearchContainer(List elements, Class elementType, Hint... hints) { super(elements, elementType, hints); } public abstract void search(String filterText); protected void addItems(Collection presentables) { for (Presentable presentable : presentables) { addItem(presentable); } } @Override protected DomainItem makeItem(Presentable presentable) { return new DomainItem(presentable); } @Override protected DomainItem makeItem(Class type) { return new DomainItem(type); } }