This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class CompositeValidatableColumn<T> extends IdentityColumn<T> { | |
public CompositeValidatableColumn(WrapperCell<T> cell) { | |
super(cell); | |
} | |
@Override | |
public WrapperCell<T> getCell() { | |
return (WrapperCell<T>) super.getCell(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.ArrayList; | |
import java.util.Collections; | |
import java.util.List; | |
import com.google.gwt.cell.client.AbstractCell; | |
import com.google.gwt.cell.client.Cell; | |
import com.google.gwt.cell.client.FieldUpdater; | |
import com.google.gwt.cell.client.HasCell; | |
import com.google.gwt.cell.client.ValueUpdater; | |
import com.google.gwt.dom.client.Element; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
protected void addPriceMwColumn(final int colIndex, DisplayMode currentDisplayMode) { | |
// Construct a composite cell for energy offers that includes a pair of text inputs | |
final List<HasCell<EnergyOfferDTO, String>> columns = new ArrayList< | |
HasCell<EnergyOfferDTO, String>>(); | |
// this DTO is passed along so that price and mw values for new entries are kept together | |
final OfferPriceMwPair newOfferPriceMwPair = new OfferPriceMwPair(); | |
// Price |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Set; | |
import javax.validation.ConstraintViolation; | |
import javax.validation.Validation; | |
import javax.validation.Validator; | |
import com.google.gwt.user.cellview.client.AbstractHasData; | |
import com.google.gwt.user.cellview.client.Column; | |
/** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Set; | |
import javax.validation.ConstraintViolation; | |
import org.spp.im.mui.gwt.client.module.common.widget.grid.ValidatableInputCell.ValidationData; | |
import org.spp.im.mui.gwt.shared.i18n.UiMessages; | |
import com.google.gwt.cell.client.FieldUpdater; | |
import com.google.gwt.user.cellview.client.AbstractHasData; | |
import com.google.gwt.view.client.ProvidesKey; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 The original authors | |
* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Copyright 2014 The original authors | |
* | |
* 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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.util.Map; | |
import javax.servlet.http.HttpServletRequest; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.boot.autoconfigure.web.BasicErrorController; | |
import org.springframework.boot.autoconfigure.web.ErrorAttributes; | |
import org.springframework.dao.DataIntegrityViolationException; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private static SSLContext obtainTrustSelfSignedSSL() { | |
TrustManager[] trustAllCerts = new TrustManager[]{ | |
new X509TrustManager() { | |
@Override | |
public java.security.cert.X509Certificate[] getAcceptedIssuers() { | |
return null; | |
} | |
@Override | |
public void checkClientTrusted(java.security.cert.X509Certificate[] arg0, String arg1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Modeled after {@link org.springframework.cloud.netflix.servo.ServoMetricCollector} | |
// employed explicitly for publication of AWS CloudWatch metrics | |
public class CloudWatchMetricCollector { | |
private final Logger log = LoggerFactory.getLogger(getClass()); | |
@Value("${spring.aws.cloudwatch.metrics.polling.timeUnit:SECONDS}") | |
private String timeUnit; | |
@Value("${spring.aws.cloudwatch.metrics.polling.interval:5}") |
OlderNewer