当前位置: 首页>>代码示例>>Java>>正文


Java Utils.isCollectionNotEmpty方法代码示例

本文整理汇总了Java中eu.europa.esig.dss.utils.Utils.isCollectionNotEmpty方法的典型用法代码示例。如果您正苦于以下问题:Java Utils.isCollectionNotEmpty方法的具体用法?Java Utils.isCollectionNotEmpty怎么用?Java Utils.isCollectionNotEmpty使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在eu.europa.esig.dss.utils.Utils的用法示例。


在下文中一共展示了Utils.isCollectionNotEmpty方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: fillParameters

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
private void fillParameters(AbstractSignatureParameters parameters, AbstractSignatureForm form) {
	parameters.setSignatureLevel(form.getSignatureLevel());
	parameters.setDigestAlgorithm(form.getDigestAlgorithm());
	// parameters.setEncryptionAlgorithm(form.getEncryptionAlgorithm()); retrieved from certificate
	parameters.bLevel().setSigningDate(form.getSigningDate());

	parameters.setSignWithExpiredCertificate(form.isSignWithExpiredCertificate());

	CertificateToken signingCertificate = DSSUtils.loadCertificateFromBase64EncodedString(form.getBase64Certificate());
	parameters.setSigningCertificate(signingCertificate);
	parameters.setEncryptionAlgorithm(signingCertificate.getEncryptionAlgorithm());

	List<String> base64CertificateChain = form.getBase64CertificateChain();
	if (Utils.isCollectionNotEmpty(base64CertificateChain)) {
		List<CertificateToken> certificateChain = new LinkedList<CertificateToken>();
		for (String base64Certificate : base64CertificateChain) {
			certificateChain.add(DSSUtils.loadCertificateFromBase64EncodedString(base64Certificate));
		}
		parameters.setCertificateChain(certificateChain);
	}
}
 
开发者ID:esig,项目名称:dss-demonstrations,代码行数:22,代码来源:SigningService.java

示例2: updateFinalConclusion

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
private void updateFinalConclusion(XmlBasicBuildingBlocks result, XmlConstraintsConclusion constraintsAndConclusion) {
	XmlConclusion finalConclusion = result.getConclusion();

	XmlConclusion currentConclusion = constraintsAndConclusion.getConclusion();
	List<XmlConstraint> constraints = constraintsAndConclusion.getConstraint();

	if (!Indication.PASSED.equals(currentConclusion.getIndication())) {
		finalConclusion.setIndication(currentConclusion.getIndication());
		finalConclusion.setSubIndication(currentConclusion.getSubIndication());
		finalConclusion.getErrors().addAll(currentConclusion.getErrors());
	}

	if (Utils.isCollectionNotEmpty(constraints)) {
		for (XmlConstraint constraint : constraints) {
			XmlName info = constraint.getInfo();
			if (info != null) {
				finalConclusion.getInfos().add(info);
			}
			XmlName warning = constraint.getWarning();
			if (warning != null) {
				finalConclusion.getWarnings().add(warning);
			}
		}
	}
}
 
开发者ID:esig,项目名称:dss,代码行数:26,代码来源:BasicBuildingBlocks.java

示例3: collectWarnings

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
private void collectWarnings(Set<String> result, XmlBasicBuildingBlocks bbb) {
	if (bbb != null) {
		collectWarnings(result, bbb.getFC());
		collectWarnings(result, bbb.getISC());
		collectWarnings(result, bbb.getCV());
		collectWarnings(result, bbb.getSAV());
		XmlXCV xcv = bbb.getXCV();
		if (xcv != null) {
			collectWarnings(result, xcv);
			List<XmlSubXCV> subXCV = xcv.getSubXCV();
			if (Utils.isCollectionNotEmpty(subXCV)) {
				for (XmlSubXCV xmlSubXCV : subXCV) {
					collectWarnings(result, xmlSubXCV);
				}
			}
		}
		collectWarnings(result, bbb.getVCI());
	}
}
 
开发者ID:esig,项目名称:dss,代码行数:20,代码来源:SimpleReportBuilder.java

示例4: getCommitmentTypeIdentifiers

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
public List<String> getCommitmentTypeIdentifiers() {
	List<String> commitmentTypeIndications = signature.getCommitmentTypeIndication();
	if (Utils.isCollectionNotEmpty(commitmentTypeIndications)) {
		return commitmentTypeIndications;
	}
	return Collections.emptyList();
}
 
开发者ID:esig,项目名称:dss,代码行数:8,代码来源:SignatureWrapper.java

示例5: getServiceProviders

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
private List<TSLServiceProvider> getServiceProviders(TrustStatusListType tsl) {
	List<TSLServiceProvider> serviceProviders = new ArrayList<TSLServiceProvider>();
	TrustServiceProviderListType trustServiceProviderList = tsl.getTrustServiceProviderList();
	if ((trustServiceProviderList != null) && (Utils.isCollectionNotEmpty(trustServiceProviderList.getTrustServiceProvider()))) {
		for (TSPType tsp : trustServiceProviderList.getTrustServiceProvider()) {
			serviceProviders.add(getServiceProvider(tsp));
		}
	}
	return serviceProviders;
}
 
开发者ID:esig,项目名称:dss,代码行数:11,代码来源:TSLParser.java

示例6: getPotentialSigners

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
private List<CertificateToken> getPotentialSigners(List<TSLPointer> pointers, String countryCode) {
	if (Utils.isCollectionNotEmpty(pointers)) {
		for (TSLPointer tslPointer : pointers) {
			if (Utils.areStringsEqual(countryCode, tslPointer.getTerritory())) {
				return tslPointer.getPotentialSigners();
			}
		}
	}
	return Collections.emptyList();
}
 
