cleanup
authorAndreas Müller <a.mueller@bgbm.org>
Sat, 4 Mar 2023 07:31:27 +0000 (08:31 +0100)
committerAndreas Müller <a.mueller@bgbm.org>
Sat, 4 Mar 2023 08:46:24 +0000 (09:46 +0100)
71 files changed:
.gitattributes
src/main/java/eu/etaxonomy/cdm/debug/PersistentContextAnalyzer.java
src/main/java/eu/etaxonomy/cdm/i18n/Messages.java
src/main/java/eu/etaxonomy/cdm/service/BeanToDTOConverter.java
src/main/java/eu/etaxonomy/cdm/service/CdmBeanItemContainerFactory.java
src/main/java/eu/etaxonomy/cdm/service/CdmFilterablePagingProvider.java
src/main/java/eu/etaxonomy/cdm/service/CdmFilterablePagingProviderFactory.java
src/main/java/eu/etaxonomy/cdm/service/CdmStore.java
src/main/java/eu/etaxonomy/cdm/service/IFilterableStringRepresentationPagingProvider.java [moved from src/main/java/eu/etaxonomy/cdm/service/FilterableStringRepresentationPagingProvider.java with 78% similarity]
src/main/java/eu/etaxonomy/cdm/service/RegistrationWorkflowService.java
src/main/java/eu/etaxonomy/cdm/service/SpecimenTypeDesignationSetServiceImpl.java
src/main/java/eu/etaxonomy/cdm/service/TaxonNameStringFilterablePagingProvider.java
src/main/java/eu/etaxonomy/cdm/service/UserHelperAccess.java
src/main/java/eu/etaxonomy/cdm/vaadin/component/registration/WorkflowSteps.java
src/main/java/eu/etaxonomy/cdm/vaadin/container/CdmSpringConnectionPool.java [deleted file]
src/main/java/eu/etaxonomy/cdm/vaadin/container/IdUuidName.java
src/main/java/eu/etaxonomy/cdm/vaadin/data/validator/InReferenceTypeValidator.java
src/main/java/eu/etaxonomy/cdm/vaadin/data/validator/NomenclaturalReferenceExistsValidator.java
src/main/java/eu/etaxonomy/cdm/vaadin/data/validator/PartialCompletenesValidator.java
src/main/java/eu/etaxonomy/cdm/vaadin/data/validator/PasswordsMatchValidator.java
src/main/java/eu/etaxonomy/cdm/vaadin/data/validator/PasswordsPolicyValidator.java
src/main/java/eu/etaxonomy/cdm/vaadin/data/validator/TimePeriodCompletenesValidator.java
src/main/java/eu/etaxonomy/cdm/vaadin/debug/CdmEntityInfoSorter.java
src/main/java/eu/etaxonomy/cdm/vaadin/event/AbstractEntityEvent.java
src/main/java/eu/etaxonomy/cdm/vaadin/event/AuthenticationAttemptEvent.java
src/main/java/eu/etaxonomy/cdm/vaadin/model/registration/KindOfUnitTerms.java
src/main/java/eu/etaxonomy/cdm/vaadin/model/registration/WorkflowStep.java
src/main/java/eu/etaxonomy/cdm/vaadin/permission/AccessRestrictedViewControlBean.java
src/main/java/eu/etaxonomy/cdm/vaadin/permission/AnnotationBasedAccessControlBean.java
src/main/java/eu/etaxonomy/cdm/vaadin/permission/AnnotationBasedAccessControlConfiguration.java
src/main/java/eu/etaxonomy/cdm/vaadin/permission/CdmEditDeletePermissionTester.java
src/main/java/eu/etaxonomy/cdm/vaadin/permission/PermissionDebugUtils.java
src/main/java/eu/etaxonomy/cdm/vaadin/permission/ReleasableResourcesView.java
src/main/java/eu/etaxonomy/cdm/vaadin/util/formatter/PartialFormatter.java
src/main/java/eu/etaxonomy/cdm/vaadin/util/formatter/TimePeriodFormatter.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/AbstractPageView.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/AccountRegistrationPresenter.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/AnnotationsEditor.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/ErrorView.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginPresenter.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginView.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/LoginViewBean.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/PasswordResetPresenter.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/PasswordResetView.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/PasswordResetViewBean.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/PerEntityAuthorityGrantingEditor.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/RedirectToLoginView.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/common/InstitutionEditorPresenter.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/common/InstitutionPopupEditor.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/NameTypeDesignationPresenter.java
src/main/java/eu/etaxonomy/cdm/vaadin/view/name/SpecimenTypeDesignationSetEditorPresenter.java
src/main/java/eu/etaxonomy/vaadin/README.md
src/main/java/eu/etaxonomy/vaadin/component/CompositeCustomField.java
src/main/java/eu/etaxonomy/vaadin/component/CompositeStyledComponent.java
src/main/java/eu/etaxonomy/vaadin/component/EntityFieldInstantiator.java
src/main/java/eu/etaxonomy/vaadin/component/EntitySupport.java
src/main/java/eu/etaxonomy/vaadin/component/NameRelationField.java
src/main/java/eu/etaxonomy/vaadin/component/NameRelationsListEditor.java
src/main/java/eu/etaxonomy/vaadin/component/NestedFieldGroup.java
src/main/java/eu/etaxonomy/vaadin/component/ReloadableSelect.java
src/main/java/eu/etaxonomy/vaadin/component/SwitchButton.java
src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesComboboxSelect.java
src/main/java/eu/etaxonomy/vaadin/component/ToManyRelatedEntitiesListSelect.java
src/main/java/eu/etaxonomy/vaadin/component/WeaklyRelatedEntityCombobox.java
src/main/java/eu/etaxonomy/vaadin/event/EntityEditorActionEvent.java
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractPresenter.java
src/main/java/eu/etaxonomy/vaadin/mvp/AbstractView.java
src/main/java/eu/etaxonomy/vaadin/mvp/ApplicationView.java
src/main/java/org/springframework/context/event/ApplicationListenerPojoMethodAdapter.java
src/main/java/org/springframework/context/event/DefaultPojoEventListenerManager.java
src/main/java/org/springframework/context/event/PojoEventListenerManager.java

index 338d1c231264b038f3ff6f7ede0fc90202fc234c..adfaa69ff633f84bb5293a517178ec3992ffe482 100644 (file)
@@ -12,7 +12,6 @@ src/main/java/eu/etaxonomy/cdm/vaadin/component/HorizontalToolbar.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/component/NewTaxonBaseComposite.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/component/StatusComposite.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/container/CdmSQLContainer.java -text
-src/main/java/eu/etaxonomy/cdm/vaadin/container/CdmSpringConnectionPool.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/container/IdAndUuid.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/container/LeafNodeTaxonContainer.java -text
 src/main/java/eu/etaxonomy/cdm/vaadin/jscomponent/D3ConceptRelationshipTree.java -text
index 0e9b641332d791b40d600aa1aa45caf27564ae5b..f33d4963bb1299f167b13d6d32c50e94383b04b2 100644 (file)
@@ -50,10 +50,6 @@ public class PersistentContextAnalyzer extends CdmEntityCache {
 
     }
 
