Example usage for org.apache.commons.lang StringUtils equalsIgnoreCase

List of usage examples for org.apache.commons.lang StringUtils equalsIgnoreCase

Introduction

In this page you can find the example usage for org.apache.commons.lang StringUtils equalsIgnoreCase.

Prototype

public static boolean equalsIgnoreCase(String str1, String str2) 

Source Link

Document

Compares two Strings, returning true if they are equal ignoring the case.

Usage

From source file:gov.nih.nci.cabig.caaers.web.tags.RenderDecisionManagerTag.java

private boolean validateParameters() throws JspException {
    if (StringUtils.isEmpty(elementID))
        throw new JspException("The elementID property cannot be empty");

    if (!(StringUtils.equalsIgnoreCase(UI_TYPE_DIVISION, uiType)
            || StringUtils.equalsIgnoreCase(UI_TYPE_FIELD, uiType))) {
        throw new JspException(String.format("Unknown value for uiType attribute allowed entries are - %s, %s",
                UI_TYPE_DIVISION, UI_TYPE_FIELD));
    }/*w  w  w  . j a  v  a 2s. co  m*/
    return true;
}

From source file:com.adobe.acs.tools.csv.impl.Column.java

public Column(final String raw, final int index) {
    this.index = index;
    this.raw = StringUtils.trim(raw);

    String paramsStr = StringUtils.substringBetween(raw, "{{", "}}");
    String[] params = StringUtils.split(paramsStr, ":");

    if (StringUtils.isBlank(paramsStr)) {
        this.propertyName = this.getRaw();
    } else {/*from w w w. j  a  v  a  2 s. c o m*/
        this.propertyName = StringUtils.trim(StringUtils.substringBefore(this.getRaw(), "{{"));

        if (params.length == 2) {
            this.dataType = nameToClass(StringUtils.stripToEmpty(params[0]));
            this.multi = StringUtils.equalsIgnoreCase(StringUtils.stripToEmpty(params[1]), MULTI);
        }

        if (params.length == 1) {
            if (StringUtils.equalsIgnoreCase(MULTI, StringUtils.stripToEmpty(params[0]))) {
                this.multi = true;
            } else {
                this.dataType = nameToClass(StringUtils.stripToEmpty(params[0]));
            }
        }
    }
}

From source file:com.edgenius.wiki.ext.todo.model.TodoStatus.java

public boolean equals(Object obj) {
    if (!(obj instanceof TodoStatus))
        return false;

    return (((TodoStatus) obj).getSequence() == this.sequence)
            && (StringUtils.equalsIgnoreCase(((TodoStatus) obj).getText(), this.text));
}

From source file:com.sfs.whichdoctor.isb.publisher.IsbMessageSender.java

/**
 * Set whether the ISB message should be published to the bus completely.
 *
 * @param debugModeVal the debug mode//from   w w w  .  j  av  a2 s . c o  m
 */
public final void setDebugMode(final String debugModeVal) {
    this.debugMode = false;
    if (StringUtils.equalsIgnoreCase(debugModeVal, "true")) {
        this.debugMode = true;
    }
}

From source file:hydrograph.ui.validators.impl.FTPAuthenticationValidator.java

@Override
public boolean validate(Object object, String propertyName, Map<String, List<FixedWidthGridRow>> inputSchemaMap,
        boolean isJobFileImported) {
    Map<String, FTPAuthOperationDetails> additionalParam = null;
    if (object != null && Map.class.isAssignableFrom(object.getClass())) {
        additionalParam = (Map<String, FTPAuthOperationDetails>) object;
        if (!additionalParam.isEmpty()) {
            for (Map.Entry<String, FTPAuthOperationDetails> map : additionalParam.entrySet()) {
                FTPAuthOperationDetails details = map.getValue();
                if (map.getKey().contains("S3")) {
                    if (StringUtils.equalsIgnoreCase("AWS S3 Property File", map.getKey())) {
                        if (details.getField2() == null || details.getField2().isEmpty()) {
                            errorMessage = propertyName + " is mandatory";
                            return false;
                        }//from  w  w w .ja  v a 2  s.  c o m
                    } else {
                        if (details.getField1() == null || details.getField1().isEmpty()) {
                            errorMessage = propertyName + " is mandatory";
                            return false;
                        }
                        if (details.getField2() == null || details.getField2().isEmpty()) {
                            errorMessage = propertyName + " is mandatory";
                            return false;
                        }
                    }
                } else {
                    if (details.getField1() == null || details.getField1().isEmpty()) {
                        errorMessage = propertyName + " is mandatory";
                        return false;
                    }
                    if (details.getField2() == null || details.getField2().isEmpty()) {
                        errorMessage = propertyName + " is mandatory";
                        return false;
                    }
                }
            }
        }
    }

    return true;
}

From source file:com.widen.valet.importer.ImportBulkZones.java

private Zone findZone(String domain) {
    for (Zone z : existingZonesCache) {
        if (StringUtils.equalsIgnoreCase(z.name, domain)) {
            return z;
        }/*from   w  ww  .  j a va  2  s . c o  m*/
    }

    log.warn("zone {} does not exist", domain);

    return null;
}

From source file:com.tesora.dve.charset.NativeCharSet.java

public boolean isCompatibleWith(final String collation) {
    final String charsetName = Singletons.require(NativeCharSetCatalog.class).findCharSetByCollation(collation)
            .getName();/*www.  j  a  v  a  2  s. com*/
    return StringUtils.equalsIgnoreCase(name, charsetName);
}

From source file:hydrograph.ui.graph.editor.RenameJobParticipant.java

@Override
protected boolean initialize(Object element) {
    this.modifiedResource = (IFile) element;
    if (modifiedResource.getParent() != null && modifiedResource.getParent().getParent() instanceof IProject) {
        if (StringUtils.equalsIgnoreCase(Messages.PROPERTIES_EXT, modifiedResource.getFileExtension())) {
            if (!StringUtils.equalsIgnoreCase(modifiedResource.getParent().getName(), Messages.PARAM)) {
                return false;
            }//www  .  j  ava  2s  . c  o  m
        }
    }
    return true;
}

From source file:com.baifendian.swordfish.common.job.struct.node.impexp.reader.FileReader.java

@Override
public boolean checkValid() {
    return CollectionUtils.isNotEmpty(srcColumn) && CollectionUtils.isNotEmpty(targetColumn)
            && StringUtils.isNotEmpty(fieldDelimiter) && !StringUtils.equalsIgnoreCase(fieldDelimiter, "\n")
            && (StringUtils.isNotEmpty(hdfsPath) || StringUtils.isNotEmpty(fileName));
}

From source file:com.steeleforge.aem.ironsites.wcm.taglib.SetModeTag.java

@Override
public int doStartTag() throws JspException {
    try {/*from   w  w w  .j a  v a  2  s  .c om*/
        if (StringUtils.isBlank(getMode())) {
            return EVAL_BODY_BUFFERED;
        }
        this.wcmmode = WCMMode.fromRequest(WCMUtil.getSlingRequest(pageContext));
        for (WCMMode candidate : WCMMode.values()) {
            if (StringUtils.equalsIgnoreCase(getMode(), candidate.toString())) {
                candidate.toRequest(WCMUtil.getSlingRequest(pageContext));
                break;
            }
        }
    } catch (RuntimeException re) {
        LOG.debug(re.getMessage());
        throw new JspException(re);
    }
    return EVAL_BODY_BUFFERED;
}