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


Java StringUtils.equalsIgnoreCase方法代码示例

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


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

示例1: buildSAMLLogoutRequestAndStoreInSession

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
protected void buildSAMLLogoutRequestAndStoreInSession(
        HttpServletRequest request, String samlResponse)
        throws SaaSApplicationException {
    String samlSessionId = getSamlResponseExtractor()
            .getSessionIndex(samlResponse);
    String nameID = getSamlResponseExtractor().getUserId(samlResponse);
    String tenantID = getSamlResponseExtractor().getTenantID(samlResponse);
    String issuer = getSamlResponseExtractor().getIssuer(samlResponse);
    authSettings.init(tenantID);
    if(!StringUtils.equalsIgnoreCase(issuer, authSettings.getIdpIssuer())) {
        //TODO: move issuer verification to AssertionContentVerifier if possible.
        throw new IssuerNotMatchException();
    }
    final SigningAlgorithmType signingAlgorithm = getSigningAlgorithmType();
    String logoutRequest = logoutRequestGenerator.generateLogoutRequest(
                samlSessionId, nameID, getLogoutURL(),
                getKeystorePath(), getIssuer(),
                getKeyAlias(), getKeystorePass(), signingAlgorithm);
    request.getSession().setAttribute(SESSION_PARAM_SAML_LOGOUT_REQUEST, logoutRequest);
}
 
开发者ID:servicecatalog,项目名称:oscm,代码行数:21,代码来源:IdPResponseFilter.java

示例2: validate

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
public void validate(Object target, Errors errors) {
    ValidationUtils.rejectIfEmptyOrWhitespace(errors, "employeeFirstName", "NotEmpty.registration.fname");
    Employee employeeRegistration = (Employee) target;

    if (StringUtils.isNotBlank(employeeRegistration.getEmpPassword())) {
        if (passwordValidator.validate(employeeRegistration.getEmpPassword())) {
            //Check if the confirmation password is same as the new password.
            if (!StringUtils.equalsIgnoreCase(employeeRegistration.getEmpPassword(), employeeRegistration.getEmpPassword2())) {
                errors.rejectValue("empPassword2", "NotValid.registration.confirm.password");
            }
        } else {
            errors.rejectValue("empPassword", "NotValid.registration.password");
        }
    }

}
 
开发者ID:Mahidharmullapudi,项目名称:timesheet-upload,代码行数:18,代码来源:UpdatePasswordValidator.java

示例3: desEncrypt

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static String desEncrypt(String origin, String encoding) {
    if ((origin == null) || (encoding == null)) {
        return null;
    }

    // TODO String.valueOf(null) == "null";
    if (StringUtils.equalsIgnoreCase("null", origin)) {
        return null;
    }

    try {
        return encrypt(origin.getBytes(encoding), "DES");
    } catch (UnsupportedEncodingException e) {
        System.out.println("The encoding is not supported.");
    }

    return null;
}
 
开发者ID:daishicheng,项目名称:outcomes,代码行数:19,代码来源:DesUtils.java

示例4: getHVR

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static BigDecimal getHVR(RiskClass r, Sensitivity s) {
  if (r.equals(RiskClass.COMMODITY)) {
    return cm.getHVR();
  } else if (r.equals(RiskClass.CREDIT_NON_QUALIFYING)) {
    return cnq.getHVR();
  } else if (r.equals(RiskClass.CREDIT_QUALIFYING) && StringUtils.equalsIgnoreCase(s.getRiskType(), RiskType.RISK_TYPE_BASE_CORR)) {
    throw new RuntimeException("called HVR for base corr sensitvity: " + s);
  } else if (r.equals(RiskClass.CREDIT_QUALIFYING)) {
    return cq.getHVR();
  } else if (r.equals(RiskClass.EQUITY)) {
    return eq.getHVR();
  } else if (r.equals(RiskClass.FX)) {
    return fx.getHVR();
  } else if (r.equals(RiskClass.INTEREST_RATE)) {
    return ir.getHVR();
  } else {
    throw new RuntimeException("found bad com.acadiasoft.simm.model.risk class: " + r);
  }
}
 
开发者ID:AcadiaSoft,项目名称:simm-lib,代码行数:20,代码来源:RiskWeight.java

示例5: getResponseFileName

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
/**
 * 从响应消息的Content-Disposition头中获得文件名。
 * 
 * @param headers
 * @return 如果不是文件则返回null
 */
private static String getResponseFileName(Header[] headers) {
	String filename = null;
	if (headers == null) {
		return null;
	}
	for (Header header : headers) {
		if (StringUtils.equalsIgnoreCase(header.getName(), "Content-Disposition")) {
			String value = header.getValue();
			String key = "filename=";
			int keyLength = key.length();
			int position = StringUtils.indexOfIgnoreCase(header.getValue(), key);
			if (position > -1) {
				filename = StringUtils.substring(value, position + keyLength);
			}
			break;
		}
	}
	return filename;
}
 
