target
stringlengths
20
113k
src_fm
stringlengths
11
86.3k
src_fm_fc
stringlengths
21
86.4k
src_fm_fc_co
stringlengths
30
86.4k
src_fm_fc_ms
stringlengths
42
86.8k
src_fm_fc_ms_ff
stringlengths
43
86.8k
@Test public void testConvertToModel() { Assertions.assertThrows(UnsupportedOperationException.class, () -> { new JodaLocalDateTimeToStringConverter().convertToModel(null, null, null); }); }
@CheckForNull @Override public LocalDateTime convertToModel(@CheckForNull String value, @CheckForNull Class<? extends LocalDateTime> targetType, @CheckForNull Locale locale) throws ConversionException { throw new UnsupportedOperationException(getClass().getName() + " only supports convertToPresentation"); }
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public LocalDateTime convertToModel(@CheckForNull String value, @CheckForNull Class<? extends LocalDateTime> targetType, @CheckForNull Locale locale) throws ConversionException { throw new UnsupportedOperationExcept...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public LocalDateTime convertToModel(@CheckForNull String value, @CheckForNull Class<? extends LocalDateTime> targetType, @CheckForNull Locale locale) throws ConversionException { throw new UnsupportedOperationExcept...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public LocalDateTime convertToModel(@CheckForNull String value, @CheckForNull Class<? extends LocalDateTime> targetType, @CheckForNull Locale locale) throws ConversionException { throw new UnsupportedOperationExcept...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public LocalDateTime convertToModel(@CheckForNull String value, @CheckForNull Class<? extends LocalDateTime> targetType, @CheckForNull Locale locale) throws ConversionException { throw new UnsupportedOperationExcept...
@Test public void testConvertToPresentation_null_shouldReturnEmptyString() { String presentation = new JodaLocalDateTimeToStringConverter().convertToPresentation(null, String.class, null); assertNotNull(presentation); assertThat(presentation, is("")); }
@CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } String dateString = localDateConverter.convertToPresentation(value.toLocalDate(), t...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
@Test public void testConvertToPresentation_locale_de() { LocalDateTime dateTime = new LocalDateTime(2016, 12, 29, 15, 30, 0, 555); String presentation = new JodaLocalDateTimeToStringConverter().convertToPresentation(dateTime, null, Locale.GERMANY); assertNotNull(presentation); assertThat(presentation, is("29.12.2016\t...
@CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } String dateString = localDateConverter.convertToPresentation(value.toLocalDate(), t...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
@Test public void testConvertToPresentation_locale_() { LocalDateTime dateTime = new LocalDateTime(2016, 12, 29, 15, 30, 0, 555); String presentation = new JodaLocalDateTimeToStringConverter().convertToPresentation(dateTime, null, Locale.US); assertNotNull(presentation); assertThat(presentation, is("12/29/16\t3:30 PM")...
@CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } String dateString = localDateConverter.convertToPresentation(value.toLocalDate(), t...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
JodaLocalDateTimeToStringConverter implements Converter<String, LocalDateTime> { @CheckForNull @Override public String convertToPresentation(@CheckForNull LocalDateTime value, @CheckForNull Class<? extends String> targetType, @CheckForNull Locale locale) throws ConversionException { if (value == null) { return ""; } St...
@Test public void testFindAllOn() { List<MetaMarkerAnnotation> metaMarkerAnnotation = MetaAnnotation.of(MetaMarkerAnnotation.class) .findAllOn(annotatedAnnotation).collect(Collectors.toList()); assertThat(metaMarkerAnnotation, hasSize(1)); assertThat(metaMarkerAnnotation.get(0).value(), is("foo")); }
public Stream<META> findAllOn(Annotation annotation) { return Arrays.stream(annotation.annotationType().getAnnotationsByType(metaAnnotationClass)); }
MetaAnnotation { public Stream<META> findAllOn(Annotation annotation) { return Arrays.stream(annotation.annotationType().getAnnotationsByType(metaAnnotationClass)); } }
MetaAnnotation { public Stream<META> findAllOn(Annotation annotation) { return Arrays.stream(annotation.annotationType().getAnnotationsByType(metaAnnotationClass)); } private MetaAnnotation(Class<META> metaAnnotationClass); }
MetaAnnotation { public Stream<META> findAllOn(Annotation annotation) { return Arrays.stream(annotation.annotationType().getAnnotationsByType(metaAnnotationClass)); } private MetaAnnotation(Class<META> metaAnnotationClass); static MetaAnnotation<META> of(Class<META> metaAnnotationClass); boolean isRepeatable(); boolea...
MetaAnnotation { public Stream<META> findAllOn(Annotation annotation) { return Arrays.stream(annotation.annotationType().getAnnotationsByType(metaAnnotationClass)); } private MetaAnnotation(Class<META> metaAnnotationClass); static MetaAnnotation<META> of(Class<META> metaAnnotationClass); boolean isRepeatable(); boolea...
@Test public void testCreateComponent_PmoClassIsUsedAsId() { TableCreator creator = new TableCreator(); Table table = (Table)creator.createComponent(new TestTablePmo()).getComponent(); assertThat(table.getId(), is("TestTablePmo")); }
@Override public ComponentWrapper createComponent(ContainerPmo<?> containerPmo) { Table table = containerPmo.isHierarchical() ? new TreeTable() : new Table(); table.addStyleName(LinkkiTheme.TABLE); table.setHeightUndefined(); table.setWidth("100%"); table.setSortEnabled(false); return new TableComponentWrapper<>(contai...
TableCreator implements ColumnBasedComponentCreator { @Override public ComponentWrapper createComponent(ContainerPmo<?> containerPmo) { Table table = containerPmo.isHierarchical() ? new TreeTable() : new Table(); table.addStyleName(LinkkiTheme.TABLE); table.setHeightUndefined(); table.setWidth("100%"); table.setSortEna...
TableCreator implements ColumnBasedComponentCreator { @Override public ComponentWrapper createComponent(ContainerPmo<?> containerPmo) { Table table = containerPmo.isHierarchical() ? new TreeTable() : new Table(); table.addStyleName(LinkkiTheme.TABLE); table.setHeightUndefined(); table.setWidth("100%"); table.setSortEna...
TableCreator implements ColumnBasedComponentCreator { @Override public ComponentWrapper createComponent(ContainerPmo<?> containerPmo) { Table table = containerPmo.isHierarchical() ? new TreeTable() : new Table(); table.addStyleName(LinkkiTheme.TABLE); table.setHeightUndefined(); table.setWidth("100%"); table.setSortEna...
TableCreator implements ColumnBasedComponentCreator { @Override public ComponentWrapper createComponent(ContainerPmo<?> containerPmo) { Table table = containerPmo.isHierarchical() ? new TreeTable() : new Table(); table.addStyleName(LinkkiTheme.TABLE); table.setHeightUndefined(); table.setWidth("100%"); table.setSortEna...
@Test public void testCreateSection_TableIsAddedAndBound() { TestTablePmo containerPmo = new TestTablePmo(); BindingContext bindingContext = new BindingContext(); PmoBasedSectionFactory factory = new PmoBasedSectionFactory(); AbstractSection tableSection = factory.createSection(containerPmo, bindingContext); assertThat...
@Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); @Deprecated TableSection createSection...
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); @Deprecated TableSection createSection...
@Test public void testCreateSection_SectionHasAddButtonInHeader() { TestTablePmo containerPmo = new TestTablePmo(); BindingContext bindingContext = new BindingContext(); PmoBasedSectionFactory factory = new PmoBasedSectionFactory(); AbstractSection tableSection = factory.createSection(containerPmo, bindingContext); ass...
@Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); @Deprecated TableSection createSection...
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); @Deprecated TableSection createSection...
@Test public void testCreateSection_NoAnnotation() { NoAnnotationTablePmo containerPmo = new NoAnnotationTablePmo(); BindingContext bindingContext = new BindingContext(); PmoBasedSectionFactory factory = new PmoBasedSectionFactory(); AbstractSection tableSection = factory.createSection(containerPmo, bindingContext); as...
@Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); }
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); @Deprecated TableSection createSection...
PmoBasedTableSectionFactory { @Deprecated public TableSection createSection() { return (TableSection)new PmoBasedSectionFactory().createSection(containerPmo, bindingContext); } @Deprecated PmoBasedTableSectionFactory(ContainerPmo<ROW> containerPmo, BindingContext bindingContext); @Deprecated TableSection createSection...
@Test public void testPageLength() { TestTablePmo tablePmo = new TestTablePmo(15); Table table = new PmoBasedTableFactory(tablePmo, bindingContext).createTable(); ItemSetChangeListener itemSetChangedListener = addItemSetChangeListener(bindingContext); assertThat(table.getPageLength(), is(15)); tablePmo.setPageLength(25...
public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
@Test public void testItems_AfterConstruction() { TestRowPmo rowPmo1 = new TestRowPmo(); TestRowPmo rowPmo2 = new TestRowPmo(); TestTablePmo tablePmo = new TestTablePmo(rowPmo1, rowPmo2); Table table = new PmoBasedTableFactory(tablePmo, bindingContext).createTable(); assertThat(tablePmo.getItems(), contains(rowPmo1, ro...
public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
@Test public void testItems_UponUpdate_AddItems() { TestTablePmo tablePmo = new TestTablePmo(); Table table = new PmoBasedTableFactory(tablePmo, bindingContext).createTable(); ItemSetChangeListener itemSetChangedListener = addItemSetChangeListener(bindingContext); assertThat(table.getItemIds(), is(empty())); TestRowPmo...
public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
@Test public void testItems_UponUpdate_RemoveItems() { TestRowPmo row1 = new TestRowPmo(); TestRowPmo row2 = new TestRowPmo(); TestTablePmo tablePmo = new TestTablePmo(row1, row2); Table table = new PmoBasedTableFactory(tablePmo, bindingContext).createTable(); ItemSetChangeListener itemSetChangedListener = addItemSetCh...
public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
@Test public void testDataSourceSet() { TestTablePmo tablePmo = new TestTablePmo(); Table table = new PmoBasedTableFactory(tablePmo, bindingContext).createTable(); assertThat(getTableContainer(bindingContext), is(table.getContainerDataSource())); }
public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
@Test public void testFooterUpdateAfterConstruction() { TableFooterPmo footerPmo = property -> property; TestTablePmo tablePmo = new TestTablePmo(footerPmo); Table table = new PmoBasedTableFactory(tablePmo, bindingContext).createTable(); ItemSetChangeListener itemSetChangedListener = addItemSetChangeListener(bindingCon...
public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
PmoBasedTableFactory { public Table createTable() { return (Table)CONTAINER_COMPONENT_FACTORY.createContainerComponent(containerPmo, bindingContext); } PmoBasedTableFactory(ContainerPmo<?> containerPmo, BindingContext bindingContext); Table createTable(); }
@Test public void testIsRepeatable() { assertThat(MetaAnnotation.of(MetaMarkerAnnotation.class).isRepeatable(), is(false)); assertThat(MetaAnnotation.of(RepeatableMetaMarkerAnnotation.class).isRepeatable()); }
public boolean isRepeatable() { return repeatable; }
MetaAnnotation { public boolean isRepeatable() { return repeatable; } }
MetaAnnotation { public boolean isRepeatable() { return repeatable; } private MetaAnnotation(Class<META> metaAnnotationClass); }
MetaAnnotation { public boolean isRepeatable() { return repeatable; } private MetaAnnotation(Class<META> metaAnnotationClass); static MetaAnnotation<META> of(Class<META> metaAnnotationClass); boolean isRepeatable(); boolean isPresentOnAnyAnnotationOn(AnnotatedElement annotatedElement); boolean isPresentOn(@CheckForNul...
MetaAnnotation { public boolean isRepeatable() { return repeatable; } private MetaAnnotation(Class<META> metaAnnotationClass); static MetaAnnotation<META> of(Class<META> metaAnnotationClass); boolean isRepeatable(); boolean isPresentOnAnyAnnotationOn(AnnotatedElement annotatedElement); boolean isPresentOn(@CheckForNul...
@Test public void testconvertInternal_TwoDigitYearCurrentCentury() { givenCurrentYear(2019); assertThat((convertInternaler.convertInternal(LocalDate.of(19, 6, 7))), is(LocalDate.of(2019, 6, 7))); }
LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int pivotCentury = pivo...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
@Test public void testNewComponent_CustomAnnotationsAreUsed() { ButtonBindingDefinition adapter = new ButtonBindingDefinition(customAnnotation()); Component component = adapter.newComponent(); assertThat(component, is(instanceOf(Button.class))); Button button = (Button)component; assertThat(button.getIcon(), is(FontAwe...
@Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (buttonAnnotation.shortcutKeyCode() != -1) { button.setClickS...
ButtonBindingDefinition implements BindingDefinition { @Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (butto...
ButtonBindingDefinition implements BindingDefinition { @Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (butto...
ButtonBindingDefinition implements BindingDefinition { @Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (butto...
ButtonBindingDefinition implements BindingDefinition { @Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (butto...
@Test public void testNewComponent_UseShortcutKeyCode() { Button button = new ButtonBindingDefinition(shortcutButton()).newComponent(); assertThat(button, not(nullValue())); Button buttonSpy = spy(button); buttonSpy.setClickShortcut(KeyCode.ENTER); verify(buttonSpy).removeShortcutListener(clickShortcutCaptor.capture())...
@Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (buttonAnnotation.shortcutKeyCode() != -1) { button.setClickS...
ButtonBindingDefinition implements BindingDefinition { @Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (butto...
ButtonBindingDefinition implements BindingDefinition { @Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (butto...
ButtonBindingDefinition implements BindingDefinition { @Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (butto...
ButtonBindingDefinition implements BindingDefinition { @Override public Button newComponent() { Button button = ComponentFactory.newButton(); if (buttonAnnotation.showIcon()) { button.setIcon(buttonAnnotation.icon()); } for (String styleName : buttonAnnotation.styleNames()) { button.addStyleName(styleName); } if (butto...
@Test public void testAddHeaderButton_HeaderButtonIsAddedBeforeCloseButton() { AbstractSection section = new TestSection("caption", true, Optional.empty()); HorizontalLayout sectionHeader = (HorizontalLayout)section.getComponent(0); assertThat(sectionHeader, is(notNullValue())); assertThat(sectionHeader.getComponentCou...
private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); }
AbstractSection extends VerticalLayout { private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); } }
AbstractSection extends VerticalLayout { private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); } AbstractSection(String caption); AbstractSection(String caption, boolean closeable); AbstractSection(String caption, ...
AbstractSection extends VerticalLayout { private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); } AbstractSection(String caption); AbstractSection(String caption, boolean closeable); AbstractSection(String caption, ...
AbstractSection extends VerticalLayout { private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); } AbstractSection(String caption); AbstractSection(String caption, boolean closeable); AbstractSection(String caption, ...
@Test public void testAddHeaderButton_HeaderButtonIsAddedAtEndIfCloseButtonIsMissing() { AbstractSection section = new TestSection("caption", false, Optional.empty()); HorizontalLayout sectionHeader = (HorizontalLayout)section.getComponent(0); assertThat(sectionHeader, is(notNullValue())); assertThat(sectionHeader.getC...
private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); }
AbstractSection extends VerticalLayout { private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); } }
AbstractSection extends VerticalLayout { private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); } AbstractSection(String caption); AbstractSection(String caption, boolean closeable); AbstractSection(String caption, ...
AbstractSection extends VerticalLayout { private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); } AbstractSection(String caption); AbstractSection(String caption, boolean closeable); AbstractSection(String caption, ...
AbstractSection extends VerticalLayout { private static void addHeaderButton(AbstractOrderedLayout header, Button button) { button.addStyleName(LinkkiTheme.BUTTON_TEXT); header.addComponent(button); } AbstractSection(String caption); AbstractSection(String caption, boolean closeable); AbstractSection(String caption, ...
@Test public void testSetSectionId() { BaseSection section = createContext(new SCCPmoWithID()).createSection(); assertThat(section.getId(), is("test-ID")); }
@Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
@Test public void testSetSectionDefaultId() { BaseSection section = createContext(new SCCPmoWithoutID()).createSection(); assertThat(section.getId(), is("SCCPmoWithoutID")); }
@Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
@Test public void testSetComponentId() { BaseSection section = createContext(new SCCPmoWithID()).createSection(); assertThat(section.getComponentCount(), is(2)); @NonNull Panel panel = (Panel)section.getComponent(1); @NonNull GridLayout gridLayout = (GridLayout)panel.getContent(); @NonNull Component textField = gridLay...
@Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
@Test public void testOf_NoTarget() { try { MetaAnnotation.of(NoTargetAnnotation.class); fail("expected a " + IllegalArgumentException.class.getSimpleName()); } catch (IllegalArgumentException e) { assertThat(e.getMessage(), containsString(NoTargetAnnotation.class.getSimpleName())); assertThat(e.getMessage(), containsS...
public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() + " annotation");...
MetaAnnotation { public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() ...
MetaAnnotation { public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() ...
MetaAnnotation { public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() ...
MetaAnnotation { public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() ...
@Test public void testSectionWithDefaultLayout_shouldCreateFormLayout() { BaseSection section = createContext(new SCCPmoWithoutID()).createSection(); assertThat(section, is(instanceOf(FormSection.class))); }
@Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
@Test public void testSectionWithHorizontalLayout_shouldCreateHorizontalSection() { BaseSection section = createContext(new SectionWithHorizontalLayout()).createSection(); assertThat(section, is(instanceOf(HorizontalSection.class))); }
@Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
@Test public void testSectionWithCustomLayout_shouldCreateCustomLayoutSection() { BaseSection section = createContext(new SectionWithCustomLayout()).createSection(); assertThat(section, is(instanceOf(CustomLayoutSection.class))); }
@Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
@Test public void testSectionWithoutAnnotation_usesDefaultValues() { BaseSection section = createContext(new SectionWithoutAnnotation()).createSection(); assertThat(section, is(instanceOf(FormSection.class))); assertThat(section.getId(), is(SectionWithoutAnnotation.class.getSimpleName())); assertThat(section.getCaption...
@Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
SectionCreationContext { @Deprecated public BaseSection createSection() { return (BaseSection)sectionBuilder.createSection(); } @Deprecated SectionCreationContext(Object pmo, BindingContext bindingContext); @Deprecated BaseSection createSection(); }
@Test public void testGetTabs() { Page tabPage1 = mock(Page.class); Page tabPage2 = mock(Page.class); TabSheetArea tabSheetArea = new TestArea(); assertThat(tabSheetArea.getTabs(), is(empty())); tabSheetArea.addTab(tabPage1, "1"); tabSheetArea.addTab(tabPage2, "2"); assertThat(tabSheetArea.getTabs(), contains(tabPage1,...
protected List<Page> getTabs() { return StreamUtil.stream(() -> tabSheet.iterator()) .filter(c -> c instanceof Page) .map(c -> (Page)c) .collect(Collectors.toList()); }
TabSheetArea extends VerticalLayout implements Area { protected List<Page> getTabs() { return StreamUtil.stream(() -> tabSheet.iterator()) .filter(c -> c instanceof Page) .map(c -> (Page)c) .collect(Collectors.toList()); } }
TabSheetArea extends VerticalLayout implements Area { protected List<Page> getTabs() { return StreamUtil.stream(() -> tabSheet.iterator()) .filter(c -> c instanceof Page) .map(c -> (Page)c) .collect(Collectors.toList()); } TabSheetArea(); TabSheetArea(boolean preserveHeader); }
TabSheetArea extends VerticalLayout implements Area { protected List<Page> getTabs() { return StreamUtil.stream(() -> tabSheet.iterator()) .filter(c -> c instanceof Page) .map(c -> (Page)c) .collect(Collectors.toList()); } TabSheetArea(); TabSheetArea(boolean preserveHeader); @PostConstruct final void init(); TabSheet...
TabSheetArea extends VerticalLayout implements Area { protected List<Page> getTabs() { return StreamUtil.stream(() -> tabSheet.iterator()) .filter(c -> c instanceof Page) .map(c -> (Page)c) .collect(Collectors.toList()); } TabSheetArea(); TabSheetArea(boolean preserveHeader); @PostConstruct final void init(); TabSheet...
@Test public void testBackupListShouldBeClearedOnRemoveAllItems() { LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); container.setItems(Collections.singletonList(new TestItem())); assertThat(container.getItemIds(), hasSize(1)); container.setItems(Collections.emptyList()); assertThat(contai...
public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); } @Override Collection<?> ge...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); } @Override Collection<?> ge...
@Test public void testEqualsOfWrapperShouldOnlyCheckReference() { TestItem testItem = new TestItem(42); LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); container.setItems(Collections.singletonList(testItem)); TestItem equalItem = new TestItem(42); assertThat(testItem, is(equalItem)); asse...
public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); } @Override Collection<?> ge...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { public void setItems(Collection<? extends T> items) { requireNonNull(items, "items must not be null"); getAllItemIds().clear(); getAllItemIds().addAll(items); fireItemSetChange(); } @Override Collection<?> ge...
@Test public void testGetChildren_ofItemNotContained() { LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); assertThat(container.getChildren(new TestItem(42)), is(empty())); }
@Override @SuppressWarnings({ "unchecked" }) public Collection<T> getChildren(Object itemId) { return children.computeIfAbsent((T)itemId, this::getChildrenTypesafe); }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override @SuppressWarnings({ "unchecked" }) public Collection<T> getChildren(Object itemId) { return children.computeIfAbsent((T)itemId, this::getChildrenTypesafe); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override @SuppressWarnings({ "unchecked" }) public Collection<T> getChildren(Object itemId) { return children.computeIfAbsent((T)itemId, this::getChildrenTypesafe); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override @SuppressWarnings({ "unchecked" }) public Collection<T> getChildren(Object itemId) { return children.computeIfAbsent((T)itemId, this::getChildrenTypesafe); } @Override Collection<?> getContainerProp...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override @SuppressWarnings({ "unchecked" }) public Collection<T> getChildren(Object itemId) { return children.computeIfAbsent((T)itemId, this::getChildrenTypesafe); } @Override Collection<?> getContainerProp...
@Test public void testGetParent_ofItemNotContained() { LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); assertThat(container.getParent(new TestItem(42)), is(nullValue())); }
@CheckForNull @Override public T getParent(Object itemId) { return parents.get(itemId); }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @CheckForNull @Override public T getParent(Object itemId) { return parents.get(itemId); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @CheckForNull @Override public T getParent(Object itemId) { return parents.get(itemId); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @CheckForNull @Override public T getParent(Object itemId) { return parents.get(itemId); } @Override Collection<?> getContainerPropertyIds(); void setItems(Collection<? extends T> items); @Deprecated @Override...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @CheckForNull @Override public T getParent(Object itemId) { return parents.get(itemId); } @Override Collection<?> getContainerPropertyIds(); void setItems(Collection<? extends T> items); @Deprecated @Override...
@Test public void testSetParent() { LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); HierarchicalTestItem testItem1 = new HierarchicalTestItem(23); HierarchicalTestItem testItem2 = new HierarchicalTestItem(42); assertThat(container.setParent(testItem1, testItem2), is(false)); }
@Override public boolean setParent(Object itemId, Object newParentId) throws UnsupportedOperationException { return false; }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean setParent(Object itemId, Object newParentId) throws UnsupportedOperationException { return false; } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean setParent(Object itemId, Object newParentId) throws UnsupportedOperationException { return false; } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean setParent(Object itemId, Object newParentId) throws UnsupportedOperationException { return false; } @Override Collection<?> getContainerPropertyIds(); void setItems(Collection<? exten...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean setParent(Object itemId, Object newParentId) throws UnsupportedOperationException { return false; } @Override Collection<?> getContainerPropertyIds(); void setItems(Collection<? exten...
@Test public void testOf_WrongTarget() { try { MetaAnnotation.of(MethodAnnotation.class); fail("expected a " + IllegalArgumentException.class.getSimpleName()); } catch (IllegalArgumentException e) { assertThat(e.getMessage(), containsString(MethodAnnotation.class.getSimpleName())); assertThat(e.getMessage(), containsSt...
public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() + " annotation");...
MetaAnnotation { public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() ...
MetaAnnotation { public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() ...
MetaAnnotation { public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() ...
MetaAnnotation { public static <META extends Annotation> MetaAnnotation<META> of(Class<META> metaAnnotationClass) { Target target = metaAnnotationClass.getAnnotation(Target.class); if (target == null) { throw new IllegalArgumentException( metaAnnotationClass.getSimpleName() + " has no @" + Target.class.getSimpleName() ...
@Test public void testAreChildrenAllowed_ofItemNotContained() { LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); assertThat(container.areChildrenAllowed(new TestItem(42)), is(false)); }
@Override public boolean areChildrenAllowed(Object itemId) { return hasChildren(itemId); }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean areChildrenAllowed(Object itemId) { return hasChildren(itemId); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean areChildrenAllowed(Object itemId) { return hasChildren(itemId); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean areChildrenAllowed(Object itemId) { return hasChildren(itemId); } @Override Collection<?> getContainerPropertyIds(); void setItems(Collection<? extends T> items); @Deprecated @Overrid...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean areChildrenAllowed(Object itemId) { return hasChildren(itemId); } @Override Collection<?> getContainerPropertyIds(); void setItems(Collection<? extends T> items); @Deprecated @Overrid...
@Test public void testSetChildrenAllowed() { LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); HierarchicalTestItem testItem = new HierarchicalTestItem(23); assertThat(container.setChildrenAllowed(testItem, true), is(false)); }
@Override public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) throws UnsupportedOperationException { return false; }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) throws UnsupportedOperationException { return false; } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) throws UnsupportedOperationException { return false; } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) throws UnsupportedOperationException { return false; } @Override Collection<?> getContainerPropertyIds(); void setItems(C...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed) throws UnsupportedOperationException { return false; } @Override Collection<?> getContainerPropertyIds(); void setItems(C...
@Test public void testIsRoot_ofItemNotContained() { LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); assertThat(container.isRoot(new TestItem(42)), is(false)); }
@Override public boolean isRoot(Object itemId) { return containsId(itemId); }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean isRoot(Object itemId) { return containsId(itemId); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean isRoot(Object itemId) { return containsId(itemId); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean isRoot(Object itemId) { return containsId(itemId); } @Override Collection<?> getContainerPropertyIds(); void setItems(Collection<? extends T> items); @Deprecated @Override boolean rem...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean isRoot(Object itemId) { return containsId(itemId); } @Override Collection<?> getContainerPropertyIds(); void setItems(Collection<? extends T> items); @Deprecated @Override boolean rem...
@Test public void testHasChildren_ofItemNotContained() { LinkkiInMemoryContainer<TestItem> container = new LinkkiInMemoryContainer<>(); assertThat(container.hasChildren(new TestItem(42)), is(false)); }
@Override public boolean hasChildren(Object itemId) { return getHierarchicalItem(itemId) .map(HierarchicalRowPmo::hasChildRows) .orElse(false); }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean hasChildren(Object itemId) { return getHierarchicalItem(itemId) .map(HierarchicalRowPmo::hasChildRows) .orElse(false); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean hasChildren(Object itemId) { return getHierarchicalItem(itemId) .map(HierarchicalRowPmo::hasChildRows) .orElse(false); } }
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean hasChildren(Object itemId) { return getHierarchicalItem(itemId) .map(HierarchicalRowPmo::hasChildRows) .orElse(false); } @Override Collection<?> getContainerPropertyIds(); void setIte...
LinkkiInMemoryContainer extends AbstractInMemoryContainer<T, Object, Item> implements Container.Hierarchical { @Override public boolean hasChildren(Object itemId) { return getHierarchicalItem(itemId) .map(HierarchicalRowPmo::hasChildRows) .orElse(false); } @Override Collection<?> getContainerPropertyIds(); void setIte...
@Test public void testGetUiLocale() { assertThat(UI.getCurrent(), is(nullValue())); assertThat(UiFramework.getLocale(), is(Locale.GERMAN)); UI ui = MockUi.mockUi(); when(ui.getLocale()).thenReturn(Locale.ITALIAN); assertThat(UiFramework.getLocale(), is(Locale.ITALIAN)); }
@Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; }
Vaadin7 implements UiFrameworkExtension { @Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; } }
Vaadin7 implements UiFrameworkExtension { @Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; } }
Vaadin7 implements UiFrameworkExtension { @Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; } @Override Locale getLocale(); @Override ComponentWrapperFactory getComponentWrapperFactory(); @Over...
Vaadin7 implements UiFrameworkExtension { @Override public Locale getLocale() { UI ui = UI.getCurrent(); if (ui != null) { Locale locale = ui.getLocale(); if (locale != null) { return locale; } } return Locale.GERMAN; } @Override Locale getLocale(); @Override ComponentWrapperFactory getComponentWrapperFactory(); @Over...
@Test public void testGetChildComponents() { Component component1 = new Label("first label"); Component component2 = new Label("second label"); HasComponents componentWithChildren = new VerticalLayout(component1, component2); Component[] arr = { component1, component2 }; assertThat(UiFramework.get().getChildComponents(...
@Override public Stream<?> getChildComponents(Object uiComponent) { if (uiComponent instanceof HasComponents) { return StreamUtil.stream((HasComponents)uiComponent); } return Stream.empty(); }
Vaadin7 implements UiFrameworkExtension { @Override public Stream<?> getChildComponents(Object uiComponent) { if (uiComponent instanceof HasComponents) { return StreamUtil.stream((HasComponents)uiComponent); } return Stream.empty(); } }
Vaadin7 implements UiFrameworkExtension { @Override public Stream<?> getChildComponents(Object uiComponent) { if (uiComponent instanceof HasComponents) { return StreamUtil.stream((HasComponents)uiComponent); } return Stream.empty(); } }
Vaadin7 implements UiFrameworkExtension { @Override public Stream<?> getChildComponents(Object uiComponent) { if (uiComponent instanceof HasComponents) { return StreamUtil.stream((HasComponents)uiComponent); } return Stream.empty(); } @Override Locale getLocale(); @Override ComponentWrapperFactory getComponentWrapperF...
Vaadin7 implements UiFrameworkExtension { @Override public Stream<?> getChildComponents(Object uiComponent) { if (uiComponent instanceof HasComponents) { return StreamUtil.stream((HasComponents)uiComponent); } return Stream.empty(); } @Override Locale getLocale(); @Override ComponentWrapperFactory getComponentWrapperF...
@Test public void testGet() { assertThat(UiFramework.get(), is(instanceOf(TestUiFramework.class))); }
public static UiFrameworkExtension get() { return Services.get(UiFrameworkExtension.class); }
UiFramework { public static UiFrameworkExtension get() { return Services.get(UiFrameworkExtension.class); } }
UiFramework { public static UiFrameworkExtension get() { return Services.get(UiFrameworkExtension.class); } private UiFramework(); }
UiFramework { public static UiFrameworkExtension get() { return Services.get(UiFrameworkExtension.class); } private UiFramework(); static Locale getLocale(); static ComponentWrapperFactory getComponentWrapperFactory(); static UiFrameworkExtension get(); static Stream<?> getChildComponents(Object uiComponent); }
UiFramework { public static UiFrameworkExtension get() { return Services.get(UiFrameworkExtension.class); } private UiFramework(); static Locale getLocale(); static ComponentWrapperFactory getComponentWrapperFactory(); static UiFrameworkExtension get(); static Stream<?> getChildComponents(Object uiComponent); }
@Test public void testGetComponentDefinition() throws Exception { LinkkiComponentDefinition componentDefinition = ComponentAnnotationReader .getComponentDefinition(ClassWithComponentAnnotatedAnnotations.class.getMethod("annotated") .getAnnotation(AnnotationWithComponentAnnotation.class), ClassWithComponentAnnotatedAnno...
public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, annotatedElement, ComponentAn...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
@Test public void testGetComponentDefinition_AnnotatedField() throws Exception { LinkkiComponentDefinition componentDefinition = ComponentAnnotationReader .getComponentDefinition(ClassWithComponentAnnotatedAnnotations.class.getField("component") .getAnnotation(AnnotationWithComponentAnnotation.class), ClassWithComponen...
public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, annotatedElement, ComponentAn...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
@Test public void testGetComponentDefinition_MethodAnnotatedWithoutComponentAnnotation() throws Exception { Method method = ClassWithComponentAnnotatedAnnotations.class.getMethod("annotatedWithoutComponent"); AnnotationWithoutComponentAnnotation annotation = method .getAnnotation(AnnotationWithoutComponentAnnotation.cl...
public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, annotatedElement, ComponentAn...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
@Test public void testGetComponentDefinition_MethodAnnotatedWithInvalidComponentAnnotation() throws Exception { Method method = ClassWithComponentAnnotatedAnnotations.class .getMethod("annotatedWithInvalidComponentAnnotation"); AnnotationWithInvalidCreator annotation = method .getAnnotation(AnnotationWithInvalidCreator...
public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, annotatedElement, ComponentAn...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
ComponentAnnotationReader { public static <A extends Annotation> LinkkiComponentDefinition getComponentDefinition( A annotation, AnnotatedElement annotatedElement) { LinkkiComponent linkkiComponent = LINKKI_COMPONENT_ANNOTATION.findOn(annotation) .orElseThrow(LINKKI_COMPONENT_ANNOTATION .missingAnnotation(annotation, a...
@Test public void testIsLinkkiComponentDefinition() throws Exception { assertTrue(ComponentAnnotationReader .isComponentDefinition(ClassWithComponentAnnotatedAnnotations.class.getMethod("annotated") .getAnnotation(AnnotationWithComponentAnnotation.class))); assertFalse(ComponentAnnotationReader .isComponentDefinition(C...
public static boolean isComponentDefinition(@CheckForNull Annotation annotation) { return LINKKI_COMPONENT_ANNOTATION.isPresentOn(annotation); }
ComponentAnnotationReader { public static boolean isComponentDefinition(@CheckForNull Annotation annotation) { return LINKKI_COMPONENT_ANNOTATION.isPresentOn(annotation); } }
ComponentAnnotationReader { public static boolean isComponentDefinition(@CheckForNull Annotation annotation) { return LINKKI_COMPONENT_ANNOTATION.isPresentOn(annotation); } private ComponentAnnotationReader(); }
ComponentAnnotationReader { public static boolean isComponentDefinition(@CheckForNull Annotation annotation) { return LINKKI_COMPONENT_ANNOTATION.isPresentOn(annotation); } private ComponentAnnotationReader(); static boolean isComponentDefinition(@CheckForNull Annotation annotation); static boolean isComponentDefiniti...
ComponentAnnotationReader { public static boolean isComponentDefinition(@CheckForNull Annotation annotation) { return LINKKI_COMPONENT_ANNOTATION.isPresentOn(annotation); } private ComponentAnnotationReader(); static boolean isComponentDefinition(@CheckForNull Annotation annotation); static boolean isComponentDefiniti...
@Test public void testGetPositionAnnotatedElement() throws Exception { int position = PositionAnnotationReader.getPosition(PosTestPmo.class.getMethod("test")); assertThat(position, is(42)); }
public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() -> getDeprecatedPosition(el...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
@Test public void testGetPositionAnnotatedElement_SamePosTwice() throws Exception { int position = PositionAnnotationReader.getPosition(PosTestPmo.class.getMethod("testSamePos")); assertThat(position, is(42)); }
public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() -> getDeprecatedPosition(el...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
@Test public void testconvertInternal_TwoDigitYearLastCentury() { givenCurrentYear(2019); assertThat((convertInternaler.convertInternal(LocalDate.of(68, 3, 2))), is(LocalDate.of(1968, 3, 2))); }
LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int pivotCentury = pivo...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
@Test public void testGetPositionAnnotatedElement_DiffPos() { Assertions.assertThrows(IllegalArgumentException.class, () -> { PositionAnnotationReader.getPosition(PosTestPmo.class.getMethod("testDiffPos")); }); }
public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() -> getDeprecatedPosition(el...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
@Test public void testGetPositionAnnotatedElement_BindingDefinition() throws Exception { int position = PositionAnnotationReader.getPosition(PosTestPmo.class.getMethod("testDeprecated")); assertThat(position, is(4711)); }
public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() -> getDeprecatedPosition(el...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
PositionAnnotationReader { public static int getPosition(AnnotatedElement element) { return Arrays.stream(element.getAnnotations()) .filter(a -> a.annotationType().isAnnotationPresent(LinkkiPositioned.class)) .map(PositionAnnotationReader::getPosition) .reduce((a, b) -> verifySamePosition(element, a, b)) .orElseGet(() ...
@Test public void testIsLayoutDefinition() { assertThat(LayoutAnnotationReader.isLayoutDefinition(DummyPmo.class.getAnnotation(DummyLayout.class))); assertThat(LayoutAnnotationReader.isLayoutDefinition(DummyLayout.class.getAnnotation(LinkkiLayout.class)), is(false)); }
public static boolean isLayoutDefinition(@CheckForNull Annotation annotation) { return LINKKI_LAYOUT_ANNOTATION.isPresentOn(annotation); }
LayoutAnnotationReader { public static boolean isLayoutDefinition(@CheckForNull Annotation annotation) { return LINKKI_LAYOUT_ANNOTATION.isPresentOn(annotation); } }
LayoutAnnotationReader { public static boolean isLayoutDefinition(@CheckForNull Annotation annotation) { return LINKKI_LAYOUT_ANNOTATION.isPresentOn(annotation); } private LayoutAnnotationReader(); }
LayoutAnnotationReader { public static boolean isLayoutDefinition(@CheckForNull Annotation annotation) { return LINKKI_LAYOUT_ANNOTATION.isPresentOn(annotation); } private LayoutAnnotationReader(); static boolean isLayoutDefinition(@CheckForNull Annotation annotation); static Optional<LinkkiLayoutDefinition> findLayou...
LayoutAnnotationReader { public static boolean isLayoutDefinition(@CheckForNull Annotation annotation) { return LINKKI_LAYOUT_ANNOTATION.isPresentOn(annotation); } private LayoutAnnotationReader(); static boolean isLayoutDefinition(@CheckForNull Annotation annotation); static Optional<LinkkiLayoutDefinition> findLayou...
@Test public void testFindLayoutDefinition() { Optional<LinkkiLayoutDefinition> layoutDefinition = LayoutAnnotationReader.findLayoutDefinition(DummyPmo.class); assertThat(layoutDefinition, is(present())); assertThat(layoutDefinition.get(), is(instanceOf(DummyLayoutDefinition.class))); assertThat(LayoutAnnotationReader....
public static Optional<LinkkiLayoutDefinition> findLayoutDefinition(AnnotatedElement annotatedElement) { return LINKKI_LAYOUT_ANNOTATION .findAnnotatedAnnotationsOn(annotatedElement) .reduce(LINKKI_LAYOUT_ANNOTATION.onlyOneOn(annotatedElement)) .map(annotation -> getLayoutDefinition(annotation, annotatedElement)); }
LayoutAnnotationReader { public static Optional<LinkkiLayoutDefinition> findLayoutDefinition(AnnotatedElement annotatedElement) { return LINKKI_LAYOUT_ANNOTATION .findAnnotatedAnnotationsOn(annotatedElement) .reduce(LINKKI_LAYOUT_ANNOTATION.onlyOneOn(annotatedElement)) .map(annotation -> getLayoutDefinition(annotation,...
LayoutAnnotationReader { public static Optional<LinkkiLayoutDefinition> findLayoutDefinition(AnnotatedElement annotatedElement) { return LINKKI_LAYOUT_ANNOTATION .findAnnotatedAnnotationsOn(annotatedElement) .reduce(LINKKI_LAYOUT_ANNOTATION.onlyOneOn(annotatedElement)) .map(annotation -> getLayoutDefinition(annotation,...
LayoutAnnotationReader { public static Optional<LinkkiLayoutDefinition> findLayoutDefinition(AnnotatedElement annotatedElement) { return LINKKI_LAYOUT_ANNOTATION .findAnnotatedAnnotationsOn(annotatedElement) .reduce(LINKKI_LAYOUT_ANNOTATION.onlyOneOn(annotatedElement)) .map(annotation -> getLayoutDefinition(annotation,...
LayoutAnnotationReader { public static Optional<LinkkiLayoutDefinition> findLayoutDefinition(AnnotatedElement annotatedElement) { return LINKKI_LAYOUT_ANNOTATION .findAnnotatedAnnotationsOn(annotatedElement) .reduce(LINKKI_LAYOUT_ANNOTATION.onlyOneOn(annotatedElement)) .map(annotation -> getLayoutDefinition(annotation,...
@Test public void testCreateUiElements() { TestSectionPmo testSectionPmo = new TestSectionPmo(); BindingContext bindingContext = new BindingContext(); List<TestComponentWrapper> wrappers = UiCreator .createUiElements(testSectionPmo, bindingContext, TestComponentWrapper::new) .collect(Collectors.toList()); assertThat(wr...
public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreator)); }
UiCreator { public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreat...
UiCreator { public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreat...
UiCreator { public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreat...
UiCreator { public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreat...
@DisplayName("Given a dynamic field annotated with both @TestUIField and @TestUIField2,") @ParameterizedTest(name = "when the get~ComponentType method returns {0}") @ValueSource(classes = { TestUIField.class, TestUIField2.class }) public void testCreateUiElements_DynamicField(Class<?> componentType) { class DynamicFiel...
public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreator)); }
UiCreator { public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreat...
UiCreator { public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreat...
UiCreator { public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreat...
UiCreator { public static <C, W extends ComponentWrapper> Stream<W> createUiElements(Object pmo, BindingContext bindingContext, Function<C, W> componentWrapperCreator) { return ComponentAnnotationReader.getComponentDefinitionMethods(pmo.getClass()) .map(m -> createUiElement(m, pmo, bindingContext, componentWrapperCreat...
@Test public void testCreateUiComponent_Method() throws NoSuchMethodException, SecurityException { TestSectionPmo testSectionPmo = new TestSectionPmo(); BindingContext bindingContext = new BindingContext(); Method method = TestSectionPmo.class.getMethod("getValue"); ComponentWrapper componentWrapper = UiCreator.createC...
public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
@Test public void testCreateUiComponent() { TestSectionPmo testSectionPmo = new TestSectionPmo(); BindingContext bindingContext = new BindingContext(); ComponentWrapper componentWrapper = UiCreator.createComponent(testSectionPmo, bindingContext, TestLinkkiComponentDefinition .create(TestUiLayoutComponent::new), Optiona...
public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
@Test @Deprecated public void testCreateUiComponent_Deprecated() { TestSectionPmo testSectionPmo = new TestSectionPmo(); BindingContext bindingContext = new BindingContext(); @SuppressWarnings("deprecation") ComponentWrapper componentWrapper = UiCreator.createComponent(testSectionPmo, bindingContext, c -> Optional.of(T...
public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
@Test @Deprecated @SuppressWarnings("deprecation") public void testCreateUiComponent_NoComponentDefinition() { Assertions.assertThrows(IllegalArgumentException.class, () -> { UiCreator.createComponent(new TestSectionPmo(), new BindingContext(), c -> Optional.empty(), c -> Optional.empty()); }); }
public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
@Test public void testconvertInternal_MinTwoDigitYearLastCentury() { givenCurrentYear(2019); assertThat((convertInternaler.convertInternal(LocalDate.of(39, 1, 1))), is(LocalDate.of(1939, 1, 1))); }
LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int pivotCentury = pivo...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
@Test @Deprecated public void testCreateUiComponent_NoLayoutDefinition() { TestSectionPmo testSectionPmo = new TestSectionPmo(); BindingContext bindingContext = new BindingContext(); @SuppressWarnings("deprecation") ComponentWrapper componentWrapper = UiCreator.createComponent(testSectionPmo, bindingContext, c -> Optio...
public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); }
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
UiCreator { public static ComponentWrapper createComponent(Object pmo, BindingContext bindingContext) { return createComponent(pmo, bindingContext, ComponentAnnotationReader::findComponentDefinition, LayoutAnnotationReader::findLayoutDefinition); } private UiCreator(); static Stream<W> createUiElements(Object pmo, ...
@Test public void testCreateItemSupplierWithoutUnknownType() { Supplier<List<Integer>> supplier = () -> Arrays.asList(1); SimpleItemSupplier<Integer, Integer> itemSupplier2 = new SimpleItemSupplier<>(supplier, UnaryOperator.identity()); assertThat(itemSupplier2.get(), hasItem(1)); }
@Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualModelObjects)) { HashSet<? extends MO> actualModelObject...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
@Test public void testGet_shouldReturnEmptyList_ifUnderlyingListIsEmpty() { assertThat(itemSupplier.get(), hasSize(0)); }
@Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualModelObjects)) { HashSet<? extends MO> actualModelObject...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
@Test public void testGet_shouldReturnNewList_ifUnderlyingListHasCanged() { itemSupplier.get(); modelObjects.add(42); assertThat(itemSupplier.get(), hasSize(1)); SimplePmo pmo = itemSupplier.get().get(0); assertThat(pmo.getModelObject(), is(42)); modelObjects.add(43); assertThat(itemSupplier.get(), hasSize(2)); assertT...
@Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualModelObjects)) { HashSet<? extends MO> actualModelObject...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
@Test public void testGet_shouldReturnNewList_ifUnderlyingListHasCangedOrder() { modelObjects.add(0); modelObjects.add(1); assertThat(itemSupplier.get(), hasSize(2)); assertThat(itemSupplier, hasPmosForModelobjects(0, 1)); SimplePmo pmo2 = itemSupplier.get().get(1); modelObjects.set(0, 99); assertThat(itemSupplier.get(...
@Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualModelObjects)) { HashSet<? extends MO> actualModelObject...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
@Test public void testGet_ShouldRemoveUnusedModelObjectMappings() { modelObjects.add(0); SimplePmo pmo1 = itemSupplier.get().get(0); modelObjects.set(0, 99); itemSupplier.get(); modelObjects.set(0, 0); assertThat(pmo1, is(not(itemSupplier.get().get(0)))); }
@Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualModelObjects)) { HashSet<? extends MO> actualModelObject...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
@Test public void testGet_shouldReturnSameList_ifUnderlyingListHasNotChanged() { modelObjects.add(42); List<SimplePmo> list = itemSupplier.get(); List<SimplePmo> list2 = itemSupplier.get(); assertThat(list == list2); }
@Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualModelObjects)) { HashSet<? extends MO> actualModelObject...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
SimpleItemSupplier implements Supplier<List<PMO>> { @Override public List<PMO> get() { List<? extends MO> actualModelObjects = modelObjectSupplier.get(); requireNonNull(actualModelObjects, "modelObjectSupplier must supply a List of model objects (which may be empty)"); if (hasUnderlyingModelObjectListChanged(actualMode...
@Test public void testCreateContainerComponent() { ColumnBasedComponentCreator containerComponentCreator = spy(new TestColumnBasedComponentCreator()); ColumnBasedComponentFactory columnBasedComponentFactory = new ColumnBasedComponentFactory( containerComponentCreator); BindingContext bindingContext = new BindingContext...
public Object createContainerComponent(ContainerPmo<?> containerPmo, BindingContext bindingContext) { ComponentWrapper tableWrapper = containerComponentCreator .createComponent(requireNonNull(containerPmo, "containerPmo must not be null")); requireNonNull(bindingContext, "bindingContext must not be null"); List<LinkkiA...
ColumnBasedComponentFactory { public Object createContainerComponent(ContainerPmo<?> containerPmo, BindingContext bindingContext) { ComponentWrapper tableWrapper = containerComponentCreator .createComponent(requireNonNull(containerPmo, "containerPmo must not be null")); requireNonNull(bindingContext, "bindingContext mu...
ColumnBasedComponentFactory { public Object createContainerComponent(ContainerPmo<?> containerPmo, BindingContext bindingContext) { ComponentWrapper tableWrapper = containerComponentCreator .createComponent(requireNonNull(containerPmo, "containerPmo must not be null")); requireNonNull(bindingContext, "bindingContext mu...
ColumnBasedComponentFactory { public Object createContainerComponent(ContainerPmo<?> containerPmo, BindingContext bindingContext) { ComponentWrapper tableWrapper = containerComponentCreator .createComponent(requireNonNull(containerPmo, "containerPmo must not be null")); requireNonNull(bindingContext, "bindingContext mu...
ColumnBasedComponentFactory { public Object createContainerComponent(ContainerPmo<?> containerPmo, BindingContext bindingContext) { ComponentWrapper tableWrapper = containerComponentCreator .createComponent(requireNonNull(containerPmo, "containerPmo must not be null")); requireNonNull(bindingContext, "bindingContext mu...
@Test public void testGetSectionId() { assertThat(Sections.getSectionId(new SectionPmoWithoutId()), is(SectionPmoWithoutId.class.getSimpleName())); TestSectionPmo testSectionPmo = new TestSectionPmo(); testSectionPmo.setId("foo"); assertThat(Sections.getSectionId(testSectionPmo), is("foo")); }
public static String getSectionId(Object pmo) { Optional<Method> idMethod = BeanUtils.getMethod(pmo.getClass(), (m) -> m.isAnnotationPresent(SectionID.class)); return idMethod.map(m -> getIdFromSectionIdMethod(pmo, m)).orElse(pmo.getClass().getSimpleName()); }
Sections { public static String getSectionId(Object pmo) { Optional<Method> idMethod = BeanUtils.getMethod(pmo.getClass(), (m) -> m.isAnnotationPresent(SectionID.class)); return idMethod.map(m -> getIdFromSectionIdMethod(pmo, m)).orElse(pmo.getClass().getSimpleName()); } }
Sections { public static String getSectionId(Object pmo) { Optional<Method> idMethod = BeanUtils.getMethod(pmo.getClass(), (m) -> m.isAnnotationPresent(SectionID.class)); return idMethod.map(m -> getIdFromSectionIdMethod(pmo, m)).orElse(pmo.getClass().getSimpleName()); } private Sections(); }
Sections { public static String getSectionId(Object pmo) { Optional<Method> idMethod = BeanUtils.getMethod(pmo.getClass(), (m) -> m.isAnnotationPresent(SectionID.class)); return idMethod.map(m -> getIdFromSectionIdMethod(pmo, m)).orElse(pmo.getClass().getSimpleName()); } private Sections(); static String getSectionId(...
Sections { public static String getSectionId(Object pmo) { Optional<Method> idMethod = BeanUtils.getMethod(pmo.getClass(), (m) -> m.isAnnotationPresent(SectionID.class)); return idMethod.map(m -> getIdFromSectionIdMethod(pmo, m)).orElse(pmo.getClass().getSimpleName()); } private Sections(); static String getSectionId(...
@Test public void testGetEditButtonPmo() { assertThat(Sections.getEditButtonPmo(new SectionPmoWithoutId()), is(absent())); assertThat(Sections.getEditButtonPmo(new DefaultPresentationModelObject()), is(absent())); TestSectionPmo testSectionPmo = new TestSectionPmo(); assertThat(Sections.getEditButtonPmo(testSectionPmo)...
public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); }
Sections { public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); } }
Sections { public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); } private Sections(); }
Sections { public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); } private Sections(); static String getSectionId(Object pmo); static Optional<ButtonPmo> getEditButtonPmo(Object pmo); }
Sections { public static Optional<ButtonPmo> getEditButtonPmo(Object pmo) { return (pmo instanceof PresentationModelObject) ? ((PresentationModelObject)pmo).getEditButtonPmo() : Optional.empty(); } private Sections(); static String getSectionId(Object pmo); static Optional<ButtonPmo> getEditButtonPmo(Object pmo); }
@Test public void testconvertInternal_MaxTwoDigitYearLastCentury() { givenCurrentYear(2019); assertThat((convertInternaler.convertInternal(LocalDate.of(99, 12, 31))), is(LocalDate.of(1999, 12, 31))); }
LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int pivotCentury = pivo...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
@Test public void testGetSectionCaption() { DefaultPmoNlsService defaultPmoNlsService = new DefaultPmoNlsService(); assertThat(defaultPmoNlsService.getSectionCaption(DefaultPmoNlsServiceTest.class, "bar"), is("TheCaption")); }
@Override public String getSectionCaption(Class<?> pmoClass, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getSectionCaptionKey(pmoClass), fallbackValue); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getSectionCaption(Class<?> pmoClass, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getSectionCaptionKey(pmoClass), fallbackValue); } }
DefaultPmoNlsService implements PmoNlsService { @Override public String getSectionCaption(Class<?> pmoClass, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getSectionCaptionKey(pmoClass), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(PmoBundleNameGenerator bundleNameGenerator); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getSectionCaption(Class<?> pmoClass, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getSectionCaptionKey(pmoClass), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(PmoBundleNameGenerator bundleNameGenerator); @Overr...
DefaultPmoNlsService implements PmoNlsService { @Override public String getSectionCaption(Class<?> pmoClass, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getSectionCaptionKey(pmoClass), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(PmoBundleNameGenerator bundleNameGenerator); @Overr...
@Test public void testGetLabel() { DefaultPmoNlsService defaultPmoNlsService = new DefaultPmoNlsService(); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, PROPERTY_TEST, "", "foo"), is("no aspect")); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, PROPERTY_TEST, "bla", ...
@Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
@Test public void testGetLabel_Fallback() { DefaultPmoNlsService defaultPmoNlsService = new DefaultPmoNlsService(); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, PROPERTY_NOT_PRESENT, "", "foo"), is("foo")); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, PROPERTY_NOT...
@Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
@Test public void testGetLabel_Locale() { TestUiFramework.get().setUiLocale(Locale.GERMAN); DefaultPmoNlsService defaultPmoNlsService = new DefaultPmoNlsService(); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, PROPERTY_TEST, "", "foo"), is("Kein Aspekt")); assertThat(defaultPmoNlsService.getL...
@Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
@Test public void testGetLabel_OtherPmoBundleNameGenerator() { DefaultPmoNlsService defaultPmoNlsService = new DefaultPmoNlsService( pmoClass -> "messages." + pmoClass.getName().replace('.', '_')); assertThat(defaultPmoNlsService.getLabel(DefaultPmoNlsServiceTest.class, PROPERTY_TEST, "", "foo"), is("other no aspect"))...
@Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } }
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
DefaultPmoNlsService implements PmoNlsService { @Override public String getLabel(Class<?> pmoClass, String propertyName, String aspectName, String fallbackValue) { return getLabel(pmoClass, PmoNlsService.getPropertyKey(pmoClass, propertyName, aspectName), fallbackValue); } DefaultPmoNlsService(); DefaultPmoNlsService(...
@Test public void testCreateAspect_Default_WithValue() { TooltipAspectDefinition aspectDefinition = new TooltipAspectDefinition(TooltipType.AUTO, "Bar"); Aspect<String> createdAspect = aspectDefinition.createAspect(); assertThat(createdAspect.getName(), is(TooltipAspectDefinition.NAME)); assertThat(createdAspect.isValu...
@Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw new IllegalArgumentException("TooltipType " + type + " is not support...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
@Test public void testCreateAspect_Default_WithoutValue() { TooltipAspectDefinition aspectDefinition = new TooltipAspectDefinition(TooltipType.AUTO, ""); Aspect<String> createdAspect = aspectDefinition.createAspect(); assertThat(createdAspect.getName(), is(TooltipAspectDefinition.NAME)); assertThat(createdAspect.isValu...
@Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw new IllegalArgumentException("TooltipType " + type + " is not support...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
@Test public void testCreateAspect_static() { TooltipAspectDefinition aspectDefinition = new TooltipAspectDefinition(TooltipType.STATIC, "Foo"); Aspect<String> createdAspect = aspectDefinition.createAspect(); assertThat(createdAspect.getName(), is(TooltipAspectDefinition.NAME)); assertThat(createdAspect.getValue(), is(...
@Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw new IllegalArgumentException("TooltipType " + type + " is not support...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
@Test public void testCreateAspect_dynamic() { TooltipAspectDefinition aspectDefinition = new TooltipAspectDefinition(TooltipType.DYNAMIC, "Bar"); Aspect<String> createdAspect = aspectDefinition.createAspect(); assertThat(createdAspect.getName(), is(TooltipAspectDefinition.NAME)); assertThat(createdAspect.isValuePresen...
@Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw new IllegalArgumentException("TooltipType " + type + " is not support...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Aspect<String> createAspect() { switch (type) { case AUTO: return StringUtils.isEmpty(value) ? Aspect.of(NAME) : Aspect.of(NAME, value); case STATIC: return Aspect.of(NAME, value); case DYNAMIC: return Aspect.of(NAME); default: throw n...
@Test public void testCreateComponentValueSetterComponentWrapper() { TooltipAspectDefinition aspectDefinition = new TooltipAspectDefinition( TooltipType.STATIC, "test"); Consumer<String> setter = aspectDefinition.createComponentValueSetter(componentWrapper); assertThat(componentWrapper.getComponent().getTooltipText(), ...
@Override public Consumer<String> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setTooltip; }
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Consumer<String> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setTooltip; } }
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Consumer<String> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setTooltip; } TooltipAspectDefinition(TooltipType type, String value); }
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Consumer<String> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setTooltip; } TooltipAspectDefinition(TooltipType type, String value); @Override Aspect<String> createAspect(); @Override Consume...
TooltipAspectDefinition extends ModelToUiAspectDefinition<String> { @Override public Consumer<String> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setTooltip; } TooltipAspectDefinition(TooltipType type, String value); @Override Aspect<String> createAspect(); @Override Consume...
@Test public void testconvertInternal_MinTwoDigitYearCurrrentCentury() { givenCurrentYear(2019); assertThat((convertInternaler.convertInternal(LocalDate.of(0, 1, 1))), is(LocalDate.of(2000, 1, 1))); }
LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int pivotCentury = pivo...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
@Test public void testCreateAspect_visible() { VisibleAspectDefinition aspectDefinition = new VisibleAspectDefinition(VisibleType.VISIBLE); Aspect<Boolean> createdAspect = aspectDefinition.createAspect(); assertThat(createdAspect.getName(), is(VisibleAspectDefinition.NAME)); assertThat(createdAspect.getValue(), is(true...
@Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown visible type: " + visibleType); } }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown...
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown...
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown...
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown...
@Test public void testCreateAspect_dynamic() { VisibleAspectDefinition aspectDefinition = new VisibleAspectDefinition(VisibleType.DYNAMIC); Aspect<Boolean> createdAspect = aspectDefinition.createAspect(); assertThat(createdAspect.getName(), is(VisibleAspectDefinition.NAME)); assertThat(createdAspect.isValuePresent(), i...
@Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown visible type: " + visibleType); } }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown...
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown...
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown...
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (visibleType) { case DYNAMIC: return Aspect.of(NAME); case INVISIBLE: return Aspect.of(NAME, false); case VISIBLE: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown...
@Test public void testCreateComponentValueSetterComponentWrapper() { VisibleAspectDefinition aspectDefinition = new VisibleAspectDefinition( VisibleType.VISIBLE); Consumer<Boolean> setter = aspectDefinition.createComponentValueSetter(componentWrapper); assertThat(componentWrapper.getComponent().isVisible(), is(false));...
@Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; } }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; } VisibleAspectDefinition(VisibleType visibleType); }
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; } VisibleAspectDefinition(VisibleType visibleType); @Override Aspect<Boolean> createAspect(); @Override Consumer<Bo...
VisibleAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setVisible; } VisibleAspectDefinition(VisibleType visibleType); @Override Aspect<Boolean> createAspect(); @Override Consumer<Bo...
@Test public void testCreateAspect_enabled() { EnabledAspectDefinition aspectDefinition = new EnabledAspectDefinition(EnabledType.ENABLED); Aspect<Boolean> createdAspect = aspectDefinition.createAspect(); assertThat(createdAspect.getName(), is(EnabledAspectDefinition.NAME)); assertThat(createdAspect.getValue(), is(true...
@Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown enabled type: " + enabledType); } }
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown ...
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown ...
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown ...
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown ...
@Test public void testCreateAspect_dynamic() { EnabledAspectDefinition aspectDefinition = new EnabledAspectDefinition(EnabledType.DYNAMIC); Aspect<Boolean> createdAspect = aspectDefinition.createAspect(); assertThat(createdAspect.getName(), is(EnabledAspectDefinition.NAME)); assertThat(createdAspect.isValuePresent(), i...
@Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown enabled type: " + enabledType); } }
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown ...
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown ...
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown ...
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Aspect<Boolean> createAspect() { switch (enabledType) { case DISABLED: return Aspect.of(NAME, false); case DYNAMIC: return Aspect.of(NAME); case ENABLED: return Aspect.of(NAME, true); default: throw new IllegalStateException("Unknown ...
@Test public void testCreateComponentValueSetterComponentWrapper() { EnabledAspectDefinition aspectDefinition = new EnabledAspectDefinition( EnabledType.ENABLED); Consumer<Boolean> setter = aspectDefinition.createComponentValueSetter(componentWrapper); assertThat(componentWrapper.getComponent().isEnabled(), is(false));...
@Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setEnabled; }
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setEnabled; } }
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setEnabled; } EnabledAspectDefinition(EnabledType enabledType); }
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setEnabled; } EnabledAspectDefinition(EnabledType enabledType); @Override Aspect<Boolean> createAspect(); @Override Consumer<Bo...
EnabledAspectDefinition extends ModelToUiAspectDefinition<Boolean> { @Override public Consumer<Boolean> createComponentValueSetter(ComponentWrapper componentWrapper) { return componentWrapper::setEnabled; } EnabledAspectDefinition(EnabledType enabledType); @Override Aspect<Boolean> createAspect(); @Override Consumer<Bo...
@Test public void testBooleanPrimitiveToValues() { assertThat(AvailableValuesProvider.booleanPrimitiveToValues().size(), is(2)); }
public static List<Object> booleanPrimitiveToValues() { return Arrays.asList(true, false); }
AvailableValuesProvider { public static List<Object> booleanPrimitiveToValues() { return Arrays.asList(true, false); } }
AvailableValuesProvider { public static List<Object> booleanPrimitiveToValues() { return Arrays.asList(true, false); } private AvailableValuesProvider(); }
AvailableValuesProvider { public static List<Object> booleanPrimitiveToValues() { return Arrays.asList(true, false); } private AvailableValuesProvider(); static List<T> enumToValues(Class<T> valueClass, boolean inclNull); static List<Boolean> booleanWrapperToValues(); static List<Object> booleanPrimitiveToValues(); }
AvailableValuesProvider { public static List<Object> booleanPrimitiveToValues() { return Arrays.asList(true, false); } private AvailableValuesProvider(); static List<T> enumToValues(Class<T> valueClass, boolean inclNull); static List<Boolean> booleanWrapperToValues(); static List<Object> booleanPrimitiveToValues(); }
@Test public void testBooleanToValues() { assertThat(AvailableValuesProvider.booleanWrapperToValues().size(), is(3)); }
public static List<Boolean> booleanWrapperToValues() { return Arrays.asList(null, Boolean.TRUE, Boolean.FALSE); }
AvailableValuesProvider { public static List<Boolean> booleanWrapperToValues() { return Arrays.asList(null, Boolean.TRUE, Boolean.FALSE); } }
AvailableValuesProvider { public static List<Boolean> booleanWrapperToValues() { return Arrays.asList(null, Boolean.TRUE, Boolean.FALSE); } private AvailableValuesProvider(); }
AvailableValuesProvider { public static List<Boolean> booleanWrapperToValues() { return Arrays.asList(null, Boolean.TRUE, Boolean.FALSE); } private AvailableValuesProvider(); static List<T> enumToValues(Class<T> valueClass, boolean inclNull); static List<Boolean> booleanWrapperToValues(); static List<Object> booleanPr...
AvailableValuesProvider { public static List<Boolean> booleanWrapperToValues() { return Arrays.asList(null, Boolean.TRUE, Boolean.FALSE); } private AvailableValuesProvider(); static List<T> enumToValues(Class<T> valueClass, boolean inclNull); static List<Boolean> booleanWrapperToValues(); static List<Object> booleanPr...
@SuppressWarnings("unchecked") @Test public void testEnumToValues() { assertThat(AvailableValuesProvider.enumToValues(TestEnum.class, false).size(), is(3)); assertThat(AvailableValuesProvider.enumToValues(TestEnum.class, true).size(), is(4)); assertThat(AvailableValuesProvider.enumToValues(TestEnum.class, true).get(0),...
public static <T extends Enum<T>> List<T> enumToValues(Class<T> valueClass, boolean inclNull) { List<T> values = Arrays.asList(valueClass.getEnumConstants()); if (inclNull) { ArrayList<T> result = new ArrayList<>(); result.add(null); result.addAll(values); return Collections.unmodifiableList(result); } else { return va...
AvailableValuesProvider { public static <T extends Enum<T>> List<T> enumToValues(Class<T> valueClass, boolean inclNull) { List<T> values = Arrays.asList(valueClass.getEnumConstants()); if (inclNull) { ArrayList<T> result = new ArrayList<>(); result.add(null); result.addAll(values); return Collections.unmodifiableList(r...
AvailableValuesProvider { public static <T extends Enum<T>> List<T> enumToValues(Class<T> valueClass, boolean inclNull) { List<T> values = Arrays.asList(valueClass.getEnumConstants()); if (inclNull) { ArrayList<T> result = new ArrayList<>(); result.add(null); result.addAll(values); return Collections.unmodifiableList(r...
AvailableValuesProvider { public static <T extends Enum<T>> List<T> enumToValues(Class<T> valueClass, boolean inclNull) { List<T> values = Arrays.asList(valueClass.getEnumConstants()); if (inclNull) { ArrayList<T> result = new ArrayList<>(); result.add(null); result.addAll(values); return Collections.unmodifiableList(r...
AvailableValuesProvider { public static <T extends Enum<T>> List<T> enumToValues(Class<T> valueClass, boolean inclNull) { List<T> values = Arrays.asList(valueClass.getEnumConstants()); if (inclNull) { ArrayList<T> result = new ArrayList<>(); result.add(null); result.addAll(values); return Collections.unmodifiableList(r...
@Test public void testToMessageList() { MessageList emptyMessageList = Stream.<Message> empty().collect(toMessageList()); assertThat(emptyMessageList, is(emptyMessageList())); MessageList singleMessageList = Stream.of(Message.newError("A", "bla")) .collect(MessageListCollector.toMessageList()); assertThat(singleMessage...
public static Collector<Message, ?, MessageList> toMessageList() { return Collector.of(MessageList::new, MessageList::add, addAll()); }
MessageListCollector { public static Collector<Message, ?, MessageList> toMessageList() { return Collector.of(MessageList::new, MessageList::add, addAll()); } }
MessageListCollector { public static Collector<Message, ?, MessageList> toMessageList() { return Collector.of(MessageList::new, MessageList::add, addAll()); } private MessageListCollector(); }
MessageListCollector { public static Collector<Message, ?, MessageList> toMessageList() { return Collector.of(MessageList::new, MessageList::add, addAll()); } private MessageListCollector(); static Collector<Message, ?, MessageList> toMessageList(); }
MessageListCollector { public static Collector<Message, ?, MessageList> toMessageList() { return Collector.of(MessageList::new, MessageList::add, addAll()); } private MessageListCollector(); static Collector<Message, ?, MessageList> toMessageList(); }
@Test public void testconvertInternal_MaxTwoDigitYearCurrrentCentury() { givenCurrentYear(2019); assertThat((convertInternaler.convertInternal(LocalDate.of(38, 12, 31))), is(LocalDate.of(2038, 12, 31))); }
LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int pivotCentury = pivo...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
TwoDigitYearUtil { LocalDate convertInternal(LocalDate value) { if (value.isAfter(LocalDate.of(-1, 1, 1)) && value.isBefore(LocalDate.of(100, 1, 1))) { LocalDate resultDate = value; LocalDate pivotLocalDate = LocalDate.now().withYear(getCurrentYear()).minusYears(80); int pivotYear = pivotLocalDate.getYear() % 100; int ...
@Test(expected = MissingParameterValueException.class) public void testMissingServiceInRequest() throws Exception { XmlObject submitDocument = getRequest(REQUEST_MISSING_SERVICE); validatingDelegate.validateRequiredServiceParameter(submitDocument); }
protected void validateRequiredServiceParameter(XmlObject requestDocument) throws OwsException { XmlCursor xmlCursor = requestDocument.newCursor(); xmlCursor.toFirstChild(); String serviceParameter = "service"; if (moveToAttribute(xmlCursor, serviceParameter)) { validateServiceParameter(xmlCursor.getTextValue()); } }
XmlValidationDelegate implements RequestDelegationHandler { protected void validateRequiredServiceParameter(XmlObject requestDocument) throws OwsException { XmlCursor xmlCursor = requestDocument.newCursor(); xmlCursor.toFirstChild(); String serviceParameter = "service"; if (moveToAttribute(xmlCursor, serviceParameter))...
XmlValidationDelegate implements RequestDelegationHandler { protected void validateRequiredServiceParameter(XmlObject requestDocument) throws OwsException { XmlCursor xmlCursor = requestDocument.newCursor(); xmlCursor.toFirstChild(); String serviceParameter = "service"; if (moveToAttribute(xmlCursor, serviceParameter))...
XmlValidationDelegate implements RequestDelegationHandler { protected void validateRequiredServiceParameter(XmlObject requestDocument) throws OwsException { XmlCursor xmlCursor = requestDocument.newCursor(); xmlCursor.toFirstChild(); String serviceParameter = "service"; if (moveToAttribute(xmlCursor, serviceParameter))...
XmlValidationDelegate implements RequestDelegationHandler { protected void validateRequiredServiceParameter(XmlObject requestDocument) throws OwsException { XmlCursor xmlCursor = requestDocument.newCursor(); xmlCursor.toFirstChild(); String serviceParameter = "service"; if (moveToAttribute(xmlCursor, serviceParameter))...
@Test public void testGenerateForRejectedTask() throws Exception { StatusReportGenerator statusReporter = getStatusReporter(); validTask.setRequestStatus(TaskingRequestStatus.REJECTED); StatusReportType reportUnderTest = statusReporter.generateWithoutTaskingParameters(); assertSetParametersOfNonAcceptedTask(reportUnder...
public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorTask.getRequestStatusAsSt...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
@Test public void testGenerateForPendingTask() throws Exception { StatusReportGenerator statusReporter = getStatusReporter(); StatusReportType reportUnderTest = statusReporter.generateWithoutTaskingParameters(); assertSetParametersOfNonAcceptedTask(reportUnderTest); assertFalse(reportUnderTest.isSetEvent()); }
public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorTask.getRequestStatusAsSt...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
@Test public void testGenerateForAcceptedTask() throws Exception { StatusReportGenerator statusReporter = getStatusReporter(); validTask.setRequestStatus(TaskingRequestStatus.ACCEPTED); StatusReportType reportUnderTest = statusReporter.generateWithoutTaskingParameters(); assertSetParametersOfAcceptedTask(reportUnderTes...
public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorTask.getRequestStatusAsSt...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
StatusReportGenerator { public StatusReportType generateWithoutTaskingParameters() throws StatusInformationExpiredException { if (isStatusInformationExpired()) { throw new StatusInformationExpiredException(); } StatusReportType statusReport = StatusReportType.Factory.newInstance(); statusReport.setRequestStatus(sensorT...
@Test(expected = NoApplicableCodeException.class) public void testSubmit() throws OwsException { SensorPlugin nonBlockInstance = NonBlockingTaskingDecorator.enableNonBlockingTasking(instance); nonBlockInstance.submit(null, null); }
@Override public SensorTask submit(final SubmitTaskingRequest submit, final OwsExceptionReport owsExceptionReport) throws OwsException { try { FutureTask<SensorTask> createSensorTask = new FutureTask<SensorTask>(new Callable<SensorTask>() { public SensorTask call() throws Exception { return sensorPlugin.submit(submit, ...
NonBlockingTaskingDecorator extends SensorPlugin { @Override public SensorTask submit(final SubmitTaskingRequest submit, final OwsExceptionReport owsExceptionReport) throws OwsException { try { FutureTask<SensorTask> createSensorTask = new FutureTask<SensorTask>(new Callable<SensorTask>() { public SensorTask call() thr...
NonBlockingTaskingDecorator extends SensorPlugin { @Override public SensorTask submit(final SubmitTaskingRequest submit, final OwsExceptionReport owsExceptionReport) throws OwsException { try { FutureTask<SensorTask> createSensorTask = new FutureTask<SensorTask>(new Callable<SensorTask>() { public SensorTask call() thr...
NonBlockingTaskingDecorator extends SensorPlugin { @Override public SensorTask submit(final SubmitTaskingRequest submit, final OwsExceptionReport owsExceptionReport) throws OwsException { try { FutureTask<SensorTask> createSensorTask = new FutureTask<SensorTask>(new Callable<SensorTask>() { public SensorTask call() thr...
NonBlockingTaskingDecorator extends SensorPlugin { @Override public SensorTask submit(final SubmitTaskingRequest submit, final OwsExceptionReport owsExceptionReport) throws OwsException { try { FutureTask<SensorTask> createSensorTask = new FutureTask<SensorTask>(new Callable<SensorTask>() { public SensorTask call() thr...