-
-    /**
-     * @param printStream
-     */
     @Override
     protected void printLegend(PrintStream printStream) {
         printStream.println("PersistentContextAnalyzer legend: ");
@@ -80,16 +76,9 @@ public class PersistentContextAnalyzer extends CdmEntityCache {
         return flags;
     }
 
-    /**
-     * @return the showHashCodes
-     */
     public boolean isShowHashCodes() {
         return showHashCodes;
     }
-
-    /**
-     * @param showHashCodes the showHashCodes to set
-     */
     public void setShowHashCodes(boolean showHashCodes) {
         boolean runUpdate = this.showHashCodes != showHashCodes;
         this.showHashCodes = showHashCodes;
@@ -97,5 +86,4 @@ public class PersistentContextAnalyzer extends CdmEntityCache {
             update();
         }
     }
-
-}
+}
\ No newline at end of file
index a0caf4491b634f79029299a74eeaa4aab4925867..832245847a49dd2d957e79e47817d98ba883b5f6 100644 (file)
@@ -16,7 +16,6 @@ import com.vaadin.server.VaadinSession;
 /**
  * Internationalization class.
  * @author freimeier
- *
  */
 public class Messages implements Serializable {
 
index c26702fc15b3c9d8df1841145595f871681466ae..02ae2e12ce08f54d83d6bf6f036bea83edaa7ec4 100644 (file)
@@ -24,9 +24,6 @@ public interface BeanToDTOConverter<CDM extends CdmBase, DTO extends Object> {
 
     public DTO toDTO(CDM bean);
 
-    /**
-     * @return
-     */
     public Class<DTO> getDTOType();
 
 }
index e685594e644ee4bd2f51ce66c254927aec062f76..03f07dc6e6f22c400c424f81dcfa95aa3199d951 100644 (file)
@@ -39,7 +39,6 @@ import eu.etaxonomy.cdm.persistence.query.OrderHint;
  *
  * @author a.kohlbecker
  * @since Apr 6, 2017
- *
  */
 @Service
 public class CdmBeanItemContainerFactory {
@@ -79,12 +78,11 @@ public class CdmBeanItemContainerFactory {
         return termItemContainer;
     }
 
-
     @Transactional(readOnly=true)
     public BeanItemContainer<DefinedTermBase> buildVocabularyTermsItemContainer(UUID vocabularyUuid) {
 
         clearSession();
-        TermVocabulary vocab = repo.getVocabularyService().find(vocabularyUuid);
+        TermVocabulary<?> vocab = repo.getVocabularyService().find(vocabularyUuid);
         Pager<DefinedTermBase> terms = repo.getVocabularyService().getTerms(vocab, null, null, orderHints, INIT_STRATEGY);
         BeanItemContainer<DefinedTermBase> termItemContainer = new BeanItemContainer<>(DefinedTermBase.class);
         termItemContainer.addAll(terms.getRecords());
@@ -95,7 +93,7 @@ public class CdmBeanItemContainerFactory {
     public <DTO extends Object> BeanItemContainer<DTO> buildVocabularyTermsItemContainer(UUID vocabularyUuid, BeanToDTOConverter<TermBase, DTO> converter) {
 
         clearSession();
-        TermVocabulary vocab = repo.getVocabularyService().find(vocabularyUuid);
+        TermVocabulary<?> vocab = repo.getVocabularyService().find(vocabularyUuid);
         Pager<DefinedTermBase> terms = repo.getVocabularyService().getTerms(vocab, null, null, orderHints, INIT_STRATEGY);
         BeanItemContainer<DTO> termItemContainer = new BeanItemContainer<>(converter.getDTOType());
         termItemContainer.addAll(terms.getRecords().stream().map(b -> converter.toDTO(b)).collect(Collectors.toList()));
@@ -123,7 +121,7 @@ public class CdmBeanItemContainerFactory {
         BeanItemContainer<TypeDesignationStatusBase> termItemContainer = new BeanItemContainer<>(DefinedTermBase.class);
         termItemContainer.addAll(terms.stream()
                 .filter(t -> t instanceof TypeDesignationStatusBase)
-                .map(t -> (TypeDesignationStatusBase)t)
+                .map(t -> (TypeDesignationStatusBase<?>)t)
                 .filter(tsb ->
                     !withHasDesignationSource.isPresent()
                     || withHasDesignationSource.get().equals(false)
@@ -149,7 +147,6 @@ public class CdmBeanItemContainerFactory {
         return container;
     }
 
-
     @Transactional(readOnly=true)
     public <T extends CdmBase> BeanItemContainer<T> buildBeanItemContainer(Class<T> type, List<OrderHint> orderHints) {
 
@@ -179,5 +176,4 @@ public class CdmBeanItemContainerFactory {
     public void clearSession() {
         repo.clearSession();
     }
-
-}
+}
\ No newline at end of file
index 22f2b84cf8c68a61378e788ee01fdfe093be42e4..2b13502cae6a3d9663a3328eb054c3d5243fbfc0 100644 (file)
@@ -30,7 +30,7 @@ import eu.etaxonomy.cdm.persistence.query.OrderHint;
  * @author a.kohlbecker
  * @since Jun 7, 2017
  */
-public class CdmFilterablePagingProvider<T extends IdentifiableEntity, V extends T> implements FilterablePagingProvider<V>, FilterableCountProvider {
+public class CdmFilterablePagingProvider<T extends IdentifiableEntity<?>, V extends T> implements FilterablePagingProvider<V>, FilterableCountProvider {
 
     private static final Logger logger = LogManager.getLogger();
 
@@ -38,7 +38,6 @@ public class CdmFilterablePagingProvider<T extends IdentifiableEntity, V extends
 
     public static final String QUERY_STRING_PLACEHOLDER = "{query-string}";
 
-
     private int pageSize = 20;
 
     private IIdentifiableEntityService<T> service;
@@ -49,44 +48,28 @@ public class CdmFilterablePagingProvider<T extends IdentifiableEntity, V extends
 
     private List<OrderHint> orderHints = OrderHint.ORDER_BY_TITLE_CACHE.asList();
 
-    List<String> initStrategy = DEFAULT_INIT_STRATEGY;
+    private List<String> initStrategy = DEFAULT_INIT_STRATEGY;
 
     private List<Criterion> criteria = new ArrayList<>();
 
     private List<Restriction<?>> restrictions = new ArrayList<>();
 
-
-    /**
-     * @return the matchMode
-     */
     protected MatchMode getMatchMode() {
         return matchMode;
     }
-
-    /**
-     * @param matchMode the matchMode to set
-     */
     protected void setMatchMode(MatchMode matchMode) {
         this.matchMode = matchMode;
     }
 
-    /**
-     * @return the orderHints
-     */
     protected List<OrderHint> getOrderHints() {
         return orderHints;
     }
-
-    /**
-     * @param orderHints the orderHints to set
-     */
     protected void setOrderHints(List<OrderHint> orderHints) {
         this.orderHints = orderHints;
     }
 
     /**
      * With defaults for matchMode = MatchMode.ANYWHERE and orderHints = OrderHint.ORDER_BY_TITLE_CACHE
-     *
      */
     public CdmFilterablePagingProvider(IIdentifiableEntityService<T> service) {
         this(service, null);
@@ -94,7 +77,6 @@ public class CdmFilterablePagingProvider<T extends IdentifiableEntity, V extends
 
     /**
      * With defaults for matchMode = MatchMode.ANYWHERE and orderHints = OrderHint.ORDER_BY_TITLE_CACHE
-     *
      */
     public CdmFilterablePagingProvider(IIdentifiableEntityService<T> service, Class<V> type) {
         super();
@@ -225,7 +207,7 @@ public class CdmFilterablePagingProvider<T extends IdentifiableEntity, V extends
                     values.add(v);
                 }
             }
-            prepared.add(new Restriction(r.getPropertyName(), r.getOperator(), r.getMatchMode(), values.toArray(new Object[values.size()])));
+            prepared.add(new Restriction<>(r.getPropertyName(), r.getOperator(), r.getMatchMode(), values.toArray(new Object[values.size()])));
         }
         return prepared;
     }
index 74de161c01a1c6e49763324828028358ca234a52..2b2ebd7886c86af696b958878c3ff4be41dd480c 100644 (file)
@@ -108,7 +108,7 @@ public class CdmFilterablePagingProviderFactory {
     }
 
     public CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase> teamOrPersonPagingProvider() {
-        return  new CdmFilterablePagingProvider<AgentBase, TeamOrPersonBase>(repo.getAgentService(), TeamOrPersonBase.class, MatchMode.BEGINNING, OrderHint.ORDER_BY_TITLE_CACHE.asList());
+        return new CdmFilterablePagingProvider<>(repo.getAgentService(), TeamOrPersonBase.class, MatchMode.BEGINNING, OrderHint.ORDER_BY_TITLE_CACHE.asList());
     }
 
     public CdmFilterablePagingProvider<AgentBase, Person> personPagingProvider() {
index 06e2e2cc896ddbdd07dece5758e2afcfda37fbb4..aa979a1d12c8b12ff8c6621203487c3bf4029f4e 100644 (file)
@@ -41,7 +41,6 @@ import eu.etaxonomy.vaadin.mvp.AbstractView;
  * @since Jun 26, 2017
  *
  * TODO better naming of this class, ServiceWrapper, ServiceOperator, ...?
- *
  */
 @SpringComponent
 @ViewScope
@@ -99,10 +98,6 @@ public class CdmStore {
 
     }
 
-
-    /**
-     * @param txStatus
-     */
     public void transactionRollbackIfNotCompleted(TransactionStatus txStatus) {
         if(!txStatus.isCompleted()){
             repo.getTransactionManager().rollback(txStatus);
@@ -110,11 +105,9 @@ public class CdmStore {
     }
 
     /**
-     *
-     * @param bean
      * @return a EntityChangeEvent in case the deletion was successful otherwise <code>null</code>.
      */
-    public final <T extends CdmBase> EntityChangeEvent deleteBean(T bean, AbstractView view) {
+    public final <T extends CdmBase> EntityChangeEvent<T> deleteBean(T bean, AbstractView<?> view) {
 
         IService<T> typeSpecificService = serviceFor(bean);
 
@@ -122,9 +115,9 @@ public class CdmStore {
             logger.trace(this._toString() + ".deleteBean - deleting" + bean.toString());
             DeleteResult result = typeSpecificService.delete(bean);
             if (result.isOk()) {
-                return new EntityChangeEvent(bean, Type.REMOVED, view);
+                return new EntityChangeEvent<>(bean, Type.REMOVED, view);
             } else {
-                handleDeleteresultInError(result);
+                handleDeleteResultInError(result);
             }
         } finally {
             repo.clearSession(); // #7559
@@ -133,10 +126,7 @@ public class CdmStore {
         return null;
     }
 
-    /**
-     * @param result
-     */
-    public static void handleDeleteresultInError(DeleteResult result) {
+    public static void handleDeleteResultInError(DeleteResult result) {
         String notificationTitle;
         StringBuffer messageBody = new StringBuffer();
         if (result.isAbort()) {
@@ -154,7 +144,7 @@ public class CdmStore {
             result.getRelatedObjects().forEach(e -> {
                 messageBody.append("<li>");
                 if (IdentifiableEntity.class.isAssignableFrom(e.getClass())) {
-                    messageBody.append(((IdentifiableEntity) e).getTitleCache());
+                    messageBody.append(((IdentifiableEntity<?>) e).getTitleCache());
                 } else {
                     messageBody.append(e.toString());
                 }
@@ -192,5 +182,4 @@ public class CdmStore {
              throw new RuntimeException("Implementation to find service for " + cdmType + " still missing.");
          }
     }
-
-}
+}
\ No newline at end of file
similarity index 78%
rename from src/main/java/eu/etaxonomy/cdm/service/FilterableStringRepresentationPagingProvider.java
rename to src/main/java/eu/etaxonomy/cdm/service/IFilterableStringRepresentationPagingProvider.java
index 9878f62db7f98634859f03fe6f760d30027db94d..1ea65a710d9a9622a0471a2a278e5020a34d3839 100644 (file)
@@ -13,16 +13,10 @@ import org.vaadin.viritin.fields.LazyComboBox.FilterablePagingProvider;
 /**
  * @author a.kohlbecker
  * @since Sep 24, 2018
- *
  */
-public interface FilterableStringRepresentationPagingProvider<IDTYPE> extends FilterablePagingProvider<String> {
+public interface IFilterableStringRepresentationPagingProvider<IDTYPE> extends FilterablePagingProvider<String> {
 
     public IDTYPE idFor(String stringRepresentation);
 
-    /**
-     *
-     */
     public void clearIdCache();
-
-
-}
+}
\ No newline at end of file
index af16df5abc4e73f7e713e337a9781d6c1d9b2d61..e93c443088f7913f643319892e894cfbad612dbe 100644 (file)
@@ -48,7 +48,6 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
         return repo;
     }
 
-
     @Override
     public Registration createRegistration(TaxonName taxonName, List<Registration> preparedBlockingRegistrations) {
 
@@ -69,7 +68,6 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
         return reg;
     }
 
-
     @Override
     public boolean createRegistrationforExistingName(RegistrationWorkingSet workingset, TaxonName typifiedName) throws TypeDesignationSetException {
 
@@ -144,10 +142,6 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
         return null;
     }
 
-    /**
-     * @param registration
-     * @return
-     */
     @Override
     public Registration reloadRegistration(Registration registration) {
         if(registration.isPersited()){
@@ -176,10 +170,6 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
         return !getRepo().getRegistrationService().checkRegistrationExistsFor(name) && checkWokingsetContainsProtologe(workingset, name);
     }
 
-    /**
-     * @param name
-     * @return
-     */
     @Override
     public boolean checkWokingsetContainsProtologe(RegistrationWorkingSet workingset, TaxonName name) {
         Reference nomRef = name.getNomenclaturalReference();
@@ -193,5 +183,4 @@ public class RegistrationWorkflowService implements IRegistrationWorkflowService
                 );
         // @formatter:on
     }
-
-}
+}
\ No newline at end of file
index c0336e747d6242059f6ad7532bce7a94e0344539..7d57fcde267c246e3d11403db494ae2653aa4ec3 100644 (file)
@@ -77,11 +77,11 @@ public class SpecimenTypeDesignationSetServiceImpl
     );
 
     @Autowired
-    IRegistrationWorkingSetService registrationWorkingSetService;
+    private IRegistrationWorkingSetService registrationWorkingSetService;
 
     @Qualifier("cdmRepository")
     @Autowired
-    CdmRepository repo;
+    private CdmRepository repo;
 
     @Override
     public SpecimenTypeDesignationSetDTO<Registration> create(UUID registrationUuid, UUID typifiedNameUuid) {
@@ -109,6 +109,7 @@ public class SpecimenTypeDesignationSetServiceImpl
     protected SpecimenTypeDesignationSetDTO<Registration> specimenTypeDesignationSetDTO(
             RegistrationDTO regDTO, VersionableEntity baseEntity) {
 
+        @SuppressWarnings("rawtypes")
         Set<TypeDesignationBase> typeDesignations = regDTO.getTypeDesignationsInWorkingSet(baseEntity);
         List<SpecimenTypeDesignation> specimenTypeDesignations = new ArrayList<>(typeDesignations.size());
         typeDesignations.forEach(td -> specimenTypeDesignations.add((SpecimenTypeDesignation)td));
@@ -137,6 +138,7 @@ public class SpecimenTypeDesignationSetServiceImpl
             fieldUnit = repo.getOccurrenceService().save(fieldUnit);
 
             VersionableEntity baseEntity = bean.getBaseEntity();
+            @SuppressWarnings("rawtypes")
             Set<TypeDesignationBase> typeDesignations = regDTO.getTypeDesignationsInWorkingSet(baseEntity);
             for(TypeDesignationBase<?> td : typeDesignations){
                 DerivationEvent de = DerivationEvent.NewInstance(DerivationEventType.GATHERING_IN_SITU());
@@ -193,11 +195,6 @@ public class SpecimenTypeDesignationSetServiceImpl
 
     }
 
-    /**
-     * @param dto
-     * @param specimenDeleteConfigurer
-     * @param std
-     */
     protected void deleteSpecimenTypeDesignation(SpecimenTypeDesignationSetDTO<? extends VersionableEntity> dto, SpecimenTypeDesignation std) {
 
 //        if(dto.getOwner() instanceof Registration){
@@ -220,11 +217,6 @@ public class SpecimenTypeDesignationSetServiceImpl
 //      }
     }
 
-    /**
-     * @param session
-     * @param fieldUnit
-     * @param specimenTypeDesignation
-     */
     protected void assureFieldUnit(FieldUnit fieldUnit,
             SpecimenTypeDesignation specimenTypeDesignation) {
         try {
@@ -239,18 +231,14 @@ public class SpecimenTypeDesignationSetServiceImpl
         }
     }
 
-    /**
-     * @param std
-     * @return
-     * @throws Exception
-     */
     private SpecimenOrObservationBase<?> findEarliestOriginal(DerivedUnit du) throws Exception {
 
-        SpecimenOrObservationBase original = du;
+        SpecimenOrObservationBase<?> original = du;
 
         while(du != null && du.getDerivedFrom() != null && !du.getDerivedFrom().getOriginals().isEmpty()) {
+            @SuppressWarnings("rawtypes")
             Iterator<SpecimenOrObservationBase> it = du.getDerivedFrom().getOriginals().iterator();
-            SpecimenOrObservationBase nextOriginal = it.next();
+            SpecimenOrObservationBase<?> nextOriginal = it.next();
             if(nextOriginal == null){
                 break;
             }
@@ -281,9 +269,6 @@ public class SpecimenTypeDesignationSetServiceImpl
         return addCandidates;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     @Transactional(readOnly=false)
     public void delete(SpecimenTypeDesignationSetDTO bean, boolean deleteFieldUnit) {
@@ -291,11 +276,11 @@ public class SpecimenTypeDesignationSetServiceImpl
         @SuppressWarnings("unchecked")
         List<SpecimenTypeDesignationDTO> specimenTypeDesignationDTOs = bean.getSpecimenTypeDesignationDTOs();
         for(SpecimenTypeDesignationDTO stdDTO : specimenTypeDesignationDTOs){
-          SpecimenTypeDesignation std =  stdDTO.asSpecimenTypeDesignation();
-          deleteSpecimenTypeDesignation(bean, std);
-          if(bean.getOwner() instanceof Registration){
-              ((Registration)bean.getOwner()).getTypeDesignations().remove(std);
-          }
+            SpecimenTypeDesignation std =  stdDTO.asSpecimenTypeDesignation();
+            deleteSpecimenTypeDesignation(bean, std);
+            if(bean.getOwner() instanceof Registration){
+                ((Registration)bean.getOwner()).getTypeDesignations().remove(std);
+            }
         }
 
         if(deleteFieldUnit){
@@ -305,5 +290,4 @@ public class SpecimenTypeDesignationSetServiceImpl
             String msg = result.toString();
         }
     }
-
-}
+}
\ No newline at end of file
index 9ad08931915ffb8a8d1990de0d323fd6c70af9d3..fe43371de363ca6385e5238566cb8fa3438b89f9 100644 (file)
@@ -40,9 +40,8 @@ import eu.etaxonomy.cdm.persistence.query.OrderHint;
  *
  * @author a.kohlbecker
  * @since Jun 7, 2017
- *
  */
-public class TaxonNameStringFilterablePagingProvider implements FilterableStringRepresentationPagingProvider<UUID>, FilterableCountProvider {
+public class TaxonNameStringFilterablePagingProvider implements IFilterableStringRepresentationPagingProvider<UUID>, FilterableCountProvider {
 
     private static final Logger logger = LogManager.getLogger();
 
@@ -56,7 +55,7 @@ public class TaxonNameStringFilterablePagingProvider implements FilterableString
 
     private List<OrderHint> orderHints = OrderHint.ORDER_BY_TITLE_CACHE.asList();
 
-    List<String> initStrategy = DEFAULT_INIT_STRATEGY;
+    private List<String> initStrategy = DEFAULT_INIT_STRATEGY;
 
     private TaxonNamePartsFilter namePartsFilter = new TaxonNamePartsFilter();
 
@@ -93,9 +92,6 @@ public class TaxonNameStringFilterablePagingProvider implements FilterableString
         registerNullSave(infraSpecificEpithetField, e -> namePartsFilter.setGenusOrUninomial(infraSpecificEpithetField.getValue()));
     }
 
-    /**
-     *
-     */
     public void unlistenAllFields() {
         for(AbstractField<String> f : registeredToFields.keySet()){
             f.removeValueChangeListener(registeredToFields.get(f));
@@ -121,9 +117,6 @@ public class TaxonNameStringFilterablePagingProvider implements FilterableString
         }
     }
 
-    /**
-     * @param genusOrUninomialField
-     */
     protected void registerNullSave(AbstractField<String> field, ValueChangeListener listener) {
         if(field != null){
             registeredToFields.put(field, listener);
@@ -131,30 +124,16 @@ public class TaxonNameStringFilterablePagingProvider implements FilterableString
         }
     }
 
-    /**
-     * @return the matchMode
-     */
     protected MatchMode getMatchMode() {
         return matchMode;
     }
-
-    /**
-     * @param matchMode the matchMode to set
-     */
     protected void setMatchMode(MatchMode matchMode) {
         this.matchMode = matchMode;
     }
 
-    /**
-     * @return the orderHints
-     */
     protected List<OrderHint> getOrderHints() {
         return orderHints;
     }
-
-    /**
-     * @param orderHints the orderHints to set
-     */
     protected void setOrderHints(List<OrderHint> orderHints) {
         this.orderHints = orderHints;
     }
@@ -162,10 +141,6 @@ public class TaxonNameStringFilterablePagingProvider implements FilterableString
     public TaxonNamePartsFilter getFilter(){
         return namePartsFilter;
     }
-
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public List<String> findEntities(int firstRow, String filter) {
 
@@ -222,15 +197,10 @@ public class TaxonNameStringFilterablePagingProvider implements FilterableString
         return lastPagedEntityUUIDs;
     }
 
-
     public class UnknownFieldException extends Exception {
-
         private static final long serialVersionUID = 1L;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public UUID idFor(String stringRepresentation) {
         if(stringRepresentation == null){
@@ -245,22 +215,15 @@ public class TaxonNameStringFilterablePagingProvider implements FilterableString
         return lastPagedEntityUUIDs.get(stringRepresentation);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void clearIdCache() {
         lastPagedEntityUUIDs = null;
     }
 
-    /**
-     * @param asList
-     * @return
-     */
     public void excludeNames(TaxonName ... excludedTaxonNames) {
         namePartsFilter.getExludedNamesUuids();
         for(TaxonName n : excludedTaxonNames){
             namePartsFilter.getExludedNamesUuids().add(n.getUuid());
         }
     }
-}
+}
\ No newline at end of file
index ef65fdf2fa739da4a7c193efc873f240c6a3bc1b..0517699737c2a31830a3001e5c39d7a4db4efbd4 100644 (file)
@@ -19,7 +19,6 @@ import eu.etaxonomy.cdm.api.util.UserHelper;
  *
  * @author a.kohlbecker
  * @since May 23, 2017
- *
  */
 @SpringComponent
 public class UserHelperAccess {
@@ -33,13 +32,8 @@ public class UserHelperAccess {
 
     /**
      * Static accessor method to obtain the UserHelper bean
-     *
-     * @return
      */
     public static UserHelper userHelper() {
        return userHelper;
     }
-
-
-
-}
+}
\ No newline at end of file
index 2362314c2da6766547d20240d354d2eb9d21d925..95f99bfdc0edd38e7c55c09d160f2c40f52bf9e2 100644 (file)
@@ -15,7 +15,6 @@ import eu.etaxonomy.cdm.vaadin.design.registration.WorkflowStepsDesign;
 /**
  * @author a.kohlbecker
  * @since Mar 10, 2017
- *
  */
 @Deprecated // FIXME delete also all css styles if any
 public class WorkflowSteps extends WorkflowStepsDesign {
diff --git a/src/main/java/eu/etaxonomy/cdm/vaadin/container/CdmSpringConnectionPool.java b/src/main/java/eu/etaxonomy/cdm/vaadin/container/CdmSpringConnectionPool.java
deleted file mode 100644 (file)
index 109d8a9..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/**
-* Copyright (C) 2015 EDIT
-* European Distributed Institute of Taxonomy
-* http://www.e-taxonomy.eu
-*
-* The contents of this file are subject to the Mozilla Public License Version 1.1
-* See LICENSE.TXT at the top of this package for the full license terms.
-*/
-package eu.etaxonomy.cdm.vaadin.container;
-
-import java.sql.Connection;
-import java.sql.SQLException;
-
-import com.vaadin.data.util.sqlcontainer.connection.JDBCConnectionPool;
-
-/**
- * @author cmathew
- * @since 9 Mar 2015
- *
- * @deprecated unused! should be deleted
- */
-@Deprecated
-public class CdmSpringConnectionPool implements JDBCConnectionPool {
-
-    private final Connection conn;
-
-    public CdmSpringConnectionPool(Connection conn) {
-        this.conn = conn;
-    }
-
-    @Override
-    public void destroy() {
-    }
-
-    @Override
-    public void releaseConnection(Connection conn) {
-    }
-
-    @Override
-    public Connection reserveConnection() throws SQLException {
-        return conn;
-    }
-}
index 532b26054394aab4c1df11691979e8ab9e1e3f07..c9eee8466417e40341c5415263c84cd66747fe2e 100644 (file)
@@ -31,23 +31,14 @@ public class IdUuidName {
         this.name = name;
     }
 
-    /**
-     * @return the id
-     */
     public Object getId() {
         return id;
     }
 
-    /**
-     * @return the uuid
-     */
     public UUID getUuid() {
         return uuid;
     }
 
-    /**
-     * @return the name
-     */
     public String getName() {
         return name;
     }
index 8eee772954fd7522436ad85fff6c50044c64ecab..c25e83cfcbe904b657130044917019698c872d87 100644 (file)
@@ -40,6 +40,5 @@ public class InReferenceTypeValidator implements Validator {
                 throw new InvalidValueException(Objects.toString(inReference.getType(), "[NULL]") + " is not a suitable in-reference type for " + Objects.toString(type, "[NULL]") );
             }
         }
-
     }
-}
+}
\ No newline at end of file
index be1995d7915a37de9e9edd1a33a3a41cc040e166..ab44473fcbf22c45a45224ed7b7c266f56b04a54 100644 (file)
@@ -20,11 +20,9 @@ import eu.etaxonomy.cdm.vaadin.model.name.NameRelationshipDTO;
  *
  * @author a.kohlbecker
  * @since Mar 27, 2019
- *
  */
 public class NomenclaturalReferenceExistsValidator implements Validator {
 
-
     private static final long serialVersionUID = -7750232876262922982L;
 
     private String userHint = "";
@@ -33,9 +31,6 @@ public class NomenclaturalReferenceExistsValidator implements Validator {
         this.userHint = userHint;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void validate(Object value) throws InvalidValueException {
         if(value != null){
@@ -48,16 +43,11 @@ public class NomenclaturalReferenceExistsValidator implements Validator {
                 validateName(nameRelDto.getOtherName());
             }
         }
-
     }
 
-    /**
-     * @param name
-     */
     public void validateName(TaxonName name) {
         if(name.getNomenclaturalReference() == null) {
             throw new InvalidValueException("The taxon name must have a nomenclatural reference. " + userHint);
         }
     }
-
-}
+}
\ No newline at end of file
index c294527744b7cf010ca4ea7657720ee27509def0..ba5af8c31cbfe4b5e795857214dc3c532c24eda1 100644 (file)
@@ -42,4 +42,4 @@ public class PartialCompletenesValidator implements Validator {
             }
         }
     }
-}
+}
\ No newline at end of file
index 5b6d04f827865f20b4ace303f3ecd69d0429dc5f..62e7200e1b8f420720ea95ae071d5dfba8587577 100644 (file)
@@ -23,12 +23,9 @@ public class PasswordsMatchValidator extends AbstractStringValidator {
 
     private static final long serialVersionUID = -9048318480638222817L;
 
-    PasswordField firstField;
-    PasswordField secondField;
+    private PasswordField firstField;
+    private PasswordField secondField;
 
-    /**
-     * @param errorMessage
-     */
     public PasswordsMatchValidator(String errorMessage, PasswordField firstField, PasswordField secondField) {
         super(errorMessage);
         this.firstField = firstField;
@@ -42,5 +39,4 @@ public class PasswordsMatchValidator extends AbstractStringValidator {
     protected boolean isValidValue(String value) {
         return firstField.getValue().equals(secondField.getValue());
     }
-
-}
+}
\ No newline at end of file
index a2dca8bf6e6edabcec56ea1f6f5895cc1d94e0ab..b2fa933a6d9844212dc0e4e528b4021897feda83 100644 (file)
@@ -41,7 +41,4 @@ public class PasswordsPolicyValidator implements Validator {
             }
         }
     }
-
-
-
-}
+}
\ No newline at end of file
index 71f66b6ae516e14141d9ea3876bdda1fe54935a9..024554191cabc9c3d46568412a05b7c9629578bd 100644 (file)
@@ -15,7 +15,6 @@ import eu.etaxonomy.cdm.model.common.TimePeriod;
 /**
  * @author a.kohlbecker
  * @since Mar 27, 2019
- *
  */
 public class TimePeriodCompletenesValidator implements Validator {
 
@@ -35,4 +34,4 @@ public class TimePeriodCompletenesValidator implements Validator {
             }
         }
     }
-}
+}
\ No newline at end of file
index 891fadfb164faa412967542684cdef5474010146..d1d5152811118a6d1910822d01f47dbe39b9599e 100644 (file)
@@ -22,12 +22,9 @@ public class CdmEntityInfoSorter implements ItemSorter {
 
     private static final long serialVersionUID = 1008554008146041297L;
 
-    Object[] propertyId;
-    boolean[] ascending;
+    private Object[] propertyId;
+    private boolean[] ascending;
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void setSortProperties(Sortable container, Object[] propertyId, boolean[] ascending) {
         this.propertyId = propertyId;
@@ -35,9 +32,6 @@ public class CdmEntityInfoSorter implements ItemSorter {
 
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public int compare(Object itemId1, Object itemId2) {
         if(! (itemId1 instanceof CdmEntityInfo && itemId2 instanceof CdmEntityInfo) ){
@@ -47,7 +41,5 @@ public class CdmEntityInfoSorter implements ItemSorter {
         CdmEntityInfo infoItem2 = (CdmEntityInfo)itemId2;
 
         return infoItem1.getField().getName().compareToIgnoreCase(infoItem2.getField().getName());
-
     }
-
-}
+}
\ No newline at end of file
index 403d1b75df022d6fc452749c13d42edb5fb9d5bc..1184c9aff66f85d93c743c1d0ae0fca9d67a8a35 100644 (file)
@@ -15,17 +15,16 @@ import eu.etaxonomy.vaadin.mvp.AbstractView;
 /**
  * @author a.kohlbecker
  * @since May 10, 2017
- *
  */
-public abstract class AbstractEntityEvent<T extends Enum> {
-
-    private UUID entityUuid = null;
+public abstract class AbstractEntityEvent<T extends Enum<?>> {
 
     protected T type;
 
-    private AbstractView sourceView = null;
+    private UUID entityUuid = null;
 
-    public AbstractEntityEvent(T type, UUID entityUuid, AbstractView sourceView) {
+    private AbstractView<?> sourceView = null;
+
+    public AbstractEntityEvent(T type, UUID entityUuid, AbstractView<?> sourceView) {
         this.entityUuid = entityUuid;
         this.type = type;
         this.sourceView = sourceView;
@@ -34,9 +33,6 @@ public abstract class AbstractEntityEvent<T extends Enum> {
         }
     }
 
-    /**
-     * @return the entityId
-     */
     public UUID getEntityUuid() {
         return entityUuid;
     }
@@ -45,11 +41,7 @@ public abstract class AbstractEntityEvent<T extends Enum> {
         return type;
     }
 
-    /**
-     * @return the sourceView
-     */
-    public AbstractView getSourceView() {
+    public AbstractView<?> getSourceView() {
         return sourceView;
     }
-
-}
+}
\ No newline at end of file
index cdcd6c74bb113454c2fc4e19e38e0dbd6edc7f41..6d303136562910e6a0f940d6d46876b8228aed97 100644 (file)
@@ -16,36 +16,22 @@ import com.vaadin.ui.Button.ClickEvent;
  *
  * @author a.kohlbecker
  * @since Apr 25, 2017
- *
  */
 public class AuthenticationAttemptEvent implements AuthenticationEvent{
 
-    ClickEvent e;
-    String userName;
+    private ClickEvent e;
+    private String userName;
 
-    /**
-     * @param e
-     * @param userName
-     */
     public AuthenticationAttemptEvent(ClickEvent e, String userName) {
         this.e = e;
         this.userName = userName;
     }
 
-    /**
-     * @return the e
-     */
     public ClickEvent getE() {
         return e;
     }
 
-    /**
-     * @return the userName
-     */
     public String getUserName() {
         return userName;
     }
-
-
-
-}
+}
\ No newline at end of file
index 911f26dc26dc7b6260bb8555a59097ec25b9d3f3..8cfd10324d852b75f9d7945e239ac482dee89f66 100644 (file)
@@ -20,10 +20,8 @@ import eu.etaxonomy.cdm.model.term.TermVocabulary;
  * These terms are specific to the phycobank project but are temporarily necessary in
  * cdmlib-services for {@link SpecimenTypeDesignationDTO}
  *
- *
  * @author a.kohlbecker
  * @since Jun 20, 2017
- *
  */
 public class KindOfUnitTerms {
 
index 53fc9fd9e0cf35c673b25dbe5b52f4ec01e55c3d..691efccfed2094a45e03e5e1815dde94d38f4304 100644 (file)
@@ -33,16 +33,10 @@ public enum WorkflowStep {
         this.representation = representation;
     }
 
-    /**
-     * @return the representation
-     */
     public String getRepresentation() {
         return representation;
     }
 
-    /**
-     * @return the stepIndex
-     */
     public int getStepIndex() {
         return stepIndex;
     }
@@ -72,4 +66,4 @@ public enum WorkflowStep {
             }
         }
     }
-}
+}
\ No newline at end of file
index 8cef4fb8b5049bfc4e756bd06fe45be7a20257b3..3a97c92d572fa5942aa338dc799f3aef5c063911 100644 (file)
@@ -41,4 +41,4 @@ public class AccessRestrictedViewControlBean implements ViewInstanceAccessContro
         logger.debug("allowing view by fall through, no check performed");
         return true;
     }
-}
+}
\ No newline at end of file
index bc877482c9b65777f10e347bb716e7487b662824..5633a5a838de6e0d3cf90f34610efb4d0cbb63bd 100644 (file)
@@ -25,7 +25,6 @@ import com.vaadin.ui.UI;
  * @author a.kohlbecker
  * @since Apr 24, 2017
  *
- *
  * (FIMXE 1. consider renaming this class and its interface, since it is no longer annotation based!!!!)
  *
  * FIMXE 2. this class should implement ViewAccessControl. The view class and annotations can be accessed
index 53438b801a8afccfe25d4c014f7db32b429fa94e..94a5e35d23339b605780d5ad153fb5e36398643d 100644 (file)
@@ -16,7 +16,6 @@ import com.vaadin.spring.annotation.UIScope;
 /**
  * @author a.kohlbecker
  * @since Apr 24, 2017
- *
  */
 @Configuration
 public class AnnotationBasedAccessControlConfiguration {
index 5d77582e6440f571236f345185b2ea85a724fe0f..10f1a0fea16415d09a22bf73923f3e2c9178c5dd 100644 (file)
@@ -19,7 +19,6 @@ import eu.etaxonomy.vaadin.permission.EditPermissionTester;
  *
  * @author a.kohlbecker
  * @since Apr 20, 2018
- *
  */
 public class CdmEditDeletePermissionTester implements EditPermissionTester {
     @Override
index ac1df2413fd5d8f55292885bf9759f9afeebb7e9..02fde1233684d7437456d31f00bbebd2ff7f7281 100644 (file)
@@ -40,7 +40,6 @@ import eu.etaxonomy.cdm.service.UserHelperAccess;
  *
  * @author a.kohlbecker
  * @since Oct 11, 2017
- *
  */
 @SpringComponent
 @Profile("debug")
@@ -79,8 +78,5 @@ public class PermissionDebugUtils implements Serializable {
        button.addClickListener(e -> UserHelperAccess.userHelper().createAuthorityFor(UserHelperAccess.userHelper().userName(), cdmType, entitiyUuid, crud, property));
        button.addStyleName(ValoTheme.BUTTON_DANGER);
        return button;
-
     }
-
-
-}
+}
\ No newline at end of file
index c8a109d1fa672514d82fbf4a02f8108f3d16161c..8429a6f7e60c01543f8c8bc063ab9b5a707a2feb 100644 (file)
@@ -11,7 +11,6 @@ package eu.etaxonomy.cdm.vaadin.permission;
 /**
  * @author a.kohlbecker
  * @since 25.10.2017
- *
  */
 public interface ReleasableResourcesView {
 
index d94e08b2dd43abc7b7e762503889b5679eef1e90..38d0c01c6b5c884bd44cfe955ded72d6656d6ec2 100644 (file)
@@ -17,17 +17,16 @@ import eu.etaxonomy.cdm.model.common.TimePeriod;
 /**
  * @author a.kohlbecker
  * @since Apr 28, 2017
- *
  */
 public class PartialFormatter {
 
     private DateTimeFormat format;
 
-    private static final DateTimeFormatter dmyDotDayMonthYear =  org.joda.time.format.DateTimeFormat.forPattern("dd.MM.y");
+    private static final DateTimeFormatter dmyDotDayMonthYear = org.joda.time.format.DateTimeFormat.forPattern("dd.MM.y");
 
-    private static final DateTimeFormatter dmyDotMonthYear =  org.joda.time.format.DateTimeFormat.forPattern("MM.y");
+    private static final DateTimeFormatter dmyDotMonthYear = org.joda.time.format.DateTimeFormat.forPattern("MM.y");
 
-    private static final DateTimeFormatter dmyDotYear =  org.joda.time.format.DateTimeFormat.forPattern("y");
+    private static final DateTimeFormatter dmyDotYear = org.joda.time.format.DateTimeFormat.forPattern("y");
 
     public PartialFormatter(DateTimeFormat format) {
         this.format = format;
@@ -43,10 +42,6 @@ public class PartialFormatter {
         }
     }
 
-    /**
-     * @param partial
-     * @return
-     */
     private DateTimeFormatter determine_ISO860_Formatter(Partial partial) {
         if (partial.isSupported(TimePeriod.DAY_TYPE)) {
             return ISODateTimeFormat.yearMonthDay();
@@ -55,13 +50,8 @@ public class PartialFormatter {
             return ISODateTimeFormat.yearMonth();
         }
         return ISODateTimeFormat.year();
-
     }
 
-    /**
-     * @param partial
-     * @return
-     */
     private DateTimeFormatter determine_DMY_DOT_Formatter(Partial partial) {
         if (partial.isSupported(TimePeriod.DAY_TYPE)) {
             return dmyDotDayMonthYear;
@@ -70,7 +60,5 @@ public class PartialFormatter {
             return dmyDotMonthYear;
         }
         return dmyDotYear;
-
     }
-
-}
+}
\ No newline at end of file
index 1f875722a251e2f444cc14b18e5aa35edf9cb419..85256d6b6c087115524bd89e1f5c3c0dba7b1892 100644 (file)
@@ -18,7 +18,6 @@ import eu.etaxonomy.cdm.model.common.TimePeriod;
  *
  * @author a.kohlbecker
  * @since Apr 26, 2017
- *
  */
 public class TimePeriodFormatter {
 
@@ -46,5 +45,4 @@ public class TimePeriodFormatter {
             return sb.toString();
         }
     }
-
-}
+}
\ No newline at end of file
index 3a0b40d8a136dac6e2209d4c9d0ddd75b38075cf..d5408544a1fef4516fc9bb6f50d4001f0cfef099 100644 (file)
@@ -28,9 +28,10 @@ import eu.etaxonomy.vaadin.mvp.AbstractView;
  *
  * @author a.kohlbecker
  * @since Mar 20, 2017
- *
  */
-public abstract class AbstractPageView<P extends AbstractPresenter> extends AbstractView<P>  {
+public abstract class AbstractPageView<P extends AbstractPresenter<?>> extends AbstractView<P>  {
+
+    private static final long serialVersionUID = -8669483572788112285L;
 
     private VerticalLayout layout;
 
@@ -38,10 +39,6 @@ public abstract class AbstractPageView<P extends AbstractPresenter> extends Abst
 
     private Label header;
 
-
-    /**
-     *
-     */
     public AbstractPageView() {
         layout = new VerticalLayout();
         layout.setSizeFull();
@@ -57,9 +54,6 @@ public abstract class AbstractPageView<P extends AbstractPresenter> extends Abst
         this.setSizeFull();
     }
 
-    /**
-     *
-     */
     public void updateHeader() {
         header.setValue("<div id=\"header\">" + getHeaderText() + "</div><div id=\"subheader\">" + getSubHeaderText() + "</div>");
     }
@@ -72,7 +66,6 @@ public abstract class AbstractPageView<P extends AbstractPresenter> extends Abst
         for(Component c : contentComponents){
             layout.removeComponent(c);
         }
-
     }
 
     protected void addContentComponent(Component component, Float expandRatio){
@@ -83,22 +76,14 @@ public abstract class AbstractPageView<P extends AbstractPresenter> extends Abst
         }
     }
 
-
-
     /**
      * Provides the sub header text
-     *
-     * @return
      */
     protected abstract String getHeaderText();
 
     /**
      * Provides the header text
-     *
-     * @return
      */
     protected abstract  String getSubHeaderText();
 
-
-
-}
+}
\ No newline at end of file
index 713368996f62dc650b652b063c868f6bb277f9ad..e10bddbd26b2a5b224698d4a302a3416e6beb07a 100644 (file)
@@ -54,7 +54,7 @@ public class AccountRegistrationPresenter extends AbstractPresenter<AccountRegis
 
     protected EventBus.UIEventBus uiEventBus;
 
