diff --git a/client-skeleton-consumer/.classpath b/client-skeleton-consumer/.classpath index fb22b95..cd04a79 100644 --- a/client-skeleton-consumer/.classpath +++ b/client-skeleton-consumer/.classpath @@ -21,17 +21,6 @@ - - - - - - - - - - - diff --git a/client-skeleton-consumer/pom.xml b/client-skeleton-consumer/pom.xml index 5c3607e..324316b 100644 --- a/client-skeleton-consumer/pom.xml +++ b/client-skeleton-consumer/pom.xml @@ -2,9 +2,9 @@ 4.0.0 - eu.arrowhead - client-skeleton - 4.3.0.0 + eu.arrowhead + application-skeleton-java-spring + 4.4.0.0 arrowhead-client-skeleton-consumer diff --git a/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/ConsumerApplicationInitListener.java b/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/ConsumerApplicationInitListener.java index 74158b6..cfdc571 100644 --- a/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/ConsumerApplicationInitListener.java +++ b/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/ConsumerApplicationInitListener.java @@ -6,8 +6,8 @@ import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component; -import eu.arrowhead.client.library.ArrowheadService; -import eu.arrowhead.client.library.config.ApplicationInitListener; +import ai.aitia.arrowhead.application.library.ArrowheadService; +import ai.aitia.arrowhead.application.library.config.ApplicationInitListener; import eu.arrowhead.common.core.CoreSystem; @Component @@ -29,7 +29,7 @@ public class ConsumerApplicationInitListener extends ApplicationInitListener { protected void customInit(final ContextRefreshedEvent event) { //Checking the availability of necessary core systems - checkCoreSystemReachability(CoreSystem.SERVICE_REGISTRY); + checkCoreSystemReachability(CoreSystem.SERVICEREGISTRY); checkCoreSystemReachability(CoreSystem.ORCHESTRATOR); diff --git a/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/ConsumerMain.java b/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/ConsumerMain.java index a1caa1b..af8b2fe 100644 --- a/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/ConsumerMain.java +++ b/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/ConsumerMain.java @@ -10,7 +10,7 @@ import org.springframework.context.annotation.ComponentScan; import org.springframework.http.HttpMethod; -import eu.arrowhead.client.library.ArrowheadService; +import ai.aitia.arrowhead.application.library.ArrowheadService; import eu.arrowhead.common.CommonConstants; import eu.arrowhead.common.dto.shared.OrchestrationFlags.Flag; import eu.arrowhead.common.dto.shared.OrchestrationFormRequestDTO; diff --git a/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/security/ConsumerSecurityConfig.java b/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/security/ConsumerSecurityConfig.java index 2618e39..009645a 100644 --- a/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/security/ConsumerSecurityConfig.java +++ b/client-skeleton-consumer/src/main/java/eu/arrowhead/client/skeleton/consumer/security/ConsumerSecurityConfig.java @@ -4,7 +4,7 @@ import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; -import eu.arrowhead.client.library.config.DefaultSecurityConfig; +import ai.aitia.arrowhead.application.library.config.DefaultSecurityConfig; @Configuration @ConditionalOnWebApplication diff --git a/client-skeleton-consumer/src/main/resources/application.properties b/client-skeleton-consumer/src/main/resources/application.properties index 014329d..492c239 100644 --- a/client-skeleton-consumer/src/main/resources/application.properties +++ b/client-skeleton-consumer/src/main/resources/application.properties @@ -27,7 +27,7 @@ server.ssl.enabled=true server.ssl.key-store-type=PKCS12 server.ssl.key-store=classpath:certificates/consumer_skeleton.p12 server.ssl.key-store-password=123456 -server.ssl.key-alias=consumerskeleton +server.ssl.key-alias=consumer_skeleton server.ssl.key-password=123456 server.ssl.client-auth=need server.ssl.trust-store-type=PKCS12 diff --git a/client-skeleton-provider/.classpath b/client-skeleton-provider/.classpath index fb22b95..cd04a79 100644 --- a/client-skeleton-provider/.classpath +++ b/client-skeleton-provider/.classpath @@ -21,17 +21,6 @@ - - - - - - - - - - - diff --git a/client-skeleton-provider/pom.xml b/client-skeleton-provider/pom.xml index 643438d..367ca50 100644 --- a/client-skeleton-provider/pom.xml +++ b/client-skeleton-provider/pom.xml @@ -2,9 +2,9 @@ 4.0.0 - eu.arrowhead - client-skeleton - 4.3.0.0 + eu.arrowhead + application-skeleton-java-spring + 4.4.0.0 arrowhead-client-skeleton-provider diff --git a/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/ProviderApplicationInitListener.java b/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/ProviderApplicationInitListener.java index f92a44b..0b894b1 100644 --- a/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/ProviderApplicationInitListener.java +++ b/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/ProviderApplicationInitListener.java @@ -15,9 +15,9 @@ import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component; -import eu.arrowhead.client.library.ArrowheadService; -import eu.arrowhead.client.library.config.ApplicationInitListener; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.ArrowheadService; +import ai.aitia.arrowhead.application.library.config.ApplicationInitListener; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.client.skeleton.provider.security.ProviderSecurityConfig; import eu.arrowhead.common.CommonConstants; import eu.arrowhead.common.Utilities; @@ -36,7 +36,7 @@ public class ProviderApplicationInitListener extends ApplicationInitListener { @Autowired private ProviderSecurityConfig providerSecurityConfig; - @Value(ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) + @Value(ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) private boolean tokenSecurityFilterEnabled; @Value(CommonConstants.$SERVER_SSL_ENABLED_WD) @@ -52,7 +52,7 @@ public class ProviderApplicationInitListener extends ApplicationInitListener { protected void customInit(final ContextRefreshedEvent event) { //Checking the availability of necessary core systems - checkCoreSystemReachability(CoreSystem.SERVICE_REGISTRY); + checkCoreSystemReachability(CoreSystem.SERVICEREGISTRY); if (sslEnabled && tokenSecurityFilterEnabled) { checkCoreSystemReachability(CoreSystem.AUTHORIZATION); diff --git a/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/security/ProviderAccessControlFilter.java b/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/security/ProviderAccessControlFilter.java index e2395d2..0a0575a 100644 --- a/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/security/ProviderAccessControlFilter.java +++ b/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/security/ProviderAccessControlFilter.java @@ -5,12 +5,12 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.stereotype.Component; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.common.CommonConstants; import eu.arrowhead.common.security.AccessControlFilter; @Component -@ConditionalOnExpression(CommonConstants.$SERVER_SSL_ENABLED_WD + " and !" + ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) +@ConditionalOnExpression(CommonConstants.$SERVER_SSL_ENABLED_WD + " and !" + ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) public class ProviderAccessControlFilter extends AccessControlFilter { @Override diff --git a/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/security/ProviderSecurityConfig.java b/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/security/ProviderSecurityConfig.java index 08cdca2..e004a22 100644 --- a/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/security/ProviderSecurityConfig.java +++ b/client-skeleton-provider/src/main/java/eu/arrowhead/client/skeleton/provider/security/ProviderSecurityConfig.java @@ -6,9 +6,8 @@ import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter; -import eu.arrowhead.client.library.config.DefaultSecurityConfig; -import eu.arrowhead.client.library.util.ClientCommonConstants; -import eu.arrowhead.common.CommonConstants; +import ai.aitia.arrowhead.application.library.config.DefaultSecurityConfig; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; @Configuration @EnableWebSecurity @@ -17,7 +16,7 @@ public class ProviderSecurityConfig extends DefaultSecurityConfig { //================================================================================================= // members - @Value(ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) + @Value(ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) private boolean tokenSecurityFilterEnabled; private ProviderTokenSecurityFilter tokenSecurityFilter; diff --git a/client-skeleton-provider/src/main/resources/application.properties b/client-skeleton-provider/src/main/resources/application.properties index 7e8b8a9..10d38a8 100644 --- a/client-skeleton-provider/src/main/resources/application.properties +++ b/client-skeleton-provider/src/main/resources/application.properties @@ -30,7 +30,7 @@ token.security.filter.enabled=true server.ssl.key-store-type=PKCS12 server.ssl.key-store=classpath:certificates/provider_skeleton.p12 server.ssl.key-store-password=123456 -server.ssl.key-alias=providerskeleton +server.ssl.key-alias=provider_skeleton server.ssl.key-password=123456 server.ssl.client-auth=need server.ssl.trust-store-type=PKCS12 diff --git a/client-skeleton-publisher/.classpath b/client-skeleton-publisher/.classpath index 8690355..920da3a 100644 --- a/client-skeleton-publisher/.classpath +++ b/client-skeleton-publisher/.classpath @@ -16,17 +16,6 @@ - - - - - - - - - - - diff --git a/client-skeleton-publisher/pom.xml b/client-skeleton-publisher/pom.xml index 24ad1ef..e27bb35 100644 --- a/client-skeleton-publisher/pom.xml +++ b/client-skeleton-publisher/pom.xml @@ -2,9 +2,9 @@ 4.0.0 - eu.arrowhead - client-skeleton - 4.3.0.0 + eu.arrowhead + application-skeleton-java-spring + 4.4.0.0 arrowhead-client-skeleton-publisher diff --git a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/PublisherApplicationInitListener.java b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/PublisherApplicationInitListener.java index 807c971..9cd475b 100644 --- a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/PublisherApplicationInitListener.java +++ b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/PublisherApplicationInitListener.java @@ -18,9 +18,9 @@ import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component; -import eu.arrowhead.client.library.ArrowheadService; -import eu.arrowhead.client.library.config.ApplicationInitListener; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.ArrowheadService; +import ai.aitia.arrowhead.application.library.config.ApplicationInitListener; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.client.skeleton.publisher.constants.PublisherConstants; import eu.arrowhead.client.skeleton.publisher.event.PresetEventType; import eu.arrowhead.client.skeleton.publisher.security.PublisherSecurityConfig; @@ -43,19 +43,19 @@ public class PublisherApplicationInitListener extends ApplicationInitListener { @Autowired private PublisherSecurityConfig publisherSecurityConfig; - @Value(ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) + @Value(ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) private boolean tokenSecurityFilterEnabled; @Value(CommonConstants.$SERVER_SSL_ENABLED_WD) private boolean sslEnabled; - @Value(ClientCommonConstants.$CLIENT_SYSTEM_NAME) + @Value(ApplicationCommonConstants.$APPLICATION_SYSTEM_NAME) private String clientSystemName; - @Value(ClientCommonConstants.$CLIENT_SERVER_ADDRESS_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_ADDRESS_WD) private String clientSystemAddress; - @Value(ClientCommonConstants.$CLIENT_SERVER_PORT_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_PORT_WD) private int clientSystemPort; private final Logger logger = LogManager.getLogger(PublisherApplicationInitListener.class); @@ -68,7 +68,7 @@ public class PublisherApplicationInitListener extends ApplicationInitListener { protected void customInit(final ContextRefreshedEvent event) { //Checking the availability of necessary core systems - checkCoreSystemReachability(CoreSystem.SERVICE_REGISTRY); + checkCoreSystemReachability(CoreSystem.SERVICEREGISTRY); if (sslEnabled && tokenSecurityFilterEnabled) { checkCoreSystemReachability(CoreSystem.AUTHORIZATION); @@ -82,9 +82,9 @@ protected void customInit(final ContextRefreshedEvent event) { logger.info("TokenSecurityFilter in not active"); } - if ( arrowheadService.echoCoreSystem(CoreSystem.EVENT_HANDLER) ) { + if ( arrowheadService.echoCoreSystem(CoreSystem.EVENTHANDLER) ) { - arrowheadService.updateCoreServiceURIs(CoreSystem.EVENT_HANDLER); + arrowheadService.updateCoreServiceURIs(CoreSystem.EVENTHANDLER); publishInitStartedEvent(); } diff --git a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/PublisherMain.java b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/PublisherMain.java index 8bbe034..5f46f4a 100644 --- a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/PublisherMain.java +++ b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/PublisherMain.java @@ -14,8 +14,8 @@ import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; -import eu.arrowhead.client.library.ArrowheadService; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.ArrowheadService; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.client.skeleton.publisher.constants.PublisherConstants; import eu.arrowhead.client.skeleton.publisher.event.PresetEventType; import eu.arrowhead.common.CommonConstants; @@ -30,13 +30,13 @@ public class PublisherMain implements ApplicationRunner { //================================================================================================= // members - @Value(ClientCommonConstants.$CLIENT_SYSTEM_NAME) + @Value(ApplicationCommonConstants.$APPLICATION_SYSTEM_NAME) private String clientSystemName; - @Value(ClientCommonConstants.$CLIENT_SERVER_ADDRESS_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_ADDRESS_WD) private String clientSystemAddress; - @Value(ClientCommonConstants.$CLIENT_SERVER_PORT_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_PORT_WD) private int clientSystemPort; @Value(CommonConstants.$SERVER_SSL_ENABLED_WD) diff --git a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/security/PublisherAccessControlFilter.java b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/security/PublisherAccessControlFilter.java index c6aaf88..daaf1ac 100644 --- a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/security/PublisherAccessControlFilter.java +++ b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/security/PublisherAccessControlFilter.java @@ -5,12 +5,12 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.stereotype.Component; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.common.CommonConstants; import eu.arrowhead.common.security.AccessControlFilter; @Component -@ConditionalOnExpression(CommonConstants.$SERVER_SSL_ENABLED_WD + " and !" + ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) +@ConditionalOnExpression(CommonConstants.$SERVER_SSL_ENABLED_WD + " and !" + ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) public class PublisherAccessControlFilter extends AccessControlFilter { @Override diff --git a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/security/PublisherSecurityConfig.java b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/security/PublisherSecurityConfig.java index 37fb9ca..972adce 100644 --- a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/security/PublisherSecurityConfig.java +++ b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/security/PublisherSecurityConfig.java @@ -6,8 +6,8 @@ import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter; -import eu.arrowhead.client.library.config.DefaultSecurityConfig; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.config.DefaultSecurityConfig; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; @Configuration @EnableWebSecurity @@ -16,7 +16,7 @@ public class PublisherSecurityConfig extends DefaultSecurityConfig { //================================================================================================= // members - @Value(ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) + @Value(ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) private boolean tokenSecurityFilterEnabled; private PublisherTokenSecurityFilter tokenSecurityFilter; diff --git a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/service/PublisherService.java b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/service/PublisherService.java index a23cfe3..4057228 100644 --- a/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/service/PublisherService.java +++ b/client-skeleton-publisher/src/main/java/eu/arrowhead/client/skeleton/publisher/service/PublisherService.java @@ -10,8 +10,8 @@ import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; -import eu.arrowhead.client.library.ArrowheadService; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.ArrowheadService; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.client.skeleton.publisher.PublisherApplicationInitListener; import eu.arrowhead.client.skeleton.publisher.event.PresetEventType; import eu.arrowhead.common.CommonConstants; @@ -24,13 +24,13 @@ public class PublisherService { //================================================================================================= // members - @Value(ClientCommonConstants.$CLIENT_SYSTEM_NAME) + @Value(ApplicationCommonConstants.$APPLICATION_SYSTEM_NAME) private String clientSystemName; - @Value(ClientCommonConstants.$CLIENT_SERVER_ADDRESS_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_ADDRESS_WD) private String clientSystemAddress; - @Value(ClientCommonConstants.$CLIENT_SERVER_PORT_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_PORT_WD) private int clientSystemPort; @Value(CommonConstants.$SERVER_SSL_ENABLED_WD) diff --git a/client-skeleton-subscriber/.classpath b/client-skeleton-subscriber/.classpath index fb22b95..cd04a79 100644 --- a/client-skeleton-subscriber/.classpath +++ b/client-skeleton-subscriber/.classpath @@ -21,17 +21,6 @@ - - - - - - - - - - - diff --git a/client-skeleton-subscriber/pom.xml b/client-skeleton-subscriber/pom.xml index 04c0908..38635f2 100644 --- a/client-skeleton-subscriber/pom.xml +++ b/client-skeleton-subscriber/pom.xml @@ -2,9 +2,9 @@ 4.0.0 - eu.arrowhead - client-skeleton - 4.3.0.0 + eu.arrowhead + application-skeleton-java-spring + 4.4.0.0 arrowhead-client-skeleton-subscriber diff --git a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/SubscriberApplicationInitListener.java b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/SubscriberApplicationInitListener.java index 0f273cc..09466a6 100644 --- a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/SubscriberApplicationInitListener.java +++ b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/SubscriberApplicationInitListener.java @@ -17,9 +17,9 @@ import org.springframework.context.event.ContextRefreshedEvent; import org.springframework.stereotype.Component; -import eu.arrowhead.client.library.ArrowheadService; -import eu.arrowhead.client.library.config.ApplicationInitListener; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.ArrowheadService; +import ai.aitia.arrowhead.application.library.config.ApplicationInitListener; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.client.skeleton.subscriber.security.SubscriberSecurityConfig; import eu.arrowhead.common.CommonConstants; import eu.arrowhead.common.Utilities; @@ -40,19 +40,19 @@ public class SubscriberApplicationInitListener extends ApplicationInitListener { @Autowired private SubscriberSecurityConfig subscriberSecurityConfig; - @Value(ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) + @Value(ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) private boolean tokenSecurityFilterEnabled; @Value(CommonConstants.$SERVER_SSL_ENABLED_WD) private boolean sslEnabled; - @Value(ClientCommonConstants.$CLIENT_SYSTEM_NAME) + @Value(ApplicationCommonConstants.$APPLICATION_SYSTEM_NAME) private String clientSystemName; - @Value(ClientCommonConstants.$CLIENT_SERVER_ADDRESS_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_ADDRESS_WD) private String clientSystemAddress; - @Value(ClientCommonConstants.$CLIENT_SERVER_PORT_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_PORT_WD) private int clientSystemPort; private final Logger logger = LogManager.getLogger(SubscriberApplicationInitListener.class); @@ -68,7 +68,7 @@ public class SubscriberApplicationInitListener extends ApplicationInitListener { protected void customInit(final ContextRefreshedEvent event) { //Checking the availability of necessary core systems - checkCoreSystemReachability(CoreSystem.SERVICE_REGISTRY); + checkCoreSystemReachability(CoreSystem.SERVICEREGISTRY); checkCoreSystemReachability(CoreSystem.ORCHESTRATOR); arrowheadService.updateCoreServiceURIs(CoreSystem.ORCHESTRATOR); @@ -92,8 +92,8 @@ protected void customInit(final ContextRefreshedEvent event) { } - if ( arrowheadService.echoCoreSystem(CoreSystem.EVENT_HANDLER)) { - arrowheadService.updateCoreServiceURIs(CoreSystem.EVENT_HANDLER); + if ( arrowheadService.echoCoreSystem(CoreSystem.EVENTHANDLER)) { + arrowheadService.updateCoreServiceURIs(CoreSystem.EVENTHANDLER); subscribeToPresetEvents(); } diff --git a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/SubscriberMain.java b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/SubscriberMain.java index 8b704cb..2435b5a 100644 --- a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/SubscriberMain.java +++ b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/SubscriberMain.java @@ -14,8 +14,8 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.context.annotation.ComponentScan; -import eu.arrowhead.client.library.ArrowheadService; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.ArrowheadService; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.client.skeleton.subscriber.constants.SubscriberConstants; import eu.arrowhead.common.CommonConstants; import eu.arrowhead.common.dto.shared.SystemRequestDTO; @@ -32,13 +32,13 @@ public class SubscriberMain implements ApplicationRunner { @Value( SubscriberConstants.$PRESET_EVENT_TYPES_WD ) private String presetEvents; - @Value(ClientCommonConstants.$CLIENT_SYSTEM_NAME) + @Value(ApplicationCommonConstants.$APPLICATION_SYSTEM_NAME) private String clientSystemName; - @Value(ClientCommonConstants.$CLIENT_SERVER_ADDRESS_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_ADDRESS_WD) private String clientSystemAddress; - @Value(ClientCommonConstants.$CLIENT_SERVER_PORT_WD) + @Value(ApplicationCommonConstants.$APPLICATION_SERVER_PORT_WD) private int clientSystemPort; @Value(CommonConstants.$SERVER_SSL_ENABLED_WD) diff --git a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberAccessControlFilter.java b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberAccessControlFilter.java index dbd207c..7e8ee0f 100644 --- a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberAccessControlFilter.java +++ b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberAccessControlFilter.java @@ -5,12 +5,12 @@ import org.springframework.boot.autoconfigure.condition.ConditionalOnExpression; import org.springframework.stereotype.Component; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.common.CommonConstants; import eu.arrowhead.common.security.AccessControlFilter; @Component -@ConditionalOnExpression(CommonConstants.$SERVER_SSL_ENABLED_WD + " and !" + ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) +@ConditionalOnExpression(CommonConstants.$SERVER_SSL_ENABLED_WD + " and !" + ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) public class SubscriberAccessControlFilter extends AccessControlFilter { @Override diff --git a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberNotificationAccessControlFilter.java b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberNotificationAccessControlFilter.java index ab21e18..da3b614 100644 --- a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberNotificationAccessControlFilter.java +++ b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberNotificationAccessControlFilter.java @@ -26,7 +26,7 @@ public class SubscriberNotificationAccessControlFilter extends ArrowheadFilter { //================================================================================================= // members - private static final CoreSystem[] allowedCoreSystemsForSendingNotification = { CoreSystem.EVENT_HANDLER }; + private static final CoreSystem[] allowedCoreSystemsForSendingNotification = { CoreSystem.EVENTHANDLER }; private Map eventTypeMap; private String serverCN; diff --git a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberSecurityConfig.java b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberSecurityConfig.java index 41f0013..a9f0382 100644 --- a/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberSecurityConfig.java +++ b/client-skeleton-subscriber/src/main/java/eu/arrowhead/client/skeleton/subscriber/security/SubscriberSecurityConfig.java @@ -6,8 +6,8 @@ import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter; -import eu.arrowhead.client.library.config.DefaultSecurityConfig; -import eu.arrowhead.client.library.util.ClientCommonConstants; +import ai.aitia.arrowhead.application.library.config.DefaultSecurityConfig; +import ai.aitia.arrowhead.application.library.util.ApplicationCommonConstants; import eu.arrowhead.common.CommonConstants; @Configuration @@ -17,7 +17,7 @@ public class SubscriberSecurityConfig extends DefaultSecurityConfig { //================================================================================================= // members - @Value(ClientCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) + @Value(ApplicationCommonConstants.$TOKEN_SECURITY_FILTER_ENABLED_WD) private boolean tokenSecurityFilterEnabled; @Value(CommonConstants.$SERVER_SSL_ENABLED_WD) diff --git a/pom.xml b/pom.xml index 09e6fb0..11ad742 100644 --- a/pom.xml +++ b/pom.xml @@ -9,17 +9,17 @@ eu.arrowhead - client-skeleton - 4.3.0.0 + application-skeleton-java-spring + 4.4.0.0 pom - client-skeleton-java-spring - Arrowhead Client Skeleton using Spring Boot + application-skeleton-java-spring + Arrowhead Application Skeleton using Spring Boot https://github.com/arrowhead-f/client-java-spring - Apache License, Version 2.0 - https://www.apache.org/licenses/LICENSE-2.0.txt + Eclipse Public License - v 2.0 + https://www.eclipse.org/org/documents/epl-2.0/EPL-2.0.txt @@ -29,12 +29,19 @@ client-skeleton-subscriber client-skeleton-publisher - + + + + ossrh + https://s01.oss.sonatype.org/content/repositories/aiaitia-1016 + + + - eu.arrowhead - client-library - 4.3.0.0 + ai.aitia + arrowhead-application-library-java-spring + 4.4.0.0