added additional info to queue configutation
This commit is contained in:
parent
ee8c9deda9
commit
b6cbe0ca77
@ -52,6 +52,7 @@ public class Queue extends SearchTextBasedWithAdditionalInfo<QueueId> implements
|
||||
this.packProcessingTimeout = queueConfiguration.getPackProcessingTimeout();
|
||||
this.submitStrategy = queueConfiguration.getSubmitStrategy();
|
||||
this.processingStrategy = queueConfiguration.getProcessingStrategy();
|
||||
setAdditionalInfo(queueConfiguration.getAdditionalInfo());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@ -15,6 +15,7 @@
|
||||
*/
|
||||
package org.thingsboard.server.common.data.tenant.profile;
|
||||
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import lombok.Data;
|
||||
import org.thingsboard.server.common.data.queue.ProcessingStrategy;
|
||||
import org.thingsboard.server.common.data.queue.SubmitStrategy;
|
||||
@ -29,4 +30,5 @@ public class TenantProfileQueueConfiguration {
|
||||
private long packProcessingTimeout;
|
||||
private SubmitStrategy submitStrategy;
|
||||
private ProcessingStrategy processingStrategy;
|
||||
private JsonNode additionalInfo;
|
||||
}
|
||||
|
||||
@ -40,12 +40,12 @@ public class QueueValidator extends DataValidator<Queue> {
|
||||
|
||||
@Override
|
||||
protected void validateCreate(TenantId tenantId, Queue queue) {
|
||||
if (queueDao.findQueueByTenantIdAndTopic(tenantId, queue.getTopic()) != null) {
|
||||
throw new DataValidationException(String.format("Queue with topic: %s already exists!", queue.getTopic()));
|
||||
}
|
||||
if (queueDao.findQueueByTenantIdAndName(tenantId, queue.getName()) != null) {
|
||||
throw new DataValidationException(String.format("Queue with name: %s already exists!", queue.getName()));
|
||||
}
|
||||
if (queueDao.findQueueByTenantIdAndTopic(tenantId, queue.getTopic()) != null) {
|
||||
throw new DataValidationException(String.format("Queue with topic: %s already exists!", queue.getTopic()));
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user