-    AccountCreationRequest accountCreationRequest = null;
+    private AccountCreationRequest accountCreationRequest = null;
 
     @Autowired
     protected void setUIEventBus(EventBus.UIEventBus uiEventBus){
index 65511b8e773be38babbe680efe38a091b75d6217..c2a74423110286a35ef4fe1397aa7b9c099d92f6 100644 (file)
@@ -14,12 +14,10 @@ import eu.etaxonomy.cdm.vaadin.component.common.FilterableAnnotationsField;
 /**
  * @author a.kohlbecker
  * @since Jun 25, 2018
- *
  */
 public interface AnnotationsEditor {
 
     /**
-     *
      * @return the EDITABLE_ANOTATION_TYPES
      */
     public AnnotationType[] getEditableAnotationTypes();
@@ -30,9 +28,6 @@ public interface AnnotationsEditor {
      */
     public void setEditableAnotationTypes(AnnotationType... editableAnotationTypes);
 
-    /**
-     * @return
-     */
     public FilterableAnnotationsField getAnnotationsField();
 
 }
\ No newline at end of file
index 23c979f632be6809cf5cdadb08cd7ddb9854df44..1df49ea21d30bd3e2b0357fa3df605fdb618b9f9 100644 (file)
@@ -29,7 +29,7 @@ public class ErrorView extends VerticalLayout implements View {
     public static final String NAME = "error";
 
     @Autowired
-    NavigationManager navigationManager;
+    private NavigationManager navigationManager;
 
     private static final long serialVersionUID = -8763747518841365925L;
 
@@ -44,13 +44,8 @@ public class ErrorView extends VerticalLayout implements View {
         setComponentAlignment(header, Alignment.MIDDLE_CENTER);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void enter(ViewChangeEvent event) {
 
-
     }
-
-}
+}
\ No newline at end of file
index 3be9c5cd90a112522c1034faabb2390610c7eead..c1412c1244b16760b3a0d075668efe34c899e917 100644 (file)
@@ -176,7 +176,7 @@ public class LoginPresenter extends AbstractPresenter<LoginView> implements Even
         }
     }
 