开发者ID:esig,项目名称:dss,代码行数:11,代码来源:TSLValidationJob.java

示例7: getQCTypes

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
public List<String> getQCTypes() {
	List<XmlOID> certificateQCTypeIds = certificate.getQCTypes();
	if (Utils.isCollectionNotEmpty(certificateQCTypeIds)) {
		return getOidValues(certificateQCTypeIds);
	} else {
		return Collections.emptyList();
	}
}
 
开发者ID:esig,项目名称:dss,代码行数:9,代码来源:CertificateWrapper.java

示例8: getFirstChainCertificate

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
public XmlChainItem getFirstChainCertificate() {
	List<XmlChainItem> certificateChain = getCurrentCertificateChain();
	if (Utils.isCollectionNotEmpty(certificateChain)) {
		return certificateChain.get(0);
	}
	return null;
}
 
开发者ID:esig,项目名称:dss,代码行数:8,代码来源:AbstractTokenProxy.java

示例9: getUsageQualifiers

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
public static List<String> getUsageQualifiers(List<String> qualifiers) {
	List<String> filteredQualifiers = new ArrayList<String>();
	if (Utils.isCollectionNotEmpty(qualifiers)) {
		if (qualifiers.contains(QC_FOR_ESIG)) {
			filteredQualifiers.add(QC_FOR_ESIG);
		}
		if (qualifiers.contains(QC_FOR_ESEAL)) {
			filteredQualifiers.add(QC_FOR_ESEAL);
		}
		if (qualifiers.contains(QC_FOR_WSA)) {
			filteredQualifiers.add(QC_FOR_WSA);
		}
	}
	return filteredQualifiers;
}
 
开发者ID:esig,项目名称:dss,代码行数:16,代码来源:ServiceQualification.java

示例10: getSignatureIdList

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
/**
 * @return the {@code List} of signature id(s) contained in the simpleReport
 */
public List<String> getSignatureIdList() {
	final List<String> signatureIdList = new ArrayList<String>();
	List<XmlSignature> signatures = simpleReport.getSignature();
	if (Utils.isCollectionNotEmpty(signatures)) {
		for (XmlSignature xmlSignature : signatures) {
			signatureIdList.add(xmlSignature.getId());
		}
	}
	return signatureIdList;
}
 
开发者ID:esig,项目名称:dss,代码行数:14,代码来源:SimpleReport.java

示例11: getKeyUsages

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
public List<String> getKeyUsages() {
	List<String> keyUsageBits = certificate.getKeyUsageBits();
	if (Utils.isCollectionNotEmpty(keyUsageBits)) {
		return keyUsageBits;
	}
	return new ArrayList<String>();
}
 
开发者ID:esig,项目名称:dss,代码行数:8,代码来源:CertificateWrapper.java

示例12: getEnglishSchemeInformationURIs

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
private List<String> getEnglishSchemeInformationURIs(TrustStatusListType tsl) {
	// Maintains original order for PIVOTs LOTL
	List<String> result = new LinkedList<String>();
	NonEmptyMultiLangURIListType schemeInformationURI = tsl.getSchemeInformation().getSchemeInformationURI();
	if (schemeInformationURI != null && Utils.isCollectionNotEmpty(schemeInformationURI.getURI())) {
		for (NonEmptyMultiLangURIType uri : schemeInformationURI.getURI()) {
			if (ENGLISH_LANGUAGE.equals(uri.getLang())) {
				result.add(uri.getValue());
			}
		}
	}
	return result;
}
 
开发者ID:esig,项目名称:dss,代码行数:14,代码来源:TSLParser.java

示例13: getUsedCertificateById

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
public CertificateWrapper getUsedCertificateById(String id) {
	List<CertificateWrapper> certificates = getUsedCertificates();
	if (Utils.isCollectionNotEmpty(certificates)) {
		for (CertificateWrapper certificate : certificates) {
			if (Utils.areStringsEqual(id, certificate.getId())) {
				return certificate;
			}
		}
	}
	return null;
}
 
开发者ID:esig,项目名称:dss,代码行数:12,代码来源:DiagnosticData.java

示例14: getAllTimestamps

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
public Set<TimestampWrapper> getAllTimestamps() {
	Set<TimestampWrapper> allTimestamps = new HashSet<TimestampWrapper>();
	List<SignatureWrapper> signatures = getSignatures();
	if (Utils.isCollectionNotEmpty(signatures)) {
		for (SignatureWrapper signatureWrapper : signatures) {
			allTimestamps.addAll(signatureWrapper.getTimestampList());
		}
	}
	return allTimestamps;
}
 
开发者ID:esig,项目名称:dss,代码行数:11,代码来源:DiagnosticData.java

示例15: linkSignatures

import eu.europa.esig.dss.utils.Utils; //导入方法依赖的package包/类
/**
 * This method links previous signatures to the new one. This is useful to get revision number and to know if a TSP
 * is over the DSS dictionary
 */
private void linkSignatures(List<PdfSignatureOrDocTimestampInfo> signatures) {
	List<PdfSignatureOrDocTimestampInfo> previousList = new ArrayList<PdfSignatureOrDocTimestampInfo>();
	for (PdfSignatureOrDocTimestampInfo sig : signatures) {
		if (Utils.isCollectionNotEmpty(previousList)) {
			for (PdfSignatureOrDocTimestampInfo previous : previousList) {
				previous.addOuterSignature(sig);
			}
		}
		previousList.add(sig);
	}
}
 
开发者ID:esig,项目名称:dss,代码行数:16,代码来源:PdfBoxSignatureService.java


注:本文中的eu.europa.esig.dss.utils.Utils.isCollectionNotEmpty方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。