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


Java CriteriaSet.isEmpty方法代码示例

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


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

示例1: checkParamsRaw

import org.opensaml.xml.security.CriteriaSet; //导入方法依赖的package包/类
/**
 * Check the signature and credential criteria for required values.
 * 
 * @param signature the signature to be evaluated
 * @param content the data over which the signature was computed
 * @param algorithmURI the signing algorithm URI which was used
 * @param trustBasisCriteria the set of trusted credential criteria
 * @throws SecurityException thrown if required values are absent or otherwise invalid
 */
protected void checkParamsRaw(byte[] signature, byte[] content, String algorithmURI, CriteriaSet trustBasisCriteria)
        throws SecurityException {

    if (signature == null || signature.length == 0) {
        throw new SecurityException("Signature byte array was null or empty");
    }
    if (content == null || content.length == 0) {
        throw new SecurityException("Content byte array was null or empty");
    }
    if (DatatypeHelper.isEmpty(algorithmURI)) {
        throw new SecurityException("Signature algorithm was null or empty");
    }
    if (trustBasisCriteria == null) {
        throw new SecurityException("Trust basis criteria set was null");
    }
    if (trustBasisCriteria.isEmpty()) {
        throw new SecurityException("Trust basis criteria set was empty");
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:29,代码来源:BaseSignatureTrustEngine.java

示例2: checkParams

import org.opensaml.xml.security.CriteriaSet; //导入方法依赖的package包/类
/**
 * Check the parameters for required values.
 * 
 * @param untrustedCredential the signature to be evaluated
 * @param trustBasisCriteria the set of trusted credential criteria
 * @throws SecurityException thrown if required values are absent or otherwise invalid
 */
protected void checkParams(X509Credential untrustedCredential, CriteriaSet trustBasisCriteria)
        throws SecurityException {

    if (untrustedCredential == null) {
        throw new SecurityException("Untrusted credential was null");
    }
    if (trustBasisCriteria == null) {
        throw new SecurityException("Trust basis criteria set was null");
    }
    if (trustBasisCriteria.isEmpty()) {
        throw new SecurityException("Trust basis criteria set was empty");
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:21,代码来源:ExplicitX509CertificateTrustEngine.java

示例3: checkParams

import org.opensaml.xml.security.CriteriaSet; //导入方法依赖的package包/类
/**
 * Check the parameters for required values.
 * 
 * @param untrustedCredential the credential to be evaluated
 * @param trustBasisCriteria the set of trusted credential criteria
 * @throws SecurityException thrown if required values are absent or otherwise invalid
 */
protected void checkParams(Credential untrustedCredential, CriteriaSet trustBasisCriteria)
    throws SecurityException {

    if (untrustedCredential == null) {
        throw new SecurityException("Untrusted credential was null");
    }
    if (trustBasisCriteria == null) {
        throw new SecurityException("Trust basis criteria set was null");
    }
    if (trustBasisCriteria.isEmpty()) {
        throw new SecurityException("Trust basis criteria set was empty");
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:21,代码来源:ExplicitKeyTrustEngine.java

示例4: checkParams

import org.opensaml.xml.security.CriteriaSet; //导入方法依赖的package包/类
/**
 * Check the signature and credential criteria for required values.
 * 
 * @param signature the signature to be evaluated
 * @param trustBasisCriteria the set of trusted credential criteria
 * @throws SecurityException thrown if required values are absent or otherwise invalid
 */
protected void checkParams(Signature signature, CriteriaSet trustBasisCriteria) throws SecurityException {

    if (signature == null) {
        throw new SecurityException("Signature was null");
    }
    if (trustBasisCriteria == null) {
        throw new SecurityException("Trust basis criteria set was null");
    }
    if (trustBasisCriteria.isEmpty()) {
        throw new SecurityException("Trust basis criteria set was empty");
    }
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:20,代码来源:BaseSignatureTrustEngine.java

示例5: buildCredentialCriteria

import org.opensaml.xml.security.CriteriaSet; //导入方法依赖的package包/类
/**
 * Utility method to build a new set of credential criteria based on the KeyInfo of an EncryptedData or
 * EncryptedKey, and any additional static criteria which might have been supplied to the decrypter.
 * 
 * @param encryptedType an EncryptedData or EncryptedKey for which to resolve decryption credentials
 * @param staticCriteria static set of credential criteria to add to the new criteria set
 * @return the new credential criteria set
 */
private CriteriaSet buildCredentialCriteria(EncryptedType encryptedType, CriteriaSet staticCriteria) {

    CriteriaSet newCriteriaSet = new CriteriaSet();

    // This is the main criteria based on the encrypted type's KeyInfo
    newCriteriaSet.add(new KeyInfoCriteria(encryptedType.getKeyInfo()));

    // Also attemtpt to dynamically construct key criteria based on information
    // in the encrypted object
    Set<Criteria> keyCriteria = buildKeyCriteria(encryptedType);
    if (keyCriteria != null && !keyCriteria.isEmpty()) {
        newCriteriaSet.addAll(keyCriteria);
    }

    // Add any static criteria which may have been supplied to the decrypter
    if (staticCriteria != null && !staticCriteria.isEmpty()) {
        newCriteriaSet.addAll(staticCriteria);
    }

    // If don't have a usage criteria yet from static criteria, add encryption usage
    if (!newCriteriaSet.contains(UsageCriteria.class)) {
        newCriteriaSet.add(new UsageCriteria(UsageType.ENCRYPTION));
    }

    return newCriteriaSet;
}
 
开发者ID:lamsfoundation,项目名称:lams,代码行数:35,代码来源:Decrypter.java


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