-    private void requestPasswordReset() throws MalformedURLException, ExecutionException {
+    private void requestPasswordReset() throws MalformedURLException {
         String userNameOrEmail = getView().getLoginDialog().getUserNameOrEmail().getValue();
         URL servletBaseUrl = VaadinServletUtilities.getServletBaseUrl();
         logger.debug("UserAccountAction.REQUEST_PASSWORD_RESET for " + servletBaseUrl + ", userNameOrEmail:" + userNameOrEmail);
@@ -241,11 +241,11 @@ public class LoginPresenter extends AbstractPresenter<LoginView> implements Even
         }
     }
 
-    private void requestAccountCreation() throws MalformedURLException, MailException, AddressException, AccountSelfManagementException, ExecutionException {
+    private void requestAccountCreation() throws MalformedURLException, MailException, AddressException, AccountSelfManagementException {
         String emailAddress = getView().getLoginDialog().getEmail().getValue();
         URL servletBaseUrl = VaadinServletUtilities.getServletBaseUrl();
 
-        logger.debug("UserAccountAction.REGISTER_ACCOUNT for " + servletBaseUrl + ", emailAddress:" + emailAddress);
+        if (logger.isDebugEnabled()) {logger.debug("UserAccountAction.REGISTER_ACCOUNT for " + servletBaseUrl + ", emailAddress:" + emailAddress);}
 
         CountDownLatch finshedSignal = new CountDownLatch(1);
         List<Throwable> asyncExceptions = new ArrayList<>(1);
@@ -294,4 +294,4 @@ public class LoginPresenter extends AbstractPresenter<LoginView> implements Even
             }
         }
     }