开发者ID:AlexLee-CN,项目名称:weixin_api,代码行数:26,代码来源:HttpUtil.java

示例6: getSensitivityCorrelation

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static BigDecimal getSensitivityCorrelation(RiskClass r, Sensitivity si, Sensitivity sk) {
  if (r.equals(RiskClass.COMMODITY)) {
    return cm.getSensitivityCorrelation(si, sk);
  } else if (r.equals(RiskClass.CREDIT_NON_QUALIFYING)) {
    return cnq.getSensitivityCorrelation(si, sk);
  } else if (r.equals(RiskClass.CREDIT_QUALIFYING)
    && StringUtils.equalsIgnoreCase(si.getRiskType(), RiskType.RISK_TYPE_BASE_CORR)
    && StringUtils.equalsIgnoreCase(sk.getRiskType(), RiskType.RISK_TYPE_BASE_CORR)) {
    throw new RuntimeException("called com.acadiasoft.simm.model.risk correlation for base corr sensitvity: " + si + ", " + sk);
  } else if (r.equals(RiskClass.CREDIT_QUALIFYING)) {
    return cq.getSensitivityCorrelation(si, sk);
  } else if (r.equals(RiskClass.EQUITY)) {
    return eq.getSensitivityCorrelation(si, sk);
  } else if (r.equals(RiskClass.FX)) {
    return fx.getSensitivityCorrelation(si, sk);
  } else if (r.equals(RiskClass.INTEREST_RATE)) {
    return ir.getSensitivityCorrelation(si, sk);
  } else {
    throw new RuntimeException("found bad com.acadiasoft.simm.model.risk class: " + r);
  }
}
 
开发者ID:AcadiaSoft,项目名称:simm-lib,代码行数:22,代码来源:RiskCorrelation.java

示例7: covertRequest

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static Seed covertRequest(Request request) {
    if (StringUtils.isNotEmpty(request.getMethod()) && !StringUtils.equalsIgnoreCase(request.getMethod(), "get")) {
        log.warn("vscrawler can not support webmagic get method,this request {} will be ignore", request.getUrl());
        return null;
    }
    Seed seed = new Seed(request.getUrl());
    seed.setExt(Maps.transformEntries(request.getExtras(), new Maps.EntryTransformer<String, Object, String>() {
        @Override
        public String transformEntry(String key, Object value) {
            if (value instanceof String) {
                return (String) value;
            }
            return JSONObject.toJSONString(value);
        }
    }));

    return seed;
}
 
开发者ID:virjar,项目名称:vscrawler,代码行数:19,代码来源:CovertUtil.java

示例8: process

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
public void process(PageContext pageContext) {

    MediaType mediaType = pageContext.getMediaType();
    String subtype = mediaType.subtype();
    if (!supportMedia.contains(subtype)) {
        return;
    }
    byte[] body = pageContext.getBody();
    String url = pageContext.getRequest().url().toString();
    String name = DigestUtils.md5Hex(url);
    String path = Take.path;
    File file = new File(path);
    file.mkdirs();
    try {
        if (StringUtils.equalsIgnoreCase(subtype, "html")) {
            LOGGER.info("保存html文件 {} {}", url, name);
            Files.write(pageContext.getHtml(), new File(path, name + ".html"), Charset.forName(pageContext.getCharset()));
        } else if (StringUtils.equalsIgnoreCase(subtype, "jpeg")
                || StringUtils.equalsIgnoreCase(subtype, "png")
                || StringUtils.equalsIgnoreCase(subtype, "gif")
                ) {
            LOGGER.info("保存图片 {} {}", url, name);
            Files.write(body, new File(path, name + "." + subtype));
        }

    } catch (IOException e) {
        e.printStackTrace();
    }
}
 
开发者ID:jt120,项目名称:take,代码行数:31,代码来源:SinkFileNode.java

示例9: getSensitivityCorrelation

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
public BigDecimal getSensitivityCorrelation(Sensitivity si, Sensitivity sk) {
  if (StringUtils.equalsIgnoreCase(Sensitivity.RESIDUAL, si.getBucket()) || StringUtils.equalsIgnoreCase(Sensitivity.RESIDUAL, sk.getBucket())) {
    return RESIDUAL;
  } else {
    // NOTE: both sensitivities should be in the same bucket, so bi and bk should
    //    be equal
    int i = Integer.valueOf(si.getBucket());
    int k = Integer.valueOf(sk.getBucket());
    return CORRELATIONS[i - 1][k - 1];
  }
}
 
开发者ID:AcadiaSoft,项目名称:simm-lib,代码行数:13,代码来源:EquityCorrelationV2_0.java

