Commit 98219a3e authored by Noel Alonso's avatar Noel Alonso
Browse files

Merge branch 'feature-refactoring' into 'dev'

Retorna a versión anterior por incompatibilidades

See merge request redmic-project/server/socket!11
parents 3ebb608a 7f76d1f5
Loading
Loading
Loading
Loading
+9 −16
Original line number Diff line number Diff line
@@ -18,10 +18,10 @@

	<properties>
		<!-- REDMIC -->
		<redmic.broker-lib.version>0.10.0</redmic.broker-lib.version>
		<redmic.exceptions.version>0.6.0</redmic.exceptions.version>
		<redmic.utils.version>0.6.0</redmic.utils.version>
		<redmic.test-utils.version>0.8.0</redmic.test-utils.version>
		<redmic.broker-lib.version>0.11.0</redmic.broker-lib.version>
		<redmic.exceptions.version>0.10.0</redmic.exceptions.version>
		<redmic.utils.version>0.10.0-feature-changeJtsVersion</redmic.utils.version>
		<redmic.test-utils.version>0.10.0-feature-refactoring</redmic.test-utils.version>

		<!-- OTHER -->
		<spring-security-oauth2.version>2.3.0.RELEASE</spring-security-oauth2.version>
@@ -130,18 +130,11 @@
			<plugin>
				<groupId>org.springframework.boot</groupId>
				<artifactId>spring-boot-maven-plugin</artifactId>
				<executions>
					<execution>
						<goals>
							<goal>repackage</goal>
						</goals>
				<configuration>
					<executable>true</executable>
					<finalName>socket</finalName>
					<outputDirectory>dist</outputDirectory>
				</configuration>
					</execution>
				</executions>
			</plugin>
			<plugin>
				<groupId>org.apache.maven.plugins</groupId>
+0 −60
Original line number Diff line number Diff line
package es.redmic.socket.ingest.geodata.area;

/*-
 * #%L
 * socket
 * %%
 * Copyright (C) 2019 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.messaging.Message;
import org.springframework.messaging.handler.annotation.DestinationVariable;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;

import es.redmic.brokerlib.avro.common.MessageWrapper;
import es.redmic.socket.common.controller.BaseSocketController;

@Controller
public class IngestDataAreaController extends BaseSocketController {

	@Value("${broker.topic.task.ingest.area.run}")
	private String RUN_TOPIC;

	@Value("${broker.topic.task.ingest.area.resume}")
	private String RESUME_TOPIC;

	@Autowired
	public IngestDataAreaController() {
	}

	@MessageMapping("${socket.topic.task.ingest.area.run}")
	public void register(Message<byte[]> message) {

		publishToBroker(RUN_TOPIC, getMessageWrapper(message));
	}

	@MessageMapping("${socket.topic.task.ingest.area.resume}")
	public void resume(Message<byte[]> message, @DestinationVariable String taskId) {

		MessageWrapper messageWrapper = getMessageWrapper(message);
		messageWrapper.setActionId(taskId);

		publishToBroker(RESUME_TOPIC, messageWrapper);
	}
}
+0 −60
Original line number Diff line number Diff line
package es.redmic.socket.ingest.geodata.tracking;

/*-
 * #%L
 * socket
 * %%
 * Copyright (C) 2019 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.messaging.Message;
import org.springframework.messaging.handler.annotation.DestinationVariable;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;

import es.redmic.brokerlib.avro.common.MessageWrapper;
import es.redmic.socket.common.controller.BaseSocketController;

@Controller
public class IngestDataTrackingController extends BaseSocketController {

	@Value("${broker.topic.task.ingest.tracking.run}")
	private String RUN_TOPIC;

	@Value("${broker.topic.task.ingest.tracking.resume}")
	private String RESUME_TOPIC;

	@Autowired
	public IngestDataTrackingController() {
	}

	@MessageMapping("${socket.topic.task.ingest.tracking.run}")
	public void register(Message<byte[]> message) {

		publishToBroker(RUN_TOPIC, getMessageWrapper(message));
	}

	@MessageMapping("${socket.topic.task.ingest.tracking.resume}")
	public void resume(Message<byte[]> message, @DestinationVariable String taskId) {

		MessageWrapper messageWrapper = getMessageWrapper(message);
		messageWrapper.setActionId(taskId);

		publishToBroker(RESUME_TOPIC, messageWrapper);
	}
}
+0 −60
Original line number Diff line number Diff line
package es.redmic.socket.ingest.series.objectcollectingseries;

/*-
 * #%L
 * socket
 * %%
 * Copyright (C) 2019 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.messaging.Message;
import org.springframework.messaging.handler.annotation.DestinationVariable;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;

import es.redmic.brokerlib.avro.common.MessageWrapper;
import es.redmic.socket.common.controller.BaseSocketController;

@Controller
public class IngestDataObjectCollectingSeriesController extends BaseSocketController {

	@Value("${broker.topic.task.ingest.objectcollectingseries.run}")
	private String RUN_TOPIC;

	@Value("${broker.topic.task.ingest.objectcollectingseries.resume}")
	private String RESUME_TOPIC;

	@Autowired
	public IngestDataObjectCollectingSeriesController() {
	}

	@MessageMapping("${socket.topic.task.ingest.objectcollectingseries.run}")
	public void register(Message<byte[]> message) {

		publishToBroker(RUN_TOPIC, getMessageWrapper(message));
	}

	@MessageMapping("${socket.topic.task.ingest.objectcollectingseries.resume}")
	public void resume(Message<byte[]> message, @DestinationVariable String taskId) {

		MessageWrapper messageWrapper = getMessageWrapper(message);
		messageWrapper.setActionId(taskId);

		publishToBroker(RESUME_TOPIC, messageWrapper);
	}
}
+0 −60
Original line number Diff line number Diff line
package es.redmic.socket.ingest.series.timeseries;

/*-
 * #%L
 * socket
 * %%
 * Copyright (C) 2019 REDMIC Project / Server
 * %%
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 *      http://www.apache.org/licenses/LICENSE-2.0
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 * #L%
 */

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.messaging.Message;
import org.springframework.messaging.handler.annotation.DestinationVariable;
import org.springframework.messaging.handler.annotation.MessageMapping;
import org.springframework.stereotype.Controller;

import es.redmic.brokerlib.avro.common.MessageWrapper;
import es.redmic.socket.common.controller.BaseSocketController;

@Controller
public class IngestDataTimeSeriesController extends BaseSocketController {

	@Value("${broker.topic.task.ingest.timeseries.run}")
	private String RUN_TOPIC;

	@Value("${broker.topic.task.ingest.timeseries.resume}")
	private String RESUME_TOPIC;

	@Autowired
	public IngestDataTimeSeriesController() {
	}

	@MessageMapping("${socket.topic.task.ingest.timeseries.run}")
	public void register(Message<byte[]> message) {

		publishToBroker(RUN_TOPIC, getMessageWrapper(message));
	}

	@MessageMapping("${socket.topic.task.ingest.timeseries.resume}")
	public void resume(Message<byte[]> message, @DestinationVariable String taskId) {

		MessageWrapper messageWrapper = getMessageWrapper(message);
		messageWrapper.setActionId(taskId);

		publishToBroker(RESUME_TOPIC, messageWrapper);
	}
}
Loading