-}
+}
\ No newline at end of file
index 0ef6e71a86937e6ac5544ad1f4789ead4727eb90..1124deb9272957fc839be0ad5ebe678eec13af2d 100644 (file)
@@ -8,22 +8,18 @@
 */
 package eu.etaxonomy.cdm.vaadin.view;
 
-import com.vaadin.ui.themes.ValoTheme;
-
 import eu.etaxonomy.cdm.vaadin.component.LoginDialog;
 import eu.etaxonomy.vaadin.mvp.ApplicationView;
 
 /**
  * @author a.kohlbecker
  * @since Apr 25, 2017
- *
  */
 public interface LoginView extends ApplicationView<LoginPresenter>  {
 
-    LoginDialog getLoginDialog();
-
-    void clearMessage();
+    public LoginDialog getLoginDialog();
 
-    void showErrorMessage(String text);
+    public void clearMessage();
 
-}
+    public void showErrorMessage(String text);
+}
\ No newline at end of file
index f56460267b0ef5f07c5864ee860413fabf831044..c2271ed780b372bbef3afbb64f6acddf1eb7a2b8 100644 (file)
@@ -33,7 +33,9 @@ import eu.etaxonomy.vaadin.ui.navigation.NavigationEvent;
  * @since Apr 25, 2017
  */
 @SpringView(name=LoginViewBean.NAME)
-public class LoginViewBean  extends AbstractView<LoginPresenter> implements LoginView, View  {
+public class LoginViewBean
+        extends AbstractView<LoginPresenter>
+        implements LoginView, View  {
 
     private static final long serialVersionUID = 8527714663738364972L;
 
index 35c21ece43e5ced8d228d9362d127c37c7771806..071b0c411a315310e064d01994567450242c2d3d 100644 (file)
@@ -53,7 +53,7 @@ public class PasswordResetPresenter extends AbstractPresenter<PasswordResetView>
 
     protected EventBus.UIEventBus uiEventBus;
 
-    PasswordResetRequest resetRequest = null;
+    private PasswordResetRequest resetRequest = null;
 
     @Autowired
     protected void setUIEventBus(EventBus.UIEventBus uiEventBus){
@@ -118,7 +118,6 @@ public class PasswordResetPresenter extends AbstractPresenter<PasswordResetView>
                     getView().showErrorMessage("A timeout has occured, please try again.");
                 }
             }
-
         }
     }
-}
+}
\ No newline at end of file
index 443d91c7404f905a1e83b19ca981cc136bb3cc2c..ec45bc5e9c424442676330cc0f48df88c77e02d9 100644 (file)
@@ -19,9 +19,7 @@ public interface PasswordResetView extends ApplicationView<PasswordResetPresente
 
     public void showErrorMessage(String text);
 
-    void setUserName(String userName);
+    public void setUserName(String userName);
 
-    PasswordField getPassword1Field();
-
-
-}
+    public PasswordField getPassword1Field();
+}
\ No newline at end of file
index a4dd5001ec1be90e3fbff8a54e1053a057f63385..07c73f64687c85a14d18cd0dc3c17929fb8f22a1 100644 (file)
@@ -139,8 +139,4 @@ public class PasswordResetViewBean extends AbstractView<PasswordResetPresenter>
     public PasswordField getPassword1Field() {
         return password1Field;
     }
-
-
-
-
-}
+}
\ No newline at end of file
index eb286c0e904c2f839db536f26c57f18785f6497b..bba52cde56b91f2712d051d845002d7999e6ceb5 100644 (file)
@@ -16,7 +16,6 @@ import eu.etaxonomy.cdm.model.permission.CRUD;
 /**
  * @author a.kohlbecker
  * @since 20.10.2017
- *
  */
 public interface PerEntityAuthorityGrantingEditor {
 
@@ -28,4 +27,4 @@ public interface PerEntityAuthorityGrantingEditor {
      */
     public void grantToCurrentUser(EnumSet<CRUD> crud);
 
-}
+}
\ No newline at end of file
index 03f9314a7499c7f8d8c97866be7161bc8bc9dc5c..8237c6756b0cab99b4b691bda8e2decccb0d6873 100644 (file)
@@ -37,17 +37,15 @@ import eu.etaxonomy.vaadin.ui.navigation.NavigationManager;
  *
  * @author a.kohlbecker
  * @since Jul 13, 2017