示例10: getTemplateDedicatedFiles

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
private List<String> getTemplateDedicatedFiles(String templateName, List<String> jsonDataFiles, List<String> templateNames) {
    final List<String> templateDedicatedDataFiles = Lists.newArrayList();
    for (String jsonDataFile : jsonDataFiles) {
        final String[] jsonDataIds = StringUtils.substringsBetween(jsonDataFile, PatternLabConstants.SELECTOR, PatternLabConstants.SELECTOR);
        if (jsonDataIds == null || jsonDataIds.length == 0) {
            templateDedicatedDataFiles.add(jsonDataFile);
        } else {
            final String jsonDataId = jsonDataIds[0];
            if (StringUtils.equalsIgnoreCase(templateName, jsonDataId) || !templateNames.contains(jsonDataId)) {
                templateDedicatedDataFiles.add(jsonDataFile);
            }
        }
    }
    return templateDedicatedDataFiles;
}
 
开发者ID:deepthinkit,项目名称:patternlab-for-sling,代码行数:16,代码来源:PatternPatternCategoryFactoryImpl.java

示例11: getBucketCorrelation

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
public BigDecimal getBucketCorrelation(String bi, String bk) {
  if (StringUtils.equalsIgnoreCase(Sensitivity.RESIDUAL, bi) || StringUtils.equalsIgnoreCase(Sensitivity.RESIDUAL, bk)) {
    throw new RuntimeException("called bucket correlation for a residual bucket: " + bi + ", " + bk);
  } else {
    return NON_RESIDUAL_TO_NON_RESIDUAL;
  }
}
 
开发者ID:AcadiaSoft,项目名称:simm-lib,代码行数:9,代码来源:CreditNonQualifyingCorrelationV2_0.java

示例12: parseLogoutType

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
/**
 * Parse raw logout type string to {@link LogoutType}.
 *
 * @param logoutType the reg svc
 */
private static LogoutType parseLogoutType(final String logoutType) {
    if (StringUtils.equalsIgnoreCase(logoutType, RegisteredServiceLogoutTypeEditBean.BACK.toString())) {
        return LogoutType.BACK_CHANNEL;
    }
    if (StringUtils.equalsIgnoreCase(logoutType, RegisteredServiceLogoutTypeEditBean.FRONT.toString())) {
        return LogoutType.FRONT_CHANNEL;
    }
    return LogoutType.NONE;
}
 
开发者ID:mrluo735,项目名称:cas-5.1.0,代码行数:15,代码来源:DefaultRegisteredServiceMapper.java

示例13: forTextAndMensa

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
public Optional<DateSearchResult> forTextAndMensa(String text, Mensa mensa) {
    Optional<DateSearchResult> result = Optional.empty();
    if (StringUtils.equalsIgnoreCase(text, messagesService.getMessage(Messages.COMMAND_DATE_TODAY))) {
        LocalDate today = supplier.get();
        if (timeUtils.isOpeningDay(today, mensa)) {
            result = Optional.of(DateSearchResult.of(today, Optional.empty()));
        } else {
            result = Optional.of(DateSearchResult.of(today, Optional.of(timeUtils.nextOpeningDay(today, mensa))));
        }
    }
    return result;
}
 
开发者ID:xabgesagtx,项目名称:mensa-api,代码行数:14,代码来源:TodayResultSupplier.java

示例14: getBaseCorrSensitvityCorrelation

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
public static BigDecimal getBaseCorrSensitvityCorrelation(RiskClass r, Sensitivity si, Sensitivity sk) {
  if (r.equals(RiskClass.CREDIT_QUALIFYING)
    && StringUtils.equalsIgnoreCase(si.getRiskType(), RiskType.RISK_TYPE_BASE_CORR)
    && StringUtils.equalsIgnoreCase(sk.getRiskType(), RiskType.RISK_TYPE_BASE_CORR)) {
    return bc.getRiskCorrelation(si, sk);
  } else {
    throw new RuntimeException("called base corr correlation with other com.acadiasoft.simm.model.sensitivity type: " + si + ", " + sk);
  }
}
 
开发者ID:AcadiaSoft,项目名称:simm-lib,代码行数:10,代码来源:RiskCorrelation.java

示例15: getSensitivityCorrelation

import org.apache.commons.lang3.StringUtils; //导入方法依赖的package包/类
@Override
public BigDecimal getSensitivityCorrelation(Sensitivity si, Sensitivity sk) {
  if (StringUtils.equalsIgnoreCase(Sensitivity.RESIDUAL, si.getBucket()) || StringUtils.equalsIgnoreCase(Sensitivity.RESIDUAL, sk.getBucket())) {
    return RESIDUAL;
  } else if (StringUtils.equals(si.getQualifier(), sk.getQualifier())) {
    return AGGREGATE_SAME;
  } else {
    return AGGREGATE_DIFF;
  }
}
 
开发者ID:AcadiaSoft,项目名称:simm-lib,代码行数:11,代码来源:CreditNonQualifyingCorrelationV2_0.java


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