本文整理了Java中eu.europa.esig.dss.utils.Utils.isStringEmpty()
方法的一些代码示例,展示了Utils.isStringEmpty()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Utils.isStringEmpty()
方法的具体详情如下:
包路径:eu.europa.esig.dss.utils.Utils
类名称:Utils
方法名:isStringEmpty
暂无
代码示例来源:origin: esig/dss
protected boolean processValueCheck(String value, String expected) {
if (Utils.isStringEmpty(value)) {
return false;
}
if (ALL_VALUE.equals(expected)) {
return true;
} else {
return Utils.areStringsEqual(expected, value);
}
}
代码示例来源:origin: esig/dss
/**
* This method returns signatures (not countersignatures)
*
* @return a set of SignatureWrapper
*/
public Set<SignatureWrapper> getAllSignatures() {
Set<SignatureWrapper> signatures = new HashSet<SignatureWrapper>();
List<SignatureWrapper> mixedSignatures = getSignatures();
for (SignatureWrapper signatureWrapper : mixedSignatures) {
if (Utils.isStringEmpty(signatureWrapper.getParentId())) {
signatures.add(signatureWrapper);
}
}
return signatures;
}
代码示例来源:origin: esig/dss
@Override
protected boolean process() {
PseudoStrategy pseudoStrategy = new JoinedPseudoStrategy();
pseudo = pseudoStrategy.getPseudo(certificate);
return Utils.isStringEmpty(pseudo);
}
代码示例来源:origin: esig/dss
private Date getExpirationDate(String algoToFind, List<Algo> algos, String format) {
SimpleDateFormat dateFormat = new SimpleDateFormat(Utils.isStringEmpty(format) ? DATE_FORMAT : format);
Date result = null;
for (Algo algo : algos) {
if (Utils.areStringsEqual(algoToFind, algo.getValue()) && Utils.isStringNotEmpty(algo.getDate())) {
try {
result = dateFormat.parse(algo.getDate());
} catch (Exception e) {
LOG.warn("Unable to parse date with pattern '{}' : {}", dateFormat.toPattern(), e.getMessage());
}
}
}
return result;
}
代码示例来源:origin: esig/dss
String attributeName = (tokenizer.hasMoreTokens()) ? tokenizer.nextToken() : null;
if (Utils.isStringEmpty(attributeName)) {
代码示例来源:origin: esig/dss
@Test
public void isStringEmpty() {
assertTrue(Utils.isStringEmpty(""));
assertFalse(Utils.isStringEmpty(" "));
assertTrue(Utils.isStringEmpty(null));
assertFalse(Utils.isStringEmpty("bla"));
}
代码示例来源:origin: esig/dss
@Override
protected boolean process() {
String policyId = signature.getPolicyId();
if (multiValues.getId().contains(SignaturePolicy.NO_POLICY) && Utils.isStringEmpty(policyId)) {
return true;
} else if (multiValues.getId().contains(SignaturePolicy.ANY_POLICY) && Utils.isStringNotEmpty(policyId)) {
return true;
} else if (multiValues.getId().contains(SignaturePolicy.IMPLICIT_POLICY) && Utils.areStringsEqual(SignaturePolicy.IMPLICIT_POLICY, policyId)) {
return true;
}
// oids
return processValueCheck(policyId);
}
代码示例来源:origin: esig/dss
@Override
public boolean check(CertificateToken certificateToken) {
X500Principal subjectX500Principal = certificateToken.getSubjectX500Principal();
if (Utils.isCollectionNotEmpty(subjectAttributeOids)) {
for (String oid : subjectAttributeOids) {
String attribute = DSSASN1Utils.extractAttributeFromX500Principal(new ASN1ObjectIdentifier(oid), subjectX500Principal);
if (Utils.isStringEmpty(attribute)) {
return false;
}
}
}
return true;
}
内容来源于网络,如有侵权,请联系作者删除!