- *
  */
 @SpringComponent
 @Scope(ConfigurableBeanFactory.SCOPE_PROTOTYPE)
 public class RedirectToLoginView extends VerticalLayout implements View {
 
-
     private static final long serialVersionUID = -8763747518841365925L;
 
     @Autowired
-    NavigationManager navigationManager;
+    private NavigationManager navigationManager;
 
     @Autowired
     protected EventBus.UIEventBus uiEventBus;
@@ -63,9 +61,6 @@ public class RedirectToLoginView extends VerticalLayout implements View {
         setComponentAlignment(header, Alignment.MIDDLE_CENTER);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void enter(ViewChangeEvent event) {
 
@@ -75,5 +70,4 @@ public class RedirectToLoginView extends VerticalLayout implements View {
             uiEventBus.publish(this, new NavigationEvent(LoginViewBean.NAME, currentState));
         }
     }
-
-}
+}
\ No newline at end of file
index 254465091f9eafc4e9bfd54fceda1d85bce80db4..b95ca8a1ad90de5f839032d38f81f606db37fd9f 100644 (file)
@@ -67,40 +67,26 @@ public class InstitutionEditorPresenter extends AbstractCdmDTOEditorPresenter<In
         return bean;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected void guaranteePerEntityCRUDPermissions(UUID identifier) {
         if(crud != null){
             newAuthorityCreated = UserHelperAccess.userHelper().createAuthorityForCurrentUser(Collection.class, identifier, crud, null);
         }
-
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected void guaranteePerEntityCRUDPermissions(Institution bean) {
         if(crud != null){
             newAuthorityCreated = UserHelperAccess.userHelper().createAuthorityForCurrentUser(bean, crud, null);
         }
-
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected IService<Institution> getService() {
         // TODO Auto-generated method stub
         return null;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void handleViewEntered() {
         super.handleViewEntered();
@@ -156,33 +142,22 @@ public class InstitutionEditorPresenter extends AbstractCdmDTOEditorPresenter<In
                         getView().getPartOfCombobox().reload();
                     }
                 }
-
             }
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected InstitutionDTO createDTODecorator(Institution cdmEntitiy) {
         return new InstitutionDTO(cdmEntitiy);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected BeanInstantiator<Institution> defaultCdmEntityInstantiator() {
-        return new  BeanInstantiator<Institution>(){
+        return new BeanInstantiator<Institution>(){
             @Override
             public Institution createNewBean() {
                 return Institution.NewInstance();
             }
-
         };
     }
-
-
-
-}
+}
\ No newline at end of file
index dba1fb0b48337ac71b8e55999157e199301081f5..97faf1ecd27e69b5977d2c89f75dc78efe40077a 100644 (file)
@@ -26,7 +26,6 @@ import eu.etaxonomy.vaadin.mvp.AbstractCdmDTOPopupEditor;
 /**
  * @author a.kohlbecker
  * @since Dec 21, 2017
- *
  */
 @SpringComponent
 @Scope("prototype")
@@ -38,55 +37,35 @@ public class InstitutionPopupEditor extends AbstractCdmDTOPopupEditor<Institutio
 
     private static final int GRID_ROWS = 3;
 
-    TextField codeField;
-    TextField codeStandardField;
-    TextField townOrLocationField;
-    ToOneRelatedEntityCombobox<Institution> partOfCombobox;
+    private TextField codeField;
+    private TextField codeStandardField;
+    private TextField townOrLocationField;
+    private ToOneRelatedEntityCombobox<Institution> partOfCombobox;
 
-
-    /**
-     * @param layout
-     * @param dtoType
-     */
     public InstitutionPopupEditor() {
         super(new GridLayout(GRID_COLS, GRID_ROWS), InstitutionDTO.class);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public String getWindowCaption() {
         return "Institution editor";
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public int getWindowWidth() {
         return 500;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void focusFirst() {
         codeField.focus();
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected String getDefaultComponentStyles() {
         return "tiny";
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected void initContent() {
 
@@ -103,7 +82,7 @@ public class InstitutionPopupEditor extends AbstractCdmDTOPopupEditor<Institutio
 
         row++;
 
-        partOfCombobox = new ToOneRelatedEntityCombobox<Institution>("Part of", Institution.class);
+        partOfCombobox = new ToOneRelatedEntityCombobox<>("Part of", Institution.class);
 
 
         partOfCombobox.setWidth(300, Unit.PIXELS);
@@ -134,7 +113,6 @@ public class InstitutionPopupEditor extends AbstractCdmDTOPopupEditor<Institutio
                     );
                 }
             });
-
     }
 
     /* ------------------ View Interface methods -------------------- */
@@ -143,4 +121,4 @@ public class InstitutionPopupEditor extends AbstractCdmDTOPopupEditor<Institutio
     public ToOneRelatedEntityCombobox<Institution> getPartOfCombobox(){
         return partOfCombobox;
     }
-}
+}
\ No newline at end of file
index 69114ef3d79f30a49b11bc09311bf0bacff1402a..fbe7e32888f8eb128a3d97fc60f1b2342d3926fc 100644 (file)
@@ -277,7 +277,7 @@ public class NameTypeDesignationPresenter
             EntityChangeEvent<?> changeEvent = new EntityChangeEvent<>(bean, Type.REMOVED, (AbstractView<?>) getView());
             viewEventBus.publish(this, changeEvent);
         } else {
-            CdmStore.handleDeleteresultInError(deletResult);
+            CdmStore.handleDeleteResultInError(deletResult);
         }
     }
 
index 58fd8320909f97845d473d9cd77196f2fce664be..bc8fa2dc36a7066483b2ec7b039d868d8046a89a 100644 (file)
@@ -385,18 +385,11 @@ public class SpecimenTypeDesignationSetEditorPresenter
         specimenTypeDesignationSetService.save(dto);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected void deleteBean(SpecimenTypeDesignationSetDTO bean) {
         specimenTypeDesignationSetService.delete(bean, true);
     }
 
-    /**
-     * @param element
-     * @return
-     */
     private void addTypeDesignation(SpecimenTypeDesignationDTO element) {
         getView().updateAllowDeleteTypeDesignation();
     }
