本文整理了Java中eu.europa.esig.dss.utils.Utils.isCollectionEmpty()
方法的一些代码示例,展示了Utils.isCollectionEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.isCollectionEmpty()
方法的具体详情如下:
包路径:eu.europa.esig.dss.utils.Utils
类名称:Utils
方法名:isCollectionEmpty
暂无
代码示例来源:origin: esig/dss
private List<String> emptyToNull(List<String> listUrls) {
if (Utils.isCollectionEmpty(listUrls)) {
return null;
}
return listUrls;
}
代码示例来源:origin: esig/dss
@Override
protected boolean process() {
List<String> commitmentTypeIdentifiers = signature.getCommitmentTypeIdentifiers();
List<String> expectedValues = constraint.getId();
if (Utils.isCollectionEmpty(commitmentTypeIdentifiers)) {
return false;
}
if (Utils.isCollectionNotEmpty(expectedValues)) {
return expectedValues.containsAll(commitmentTypeIdentifiers);
}
return true;
}
代码示例来源:origin: esig/dss
@Override
protected boolean process() {
if ("ASiC-S".equals(containerInfo.getContainerType())) { // ASiC-S no Manifest
message = MessageTag.BBB_FC_IMFP_ASICS;
error = MessageTag.BBB_FC_IMFP_ASICS_ANS;
return Utils.isCollectionEmpty(containerInfo.getManifestFiles());
} else { // ASiC-E one or more manifest
message = MessageTag.BBB_FC_IMFP_ASICE;
error = MessageTag.BBB_FC_IMFP_ASICE_ANS;
return Utils.isCollectionNotEmpty(containerInfo.getManifestFiles());
}
}
代码示例来源:origin: esig/dss
List<String> urls = DSSASN1Utils.getCAAccessLocations(cert);
if (Utils.isCollectionEmpty(urls)) {
LOG.info("There is no AIA extension for certificate download.");
return Collections.emptyList();
代码示例来源:origin: esig/dss
@Test
public void isCollectionEmpty() {
assertTrue(Utils.isCollectionEmpty(null));
assertTrue(Utils.isCollectionEmpty(new ArrayList<String>()));
List<String> list = new ArrayList<String>();
list.add("a");
list.add("b");
list.add("c");
assertFalse(Utils.isCollectionEmpty(list));
}
代码示例来源:origin: esig/dss
if (Utils.isCollectionEmpty(crlUrls) && Utils.isCollectionEmpty(alternativeUrls)) {
LOG.debug("No CRL location found for {}", dssIdAsString);
return null;
代码示例来源:origin: esig/dss
if (Utils.isCollectionEmpty(crlUrls)) {
return null;
代码示例来源:origin: esig/dss
@Test
public void noCAQC() {
ServiceByDateFilter filter = new ServiceByDateFilter(DATE2);
assertTrue(Utils.isCollectionEmpty(filter.filter(new ArrayList<TrustedServiceWrapper>())));
}
代码示例来源:origin: esig/dss
@Override
public final OCSPToken getRevocationToken(CertificateToken certificateToken, CertificateToken issuerCertificateToken) {
final List<BasicOCSPResp> containedOCSPResponses = getContainedOCSPResponses();
if (Utils.isCollectionEmpty(containedOCSPResponses)) {
return null;
代码示例来源:origin: esig/dss
@Test
public void testCannotConclude() {
CertificateWrapper emptyCert = new MockCertificateWrapper(AFTER_EIDAS_DATE, Collections.<String> emptyList(), Collections.<String> emptyList(),
Collections.<String> emptyList());
UniqueServiceFilter filter = new UniqueServiceFilter(emptyCert);
List<TrustedServiceWrapper> trustServices = new ArrayList<TrustedServiceWrapper>();
TrustedServiceWrapper ts0 = new TrustedServiceWrapper();
ts0.setCapturedQualifiers(Arrays.asList(ServiceQualification.QC_STATEMENT, ServiceQualification.QC_WITH_QSCD, ServiceQualification.QC_FOR_ESIG));
trustServices.add(ts0);
TrustedServiceWrapper ts1 = new TrustedServiceWrapper();
ts1.setCapturedQualifiers(
Arrays.asList(ServiceQualification.QC_STATEMENT, ServiceQualification.QC_QSCD_MANAGED_ON_BEHALF, ServiceQualification.QC_FOR_ESEAL));
trustServices.add(ts1);
List<TrustedServiceWrapper> filtered = filter.filter(trustServices);
assertTrue(Utils.isCollectionEmpty(filtered));
}
代码示例来源:origin: esig/dss
if (Utils.isCollectionEmpty(ocspAccessLocations) && Utils.isCollectionEmpty(alternativeUrls)) {
LOG.debug("No OCSP location found for {}", dssIdAsString);
return null;
代码示例来源:origin: esig/dss
@Test
public void listFiles() {
File folder = new File("src/main/java");
String[] extensions = new String[] { "java" };
Collection<File> listFiles = Utils.listFiles(folder, extensions, true);
assertTrue(Utils.isCollectionNotEmpty(listFiles));
extensions = new String[] { "doc", "pdf" };
listFiles = Utils.listFiles(folder, extensions, true);
assertTrue(Utils.isCollectionEmpty(listFiles));
}
代码示例来源:origin: esig/dss
@Test
public void getQCStatementsIdList() {
List<String> qcStatementsIdList = DSSASN1Utils.getQCStatementsIdList(certificateWithAIA);
assertTrue(Utils.isCollectionEmpty(qcStatementsIdList));
CertificateToken certificate = DSSUtils.loadCertificate(new File("src/test/resources/ec.europa.eu.crt"));
qcStatementsIdList = DSSASN1Utils.getQCStatementsIdList(certificate);
assertTrue(Utils.isCollectionNotEmpty(qcStatementsIdList));
assertTrue(qcStatementsIdList.contains(ETSIQCObjectIdentifiers.id_etsi_qcs_LimiteValue.getId()));
}
内容来源于网络,如有侵权,请联系作者删除!