本文整理汇总了Java中com.esri.ges.core.validation.ValidationException类的典型用法代码示例。如果您正苦于以下问题:Java ValidationException类的具体用法?Java ValidationException怎么用?Java ValidationException使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ValidationException类属于com.esri.ges.core.validation包,在下文中一共展示了ValidationException类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public synchronized void validate() throws ValidationException
{
LOG.info("validate starts.................");
super.validate();
try
{
//srIn = SpatialReference.create(inwkid);
srBuffer = SpatialReference.create(procwkid);
srOut = SpatialReference.create(outwkid);
}
catch(Exception e)
{
ValidationException ve = new ValidationException("Invalid wkid");
LOG.error(e.getMessage());
LOG.error(ve.getMessage());
throw ve;
}
LOG.info("validate ends................");
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:24,代码来源:VisibilityProcessor.java
示例2: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException {
super.validate();
List<String> errors = new ArrayList<String>();
if (idleLimit <= 0)
errors.add(LOGGER.translate("VALIDATION_GAP_DURATION_INVALID",
definition.getName()));
if (errors.size() > 0) {
StringBuffer sb = new StringBuffer();
for (String message : errors)
sb.append(message).append("\n");
throw new ValidationException(LOGGER.translate("VALIDATION_ERROR",
this.getClass().getName(), sb.toString()));
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:17,代码来源:TrackIdleProcessor.java
示例3: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public synchronized void validate() throws ValidationException {
// Validation Phase ...
super.validate();
if (bufferEventFld == null) {
if (radius == null)
throw new ValidationException("Radius is not specified.");
if (radius <= 0)
throw new ValidationException("Radius must be greater than 0.");
} else if (bufferEventFld.trim().equals("")) {
if (radius == null)
throw new ValidationException("Radius is not specified.");
if (radius <= 0)
throw new ValidationException("Radius must be greater than 0.");
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:17,代码来源:BufferProcessor.java
示例4: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException
{
super.validate();
List<String> errors = new ArrayList<String>();
if (idleLimit <= 0)
errors.add(LOGGER.translate("VALIDATION_GAP_DURATION_INVALID", definition.getName()));
if (errors.size() > 0)
{
StringBuffer sb = new StringBuffer();
for (String message : errors)
sb.append(message).append("\n");
throw new ValidationException(LOGGER.translate("VALIDATION_ERROR", this.getClass().getName(), sb.toString()));
}
}
开发者ID:Esri,项目名称:track-idle-detector-for-geoevent,代码行数:17,代码来源:TrackIdleDetector.java
示例5: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public synchronized void validate() throws ValidationException {
try
{
super.validate();
}
catch(Exception e)
{
LOG.error(e.getMessage());
}
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:12,代码来源:BearingProcessor.java
示例6: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException {
super.validate();
if (zkConnect == null || zkConnect.isEmpty())
throw new ValidationException(LOGGER.translate("ZKCONNECT_VALIDATE_ERROR"));
if (bootstrap == null || bootstrap.isEmpty())
throw new ValidationException(LOGGER.translate("BOOTSTRAP_VALIDATE_ERROR"));
if (topic == null || topic.isEmpty())
throw new ValidationException(LOGGER.translate("TOPIC_VALIDATE_ERROR"));
ZkClient zkClient = new ZkClient(zkConnect, 10000, 8000, ZKStringSerializer$.MODULE$);
// Security for Kafka was added in Kafka 0.9.0.0 -> isSecureKafkaCluster = false
ZkUtils zkUtils = new ZkUtils(zkClient, new ZkConnection(zkConnect), false);
if (AdminUtils.topicExists(zkUtils, topic))
zkClient.deleteRecursive(ZkUtils.getTopicPath(topic));
ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
try
{
Thread.currentThread().setContextClassLoader(null);
AdminUtils.createTopic(zkUtils, topic, partitions, replicas, new Properties(), RackAwareMode.Disabled$.MODULE$);
}
catch (Throwable th) {
LOGGER.error(th.getMessage(), th);
throw new ValidationException(th.getMessage());
}
finally {
Thread.currentThread().setContextClassLoader(classLoader);
}
zkClient.close();
}
开发者ID:Esri,项目名称:kafka-for-geoevent,代码行数:32,代码来源:KafkaOutboundTransport.java
示例7: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException {
super.validate();
if (zkConnect.isEmpty())
throw new ValidationException(LOGGER.translate("ZKCONNECT_VALIDATE_ERROR"));
if (topic.isEmpty())
throw new ValidationException(LOGGER.translate("TOPIC_VALIDATE_ERROR"));
if (groupId.isEmpty())
throw new ValidationException(LOGGER.translate("GROUP_ID_VALIDATE_ERROR"));
if (numThreads < 1)
throw new ValidationException(LOGGER.translate("NUM_THREADS_VALIDATE_ERROR"));
ZkClient zkClient = new ZkClient(zkConnect, 10000, 8000, ZKStringSerializer$.MODULE$);
// Security for Kafka was added in Kafka 0.9.0.0 -> isSecureKafkaCluster = false
ZkUtils zkUtils = new ZkUtils(zkClient, new ZkConnection(zkConnect), false);
Boolean topicExists = AdminUtils.topicExists(zkUtils, topic);
zkClient.close();
if (!topicExists)
throw new ValidationException(LOGGER.translate("TOPIC_VALIDATE_ERROR"));
// Init Consumer Config
Properties props = new Properties()
{
{ put("zookeeper.connect", zkConnect); }
{ put("group.id", groupId); }
{ put("zookeeper.session.timeout.ms", "400"); }
{ put("zookeeper.sync.time.ms", "200"); }
{ put("auto.commit.interval.ms", "1000"); }
};
consumerConfig = new ConsumerConfig(props);
}
开发者ID:Esri,项目名称:kafka-for-geoevent,代码行数:30,代码来源:KafkaInboundTransport.java
示例8: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public synchronized void validate() throws ValidationException
{
super.validate();
if (geoEventDefinitionName.isEmpty())
throw new ValidationException(LOGGER.translate("GED_EMPTY_ERROR"));
}
开发者ID:Esri,项目名称:extent-enricher-for-geoevent,代码行数:8,代码来源:GeometryExtentEnricher.java
示例9: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException
{
if (host == null || host.isEmpty())
throw new ValidationException(LOGGER.translate("CONNECTION_HOST_VALIDATE_ERROR"));
if (port <= 0)
throw new ValidationException(LOGGER.translate("CONNECTION_PORT_VALIDATE_ERROR"));
}
开发者ID:Esri,项目名称:rabbitmq-for-geoevent,代码行数:9,代码来源:RabbitMQConnectionInfo.java
示例10: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException
{
super.validate();
connectionInfo.validate();
exchange.validate();
}
开发者ID:Esri,项目名称:rabbitmq-for-geoevent,代码行数:8,代码来源:RabbitMQOutboundTransport.java
示例11: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException
{
super.validate();
connectionInfo.validate();
exchange.validate();
queue.validate();
}
开发者ID:Esri,项目名称:rabbitmq-for-geoevent,代码行数:9,代码来源:RabbitMQInboundTransport.java
示例12: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException
{
super.validate();
List<String> errors = new ArrayList<String>();
if (reportInterval <= 0)
errors.add(LOGGER.translate("VALIDATION_INVALID_REPORT_INTERVAL", definition.getName()));
if (errors.size() > 0)
{
StringBuffer sb = new StringBuffer();
for (String message : errors)
sb.append(message).append("\n");
throw new ValidationException(LOGGER.translate("VALIDATION_ERROR", this.getClass().getName(), sb.toString()));
}
}
开发者ID:Esri,项目名称:motion-calculator-for-geoevent,代码行数:16,代码来源:MotionCalculator.java
示例13: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public synchronized void validate() throws ValidationException
{
super.validate();
List<String> errors = new ArrayList<String>();
if (resultDestination == null)
errors.add("Result Destination is unknown.");
if (ResultDestination.NEW_FIELD.equals(resultDestination))
{
try
{
fieldDefinition = new DefaultFieldDefinition(fieldName, fieldType);
tag(fieldDefinition);
}
catch (Exception e)
{
errors.add(e.getMessage());
}
}
else if (ResultDestination.EXISTING_FIELD.equals(resultDestination))
if (fieldName.isEmpty())
errors.add(LOGGER.translate("VALIDATION_ERROR_FIELD_DOESNT_EXIST"));
if (errors.size() > 0)
{
StringBuffer sb = new StringBuffer();
for (String message : errors)
sb.append(message).append("\n");
throw new ValidationException(LOGGER.translate("VALIDATION_ERROR", sb.toString()));
}
}
开发者ID:Esri,项目名称:solutions-geoevent-java,代码行数:31,代码来源:CacheAwareFieldCalculator.java
示例14: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public synchronized void validate() throws ValidationException {
// Validation Phase ...
super.validate();
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:7,代码来源:Line2PtProcessor.java
示例15: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public synchronized void validate() throws ValidationException {
// Validation Phase ...
super.validate();
}
开发者ID:Esri,项目名称:defense-solutions-proofs-of-concept,代码行数:7,代码来源:STWAProcessor.java
示例16: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException
{
if (name == null || name.isEmpty())
throw new ValidationException(LOGGER.translate("QUEUE_NAME_VALIDATE_ERROR"));
}
开发者ID:Esri,项目名称:rabbitmq-for-geoevent,代码行数:7,代码来源:RabbitMQQueue.java
示例17: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException
{
if (name == null || name.isEmpty())
throw new ValidationException(LOGGER.translate("EXCHANGE_VALIDATE_ERROR"));
}
开发者ID:Esri,项目名称:rabbitmq-for-geoevent,代码行数:7,代码来源:RabbitMQExchange.java
示例18: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
public void validate() throws ValidationException
{
featureAdapter.validate();
}
开发者ID:Esri,项目名称:route-monitor-for-geoevent,代码行数:6,代码来源:MultiFeatureJsonOutboundAdapter.java
示例19: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
protected void validate(String[] data) throws ValidationException
{
if (data == null || data.length != 15)
throw new ValidationException(LOGGER.translate("INVALID_NMEAGPGG_MSG"));
}
开发者ID:Esri,项目名称:nmea-for-geoevent,代码行数:7,代码来源:NMEAGPGGAMessageTranslator.java
示例20: validate
import com.esri.ges.core.validation.ValidationException; //导入依赖的package包/类
@Override
protected void validate(String[] data) throws ValidationException
{
if (data == null || data.length != 7)
throw new ValidationException(LOGGER.translate("INVALID_NMEAGPGLL_MSG"));
}
开发者ID:Esri,项目名称:nmea-for-geoevent,代码行数:7,代码来源:NMEAGPGLLMessageTranslator.java
注:本文中的com.esri.ges.core.validation.ValidationException类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论