@@ -407,9 +400,6 @@ public class SpecimenTypeDesignationSetEditorPresenter
      * The actual deletion of the SpecimenTypeDesignation and DerivedUnit will take place in {@link #saveBean(SpecimenTypeDesignationSetDTO)}
      *
      * TODO once https://dev.e-taxonomy.eu/redmine/issues/7077 is fixed dissociating from the Registration could be removed here
-     *
-     * @param e
-     * @return
      */
     private void deleteTypeDesignation(SpecimenTypeDesignationDTO element) {
 
@@ -421,16 +411,10 @@ public class SpecimenTypeDesignationSetEditorPresenter
         getView().updateAllowDeleteTypeDesignation();
     }
 
-    /**
-     * @param crud
-     */
     public void setGrantsForCurrentUser(EnumSet<CRUD> crud) {
         this.crud = crud;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public ICdmEntityUuidCacher getCache() {
         return cache;
@@ -465,7 +449,7 @@ public class SpecimenTypeDesignationSetEditorPresenter
 
 
     @EventBusListenerMethod(filter = EntityChangeEventFilter.OccurrenceCollectionFilter.class)
-    public void onCollectionEvent(EntityChangeEvent event){
+    public void onCollectionEvent(EntityChangeEvent<?> event){
 
         if(event.getSourceView() instanceof AbstractPopupEditor) {
 
index 78232bf078bbc3d9b3a0c6c7cdd226b77eb9547a..2c7f63428da4fe093857174030a9f944ff7dd04c 100644 (file)
@@ -1,10 +1,10 @@
 # Vaadin UI and Spring based MVP Framework
 
-* `./ui` *A VaadinSpring bases MVP framework with popup views and editors with easy data binding.* 
+* `./ui` *A VaadinSpring based MVP framework with popup views and editors with easy data binding.* 
 * `./mvp` *A spring based UI framework for Vaadin which brings a responsive menu layout and support for the mvp popup views.* 
 
-These framework is based on ideas of Peter Letho from Vaadin:
-* ["Supporting mobile, desktop and tablet by building impressive layout systems"](https://www.youtube.com/watch?v=zKJ7tkLS8XE). The according source code is here https://github.com/peterl1084/devday2016" a the Vaadin DevDay 2016. The original framework was using Java Web Beans (CDI) which has been ported to Spring DI for this project.
-* **devday-spring** a VaadinSpring based example project with MVP integration - the according soure code is here https://github.com/peterl1084/devday-spring
+This framework is based on ideas of Peter Letho from Vaadin:
+* ["Supporting mobile, desktop and tablet by building impressive layout systems"](https://www.youtube.com/watch?v=zKJ7tkLS8XE). The according source code is here https://github.com/peterl1084/devday2016" at the Vaadin DevDay 2016. The original framework was using Java Web Beans (CDI) which has been ported to Spring DI for this project.
+* **devday-spring** a VaadinSpring based example project with MVP integration - the according source code is here https://github.com/peterl1084/devday-spring
 
 
index e640da9501469ed4034c90bef2fb7bde8647e4d0..9d1bea975448569dd0e8ba34c057c778a0c5fd14 100644 (file)
@@ -45,7 +45,6 @@ import eu.etaxonomy.cdm.vaadin.event.NestedButtonStateUpdater;
  * @since May 12, 2017
  *
  * IMPORTANT see also {@link CompositeStyledComponent} which has almost the same functionality.
- *
  */
 @SuppressWarnings("serial")
 public abstract class CompositeCustomField<T> extends CustomField<T> implements NestedFieldGroup {
index 652a18be69474c311e55546367931fd20af8fb97..6f3734ce35fcd531514ceee0725f66f1645bbac2 100644 (file)
@@ -20,7 +20,6 @@ import com.vaadin.ui.CssLayout;
  * @since May 22, 2017
  *
  * IMPORTANT see also {@link CompositeCustomField} which has almost the same functionality.
- *
  */
 @SuppressWarnings("serial")
 public abstract class CompositeStyledComponent extends CssLayout {
@@ -65,12 +64,9 @@ public abstract class CompositeStyledComponent extends CssLayout {
 
     /**
      * Implementations preferably call this method in the constructor
-     *
-     * @param component
-     * @return
      */
-    protected boolean addStyledComponents(Component ... component){
-        List<Component> componentList = Arrays.asList(component);
+    protected boolean addStyledComponents(Component ... components){
+        List<Component> componentList = Arrays.asList(components);
         componentList.forEach(c -> applyCurrentStyleNames(c));
         return styledComponents.addAll(componentList);
     }
@@ -80,6 +76,5 @@ public abstract class CompositeStyledComponent extends CssLayout {
      * to prevent these styles from being overwritten when setStyleName() id called on the composite field.
      */
     protected abstract void addDefaultStyles();
-    //--------
 
-}
+}
\ No newline at end of file
index 3e5182dc67a0b7f2affa42cb107da58d3772ac0e..76baad91d07f2979de38703bc9a72ca5209d91d5 100644 (file)
@@ -11,7 +11,6 @@ package eu.etaxonomy.vaadin.component;
 /**
  * @author a.kohlbecker
  * @since Dec 11, 2017
- *
  */
 public abstract class EntityFieldInstantiator<F> {
 
index 36bfb404574900cd82a9e53f4958c57f0f4ada54..a5a200492a5643598104a4c581bd46dff8738610 100644 (file)
@@ -8,6 +8,8 @@
 */
 package eu.etaxonomy.vaadin.component;
 
+import com.vaadin.data.Property.ValueChangeListener;
+
 /**
  * Interface to ship around equality problems of entities which have modified data.
  *
@@ -40,6 +42,6 @@ public interface EntitySupport<V> {
      *
      * @param bean
      */
-    void replaceEntityValue(V bean);
+    public void replaceEntityValue(V bean);
 
 }
\ No newline at end of file
index ba213e84e48f38557d787ed5475e850893bc4627..1b1eeaa200f656e590ad3b9d357a928f51189ecd 100644 (file)
@@ -32,17 +32,12 @@ import eu.etaxonomy.cdm.vaadin.event.ToOneRelatedEntityButtonUpdater;
 import eu.etaxonomy.cdm.vaadin.model.name.NameRelationshipDTO;
 import eu.etaxonomy.cdm.vaadin.util.ReferenceEllypsisCaptionGenerator;
 
-
 /**
  * @author a.kohlbecker
  * @since May 3, 2018
- *
  */
 public class NameRelationField extends CompositeCustomField<NameRelationshipDTO> {
 
-    /**
-     *
-     */
     public static final String PRIMARY_STYLE = "v-name-relation-field";
 
     private static final long serialVersionUID = -7080885013120044655L;
@@ -57,15 +52,15 @@ public class NameRelationField extends CompositeCustomField<NameRelationshipDTO>
 
     private BeanFieldGroup<NameRelationshipDTO> fieldGroup = new BeanFieldGroup<>(NameRelationshipDTO.class);
 
-    ToOneRelatedEntityCombobox<TaxonName> relatedNameComboBox;
+    private ToOneRelatedEntityCombobox<TaxonName> relatedNameComboBox;
 
-    ToOneRelatedEntityCombobox<Reference> citatonComboBox;
+    private ToOneRelatedEntityCombobox<Reference> citatonComboBox;
 
-    TextFieldNFix citationMicroReferenceField = new TextFieldNFix();
+    private TextFieldNFix citationMicroReferenceField = new TextFieldNFix();
 
-    TextFieldNFix ruleConsideredField = new TextFieldNFix();
+    private TextFieldNFix ruleConsideredField = new TextFieldNFix();
 
-    NativeSelect codeEditionSelect = new NativeSelect();
+    private NativeSelect codeEditionSelect = new NativeSelect();
 
     private Direction direction;
 
@@ -76,9 +71,6 @@ public class NameRelationField extends CompositeCustomField<NameRelationshipDTO>
     private String nameFieldCaption;
 
 
-    /**
-     * @param string
-     */
     public NameRelationField(String caption, String nameFieldCaption, Direction direction, NameRelationshipType type) {
         this.direction = direction;
         this.type = type;
@@ -171,17 +163,11 @@ public class NameRelationField extends CompositeCustomField<NameRelationshipDTO>
         return compositeWrapper;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public Class<NameRelationshipDTO> getType() {
         return NameRelationshipDTO.class;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected void setInternalValue(NameRelationshipDTO newValue) {
 
@@ -216,23 +202,16 @@ public class NameRelationField extends CompositeCustomField<NameRelationshipDTO>
 
     }
 
-
    private void updateToolBarButtonStates(){
        boolean hasValue = getValue() != null;
        removeButton.setVisible(hasValue);
        newButton.setVisible(!hasValue);
    }
 
-    /**
-     * @return the relatedNameComboBox
-     */
     public ToOneRelatedEntityCombobox<TaxonName> getRelatedNameComboBox() {
         return relatedNameComboBox;
     }
 
-    /**
-     * @return the citatonComboBox
-     */
     public ToOneRelatedEntityCombobox<Reference> getCitatonComboBox() {
         return citatonComboBox;
     }
@@ -241,15 +220,10 @@ public class NameRelationField extends CompositeCustomField<NameRelationshipDTO>
         return codeEditionSelect;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void setReadOnly(boolean readOnly) {
         super.setReadOnly(readOnly);
         setDeepReadOnly(readOnly, grid, null);
         setDeepReadOnly(readOnly, toolBar, null);
     }
-
-
-}
+}
\ No newline at end of file
index 63b058fecdaee501cbaebe5e2e16d0bf7365ce88..3ea296ca83d165af3d4c8d126c6ec81e1c4d3f2d 100644 (file)
@@ -30,10 +30,6 @@ public class NameRelationsListEditor extends ToManyRelatedEntitiesListSelect<Nam
 
     private ReloadableLazyComboBoxInstantiator<Reference> referenceSelectInstantiator;
 
-    /**
-     * @param itemType
-     * @param caption
-     */
     public NameRelationsListEditor(String caption) {
         super(NameRelationshipDTO.class, null, caption);
         this.fieldType = NameRelationField.class;
@@ -43,9 +39,6 @@ public class NameRelationsListEditor extends ToManyRelatedEntitiesListSelect<Nam
         referenceSelectInstantiator = new ReloadableLazyComboBoxInstantiator<Reference>(Reference.class);
     }
 
-    /**
-     * {@inheritDoc}
-     */
 //    @Override
 //    protected NameRelationField newFieldInstance(NameRelationshipDTO val) throws InstantiationException, IllegalAccessException {
 //
@@ -60,9 +53,6 @@ public class NameRelationsListEditor extends ToManyRelatedEntitiesListSelect<Nam
         setInternalValue(null);
     }
 
-    /**
-     * @param cdmTitleCacheCaptionGenerator
-     */
     public void setTaxonNameCaptionGenerator(CaptionGenerator<TaxonName> captionGenerator) {
         nameSelectInstantiator.setCaptionGenerator(captionGenerator);
     }
@@ -73,12 +63,7 @@ public class NameRelationsListEditor extends ToManyRelatedEntitiesListSelect<Nam
         setInternalValue(null);
     }
 
-    /**
-     * @param cdmTitleCacheCaptionGenerator
-     */
     public void setReferenceCaptionGenerator(CaptionGenerator<Reference> captionGenerator) {
         referenceSelectInstantiator.setCaptionGenerator(captionGenerator);
     }
-
-
-}
+}
\ No newline at end of file
index fa94d178bae4423635affb605b4859331ca1a1d5..7b48f8f6e4197c264bbefd6264877ab73d0ee793 100644 (file)
@@ -15,7 +15,6 @@ import com.vaadin.data.fieldgroup.FieldGroup;
 /**
  * @author a.kohlbecker
  * @since May 12, 2017
- *
  */
 public interface NestedFieldGroup {
 
@@ -28,9 +27,6 @@ public interface NestedFieldGroup {
 
     public abstract void registerParentFieldGroup(FieldGroup parent);
 
-    /**
-     * @param parent
-     */
     public abstract void unregisterParentFieldGroup(FieldGroup parent);
 
 }
index 40a825f3244b8871a4c16ac61a4d24259163c337..9dbc0f72428ca399eaf42003dae3b4d6040bd6b9 100644 (file)
@@ -22,4 +22,4 @@ public interface ReloadableSelect {
      */
     public void reload();
 
-}
+}
\ No newline at end of file
index 57868979b5220fc1639c88fd0cec7e1dbd2ef4e9..bf773657c0988e245d7ec28e3855f56e577e7359 100644 (file)
@@ -13,7 +13,6 @@ import org.vaadin.teemu.switchui.Switch;
 /**
  * @author a.kohlbecker
  * @since May 11, 2017
- *
  */
 public class SwitchButton extends Switch {
 
@@ -25,9 +24,6 @@ public class SwitchButton extends Switch {
         super();
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected void setInternalValue(Boolean newValue) {
         super.setInternalValue(newValue);
@@ -39,5 +35,4 @@ public class SwitchButton extends Switch {
     public void setValueSetLister(ValueChangeListener valueSetListener){
         this.valueSetListener = valueSetListener;
     }
-
 }
\ No newline at end of file
index 6e809b5993ee80d768ba9e66814e8ccd44a00f18..f05c4834232262e09f6bb6ee9736a0f06f2f1b90 100644 (file)
@@ -20,7 +20,6 @@ import eu.etaxonomy.cdm.vaadin.view.name.CachingPresenter;
  *
  * @author a.kohlbecker
  * @since Jun 7, 2017
- *
  */
 public class ToManyRelatedEntitiesComboboxSelect<V extends Object> extends ToManyRelatedEntitiesListSelect<V, ReloadableLazyComboBox<V>> {
 
@@ -28,11 +27,6 @@ public class ToManyRelatedEntitiesComboboxSelect<V extends Object> extends ToMan
 
     private ReloadableLazyComboBoxInstantiator<V> fieldInstantiator;
 
-    /**
-     * @param itemType
-     * @param fieldType
-     * @param caption
-     */
     public ToManyRelatedEntitiesComboboxSelect(Class<V> itemType, String caption) {
         super(itemType, null, caption);
         // TODO this.fieldTyp = LazyComboBox.class does not work
@@ -40,12 +34,9 @@ public class ToManyRelatedEntitiesComboboxSelect<V extends Object> extends ToMan
         this.fieldType = (Class<ReloadableLazyComboBox<V>>) field.getClass();
         // addEmptyRowOnInitContent is false in this class since adding row is only possible after setting the PagingProviders
         addEmptyRowOnInitContent = false;
-        fieldInstantiator = new ReloadableLazyComboBoxInstantiator<V>(itemType);
+        fieldInstantiator = new ReloadableLazyComboBoxInstantiator<>(itemType);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected ReloadableLazyComboBox<V> newFieldInstance(V val) throws InstantiationException, IllegalAccessException {
 
@@ -61,11 +52,7 @@ public class ToManyRelatedEntitiesComboboxSelect<V extends Object> extends ToMan
         setInternalValue(null);
     }
 
-    /**
-     * @param cdmTitleCacheCaptionGenerator
-     */
     public void setCaptionGenerator(CaptionGenerator<V> captionGenerator) {
         fieldInstantiator.setCaptionGenerator(captionGenerator);
     }
-
-}
+}
\ No newline at end of file
index 8e7a63cf088dd0f29f6fc480c372f5ff3acf2d3a..a97ef0f29db89ff124510f045f09b41b4dbad407 100644 (file)
@@ -48,7 +48,6 @@ import eu.etaxonomy.vaadin.permission.EditPermissionTester;
  *
  * @author a.kohlbecker
  * @since May 11, 2017
- *
  */
 public class ToManyRelatedEntitiesListSelect<V extends Object, F extends AbstractField<V>>  extends CompositeCustomField<List<V>> {
 
@@ -116,11 +115,9 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
     }
 
     /**
-     *
      * @return an unmodifiable List of the data Fields
      */
     protected List<F> fields() {
-        Integer row = null;
         List<F> fields = new ArrayList<>();
         for(int r = 0; r < grid.getRows(); r++){
             fields.add((F) grid.getComponent(GRID_X_FIELD, r));
@@ -128,10 +125,6 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
         return fields;
     }
 
-    /**
-     * @param field
-     * @return
-     */
     private void addRowAfter(F field) {
 
         List<V> nestedValues = getValueFromNestedFields();
@@ -153,10 +146,6 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
 
     }
 
-    /**
-     * @param field
-     * @return
-     */
     private void removeRow(F field) {
 
         Integer row = findRow(field);
@@ -401,6 +390,7 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
 
     class ButtonGroup extends CssLayout{
 
+        private static final long serialVersionUID = 8156121271630852750L;
         private Button editOrCreate;
 
         ButtonGroup (F field){
@@ -444,10 +434,6 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
 
     }
 
-    /**
-     * @param e
-     * @return
-     */
     private void editOrCreate(F field) {
 
         if(editActionListener == null){
@@ -501,21 +487,12 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
         }
     }
 
-    /**
-     * @param isWritable
-     * @param field
-     * @return
-     */
     public boolean isWritableField(F field) {
         boolean isWritable = !getState().readOnly;
         return isWritable && (field.getValue() == null
                 || field.getValue() != null && testEditButtonPermission(field.getValue()));
     }
 
-    /**
-     * @param field
-     * @return
-     */
     protected boolean testEditButtonPermission(Object rowValue) {
         if(editPermissionTester != null) {
             return editPermissionTester.userHasEditPermission(rowValue);
@@ -524,11 +501,11 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
         }
     }
 
-
     protected List<F> getNestedFields(){
 
         List<F> nestedFields = new ArrayList<>(grid.getRows());
         for(int r = 0; r < grid.getRows(); r++){
+            @SuppressWarnings("unchecked")
             F f = (F) grid.getComponent(GRID_X_FIELD, r);
             if(f == null){
                 logger.debug(String.format("NULL field at %d,%d", GRID_X_FIELD, r));
@@ -540,13 +517,6 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
         return Collections.unmodifiableList(nestedFields);
     }
 
-    /**
-     *
-     * @param val
-     * @return
-     * @throws InstantiationException
-     * @throws IllegalAccessException
-     */
     protected F newFieldInstance(V val) throws InstantiationException, IllegalAccessException {
 
         F field;
@@ -644,9 +614,6 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
         parentFieldGroup = parent;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void commit() throws SourceException, InvalidValueException {
 
@@ -684,9 +651,6 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
 //        }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void setWidth(String width) {
         super.setWidth(width);
@@ -701,9 +665,6 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected void addDefaultStyles() {
         // no default styles
@@ -720,15 +681,12 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
         }
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public boolean hasNullContent() {
 
-        for(Field f : getNestedFields()){
+        for(Field<?> f : getNestedFields()){
             if(f instanceof CompositeCustomField){
-                if(!((CompositeCustomField)f).hasNullContent()){
+                if(!((CompositeCustomField<?>)f).hasNullContent()){
                     return false;
                 }
             }
@@ -736,56 +694,30 @@ public class ToManyRelatedEntitiesListSelect<V extends Object, F extends Abstrac
         return true;
     }
 
-    /**
-     * @return the enityFieldInstantiator
-     */
     public EntityFieldInstantiator<F> getEntityFieldInstantiator() {
         return entityFieldInstantiator;
     }
-
-    /**
-     * @param enityFieldInstantiator the enityFieldInstantiator to set
-     */
     public void setEntityFieldInstantiator(EntityFieldInstantiator<F> entityFieldInstantiator) {
         this.entityFieldInstantiator = entityFieldInstantiator;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void setReadOnly(boolean readOnly) {
         super.setReadOnly(readOnly);
         updateComponentStates();
     }
 
-
-    /**
-     * @return the editPermissionTester
-     */
     public EditPermissionTester getEditPermissionTester() {
         return editPermissionTester;
     }
-
-    /**
-     * @param editPermissionTester the editPermissionTester to set
-     */
     public void setEditPermissionTester(EditPermissionTester editPermissionTester) {
         this.editPermissionTester = editPermissionTester;
     }
 
-    /**
-     * @return the editActionListener
-     */
     public EntityEditorActionListener getEditActionListener() {
         return editActionListener;
     }
-
-    /**
-     * @param editActionListener the editActionListener to set
-     */
     public void setEditActionListener(EntityEditorActionListener editActionListener) {
         this.editActionListener = editActionListener;
     }
-
-}
+}
\ No newline at end of file
index 2a4a2c086756d52d8be302f4ad3de1e139b72a1a..0c3bdbcd9c77074cbb285dd2b4cf2a91515295a5 100644 (file)
@@ -31,7 +31,7 @@ import com.vaadin.ui.themes.ValoTheme;
 
 import eu.etaxonomy.cdm.model.common.IdentifiableEntity;
 import eu.etaxonomy.cdm.model.permission.CRUD;
-import eu.etaxonomy.cdm.service.FilterableStringRepresentationPagingProvider;
+import eu.etaxonomy.cdm.service.IFilterableStringRepresentationPagingProvider;
 import eu.etaxonomy.cdm.service.UserHelperAccess;
 import eu.etaxonomy.cdm.vaadin.component.ButtonFactory;
 import eu.etaxonomy.cdm.vaadin.event.NestedButtonStateUpdater;
@@ -59,7 +59,7 @@ public class WeaklyRelatedEntityCombobox<V extends IdentifiableEntity<?>> extend
 
     private WeaklyRelatedEntityButtonUpdater buttonUpdater;
 
-    private FilterableStringRepresentationPagingProvider<UUID> filterablePagingProvider;
+    private IFilterableStringRepresentationPagingProvider<UUID> filterablePagingProvider;
 
     public WeaklyRelatedEntityCombobox(String caption, Class<V> type){
         this.type = type;
@@ -132,7 +132,7 @@ public class WeaklyRelatedEntityCombobox<V extends IdentifiableEntity<?>> extend
      */
     public void loadFrom(FilterablePagingProvider<String> filterablePagingProvider, FilterableCountProvider filterableCountProvider, int pageLength) {
 
-        this.filterablePagingProvider = (FilterableStringRepresentationPagingProvider<UUID>) filterablePagingProvider;
+        this.filterablePagingProvider = (IFilterableStringRepresentationPagingProvider<UUID>) filterablePagingProvider;
         lazySelect.loadFrom(filterablePagingProvider, filterableCountProvider, pageLength);
         buttonUpdater.updateButtons(getValue());
     }
index 255c1a489f185d364fc56b17daf71181f75606a5..70a3899285914e986bdc5fcd3044cf109d97044d 100644 (file)
@@ -17,7 +17,6 @@ import com.vaadin.ui.AbstractField;
  * user to perform the <code>action</code> transported with this event.
  *
  * @author a.kohlbecker
- *
  */
 public class EntityEditorActionEvent<T>  {
 
@@ -26,23 +25,12 @@ public class EntityEditorActionEvent<T>  {
     private AbstractField<T> field;
     private T bean;
 
-    /**
-     * @param type
-     * @param entityId
-     * @param field
-     */
     public EntityEditorActionEvent(EditorActionType action, Class<T> beanType, AbstractField<T> field) {
         this.action = action;
         this.beanType = beanType;
         this.field = field;
     }
 
-    /**
-     *
-     * @param type
-     * @param entityId
-     * @param field
-     */
     public EntityEditorActionEvent(EditorActionType action, Class<T> beanType, T bean, AbstractField<T> field) {
         this.action = action;
         this.beanType = beanType;
@@ -53,16 +41,10 @@ public class EntityEditorActionEvent<T>  {
         this.field = field;
     }
 
-    /**
-     * @return the beanType
-     */
     public Class<?> getBeanType() {
         return beanType;
     }
 
-    /**
-     * @return the action
-     */
     public EditorActionType getAction() {
         return action;
     }
@@ -74,11 +56,7 @@ public class EntityEditorActionEvent<T>  {
         return field;
     }
 
-    /**
-     * @return the bean
-     */
     public T getBean() {
         return bean;
     }
-
-}
+}
\ No newline at end of file
index 8b0395aa75b8ffaae8d62ba2b22fc84600039651..c77c91ed14ebbc66821e7761b1023b4244e97aad 100644 (file)
@@ -41,12 +41,13 @@ import eu.etaxonomy.vaadin.ui.view.PopupView;
  * @param <V>
  *            type of the view this presenter governs
  */
-public abstract class AbstractPresenter<V extends ApplicationView> implements Serializable, DisposableBean {
-
-    private static final Logger logger = LogManager.getLogger();
+public abstract class AbstractPresenter<V extends ApplicationView<?>>
+        implements Serializable, DisposableBean {
 
     private static final long serialVersionUID = 5260910510283481832L;
 
+    private static final Logger logger = LogManager.getLogger();
+
        private V view;
 
        protected V getView() {
index f7fbb23d09a24d797ba34b4da8e9ba7ae3c2da4a..bf2e7eec131a0becc5cce4a774c0535be546e30c 100644 (file)
@@ -104,7 +104,7 @@ public abstract class AbstractView<P extends AbstractPresenter> extends CustomCo
            return viewEventBus;
        }
 
-   @Override
+    @Override
     public void releaseResourcesOnAccessDenied() {
         getPresenter().onViewExit();
     }
index 2d14ef7361a9222a3e199f94e83f5e83ab075dce..e7ad2d322998001ede9e855e2f0eac3387c5afba 100644 (file)
@@ -4,6 +4,6 @@ package eu.etaxonomy.vaadin.mvp;
  * An interface to be implemented by the specific view interface definitions.
  * See https://dev.e-taxonomy.eu/redmine/projects/edit/wiki/VaadinNotes#Model-View-Presenter-MVP-Pattern
  */
-public interface ApplicationView<P extends AbstractPresenter> {
+public interface ApplicationView<P extends AbstractPresenter<?>> {
 
 }
index 74afbdfb8eb7c7a90ab0641653b68c4fe50837a6..1beb62f3edfaaec2340e895c2a09c1eb6008f217 100644 (file)
@@ -15,32 +15,18 @@ import java.lang.reflect.Method;
  *
  * @author a.kohlbecker
  * @since May 30, 2017
- *
  */
 public class ApplicationListenerPojoMethodAdapter extends ApplicationListenerMethodAdapter {
 
-    PojoEventListenerManager eventListenerManager = null;
-
     private Object o;
 
-    /**
-     * @param beanName
-     * @param targetClass
-     * @param method
-     */
     public ApplicationListenerPojoMethodAdapter(String beanName, Class<?> targetClass, Method method, Object o) {
         super(beanName, targetClass, method);
         this.o = o;
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     protected Object getTargetBean() {
         return o;
     }
-
-
-
-}
+}
\ No newline at end of file
index 15f3811231ac18271a4176f4e4a0214a1290a2f5..74646c9490bd68315a34288f5365b09ecaaf6ed9 100644 (file)
@@ -89,12 +89,8 @@ public class DefaultPojoEventListenerManager implements PojoEventListenerManager
         listenerMap.get(o).add(applicationListener);
     }
 
-    /**
-     * {@inheritDoc}
-     */
     @Override
     public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
         this.applicationContext = applicationContext;
     }
-
-}
+}
\ No newline at end of file
index 13f5510a47f936ed8a955f4d21a1f15c92132c4b..cea93b3a72f479c283062e453f5a44398f9a32e9 100644 (file)
@@ -11,12 +11,10 @@ package org.springframework.context.event;
 /**
  * @author a.kohlbecker
  * @since May 29, 2017
- *
  */
 public interface PojoEventListenerManager {
 
-    void removeEventListeners(Object o);
+    public void removeEventListeners(Object o);
 
-    void addEventListeners(Object o);
-
-}
+    public void addEventListeners(Object o);
+}
\ No newline at end of file