Loading .gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ !.env **/target */dist *.versionsBackup atlas-commands/pom.xml +6 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ <parent> <groupId>es.redmic.atlas</groupId> <artifactId>atlas</artifactId> <version>0.2.0</version> <version>0.3.0</version> </parent> <modelVersion>4.0.0</modelVersion> Loading Loading @@ -113,6 +113,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <argLine>-Xmx2048m -XX:MaxPermSize=512m</argLine> <includes> <include>**/Test*.java</include> <include>**/*Test.java</include> Loading atlas-commands/src/main/java/es/redmic/atlascommands/aggregate/LayerAggregate.java +4 −2 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ public class LayerAggregate extends Aggregate { LayerEvent evt; cmd.getLayer().setInserted(this.getLayer().getInserted()); if (cmd.getLayer().getThemeInspire() != null) { evt = new EnrichUpdateLayerEvent(cmd.getLayer()); } else { Loading atlas-commands/src/main/java/es/redmic/atlascommands/config/Oauth2SecurityConfiguration.java +17 −11 Original line number Diff line number Diff line Loading @@ -44,9 +44,6 @@ public class Oauth2SecurityConfiguration { http.authorizeRequests() .antMatchers(HttpMethod.POST, "/discover-layers/**").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.DELETE, "/**/settings/**").access( "#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); http.authorizeRequests().antMatchers(HttpMethod.POST, "/**/settings/select").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/select/**").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/deselect/**").permitAll(); Loading @@ -54,6 +51,15 @@ public class Oauth2SecurityConfiguration { http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/clone/**").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.OPTIONS, "/**/settings/**").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.DELETE, "/**/settings/**").access( "#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); http.authorizeRequests().antMatchers(HttpMethod.POST, "/**/settings/").access( "#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/*").access( "#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); http.authorizeRequests().antMatchers(HttpMethod.POST, "/**").access( "#oauth2.hasScope('write') and " + "hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR')"); Loading atlas-commands/src/main/java/es/redmic/atlascommands/mapper/LayerInfoDTOMapper.java +13 −3 Original line number Diff line number Diff line package es.redmic.atlascommands.mapper; import java.util.List; /*- * #%L * Atlas-management Loading @@ -22,8 +24,10 @@ package es.redmic.atlascommands.mapper; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Named; import org.mapstruct.NullValuePropertyMappingStrategy; import es.redmic.atlaslib.dto.layer.LayerActivityDTO; import es.redmic.atlaslib.dto.layer.LayerDTO; import es.redmic.atlaslib.dto.layerinfo.LayerInfoDTO; import es.redmic.atlaslib.dto.layerwms.LayerWMSDTO; Loading @@ -37,7 +41,13 @@ public interface LayerInfoDTOMapper { @Mapping(target = "alias", expression = "java(layerInfoDTO.getAlias() != null ? " + "layerInfoDTO.getAlias() : (layerDTO.getTitle() != null ? layerDTO.getTitle() : layerDTO.getName()))") @Mapping(source = "layerInfoDTO", target = "relatedActivities", qualifiedByName = "relatedActivities") LayerDTO map(LayerInfoDTO layerInfoDTO, LayerWMSDTO layerWMSDTO); @Named("relatedActivities") default List<LayerActivityDTO> getRelatedActivities(LayerInfoDTO value) { return value.getRelatedActivities(); } // @formatter:on } Loading
.gitignore +1 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,4 @@ !.env **/target */dist *.versionsBackup
atlas-commands/pom.xml +6 −5 Original line number Diff line number Diff line Loading @@ -6,7 +6,7 @@ <parent> <groupId>es.redmic.atlas</groupId> <artifactId>atlas</artifactId> <version>0.2.0</version> <version>0.3.0</version> </parent> <modelVersion>4.0.0</modelVersion> Loading Loading @@ -113,6 +113,7 @@ <groupId>org.apache.maven.plugins</groupId> <artifactId>maven-surefire-plugin</artifactId> <configuration> <argLine>-Xmx2048m -XX:MaxPermSize=512m</argLine> <includes> <include>**/Test*.java</include> <include>**/*Test.java</include> Loading
atlas-commands/src/main/java/es/redmic/atlascommands/aggregate/LayerAggregate.java +4 −2 Original line number Diff line number Diff line Loading @@ -99,6 +99,8 @@ public class LayerAggregate extends Aggregate { LayerEvent evt; cmd.getLayer().setInserted(this.getLayer().getInserted()); if (cmd.getLayer().getThemeInspire() != null) { evt = new EnrichUpdateLayerEvent(cmd.getLayer()); } else { Loading
atlas-commands/src/main/java/es/redmic/atlascommands/config/Oauth2SecurityConfiguration.java +17 −11 Original line number Diff line number Diff line Loading @@ -44,9 +44,6 @@ public class Oauth2SecurityConfiguration { http.authorizeRequests() .antMatchers(HttpMethod.POST, "/discover-layers/**").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.DELETE, "/**/settings/**").access( "#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); http.authorizeRequests().antMatchers(HttpMethod.POST, "/**/settings/select").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/select/**").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/deselect/**").permitAll(); Loading @@ -54,6 +51,15 @@ public class Oauth2SecurityConfiguration { http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/clone/**").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.OPTIONS, "/**/settings/**").permitAll(); http.authorizeRequests().antMatchers(HttpMethod.DELETE, "/**/settings/**").access( "#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); http.authorizeRequests().antMatchers(HttpMethod.POST, "/**/settings/").access( "#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); http.authorizeRequests().antMatchers(HttpMethod.PUT, "/**/settings/*").access( "#oauth2.hasScope('write') and hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR', 'ROLE_USER')"); http.authorizeRequests().antMatchers(HttpMethod.POST, "/**").access( "#oauth2.hasScope('write') and " + "hasAnyRole('ROLE_ADMINISTRATOR', 'ROLE_OAG', 'ROLE_COLLABORATOR')"); Loading
atlas-commands/src/main/java/es/redmic/atlascommands/mapper/LayerInfoDTOMapper.java +13 −3 Original line number Diff line number Diff line package es.redmic.atlascommands.mapper; import java.util.List; /*- * #%L * Atlas-management Loading @@ -22,8 +24,10 @@ package es.redmic.atlascommands.mapper; import org.mapstruct.Mapper; import org.mapstruct.Mapping; import org.mapstruct.Named; import org.mapstruct.NullValuePropertyMappingStrategy; import es.redmic.atlaslib.dto.layer.LayerActivityDTO; import es.redmic.atlaslib.dto.layer.LayerDTO; import es.redmic.atlaslib.dto.layerinfo.LayerInfoDTO; import es.redmic.atlaslib.dto.layerwms.LayerWMSDTO; Loading @@ -37,7 +41,13 @@ public interface LayerInfoDTOMapper { @Mapping(target = "alias", expression = "java(layerInfoDTO.getAlias() != null ? " + "layerInfoDTO.getAlias() : (layerDTO.getTitle() != null ? layerDTO.getTitle() : layerDTO.getName()))") @Mapping(source = "layerInfoDTO", target = "relatedActivities", qualifiedByName = "relatedActivities") LayerDTO map(LayerInfoDTO layerInfoDTO, LayerWMSDTO layerWMSDTO); @Named("relatedActivities") default List<LayerActivityDTO> getRelatedActivities(LayerInfoDTO value) { return value.getRelatedActivities(); } // @formatter:on }