/**
   * Override of InputField copy to setup properties necessary to make the field usable for
   * inputting search criteria.
   *
   * <p>Note super is not being called because we don't want to add restirctions that can cause
   * problems with the use of wildcard {@inheritDoc}
   */
  @Override
  public void copyFromAttributeDefinition(AttributeDefinition attributeDefinition) {
    // label
    if (StringUtils.isEmpty(getLabel())) {
      setLabel(attributeDefinition.getLabel());
    }

    // short label
    if (StringUtils.isEmpty(getShortLabel())) {
      setShortLabel(attributeDefinition.getShortLabel());
    }

    // security
    if ((attributeDefinition.getAttributeSecurity() != null)
        && ((getDataFieldSecurity() == null)
            || (getDataFieldSecurity().getAttributeSecurity() == null))) {
      initializeComponentSecurity();

      getDataFieldSecurity().setAttributeSecurity(attributeDefinition.getAttributeSecurity());
    }

    // options
    if (getOptionsFinder() == null) {
      setOptionsFinder(attributeDefinition.getOptionsFinder());
    }

    // use control from dictionary if not specified and convert for searching
    if (getControl() == null) {
      Control control = convertControlToLookupControl(attributeDefinition);
      setControl(control);
    }

    // overwrite maxLength to allow for wildcards and ranges; set a minimum max length unless it is
    // greater than 100
    setMaxLength(100);
    if (attributeDefinition.getMaxLength() != null && (attributeDefinition.getMaxLength() > 100)) {
      setMaxLength(attributeDefinition.getMaxLength());
    }

    // set default value for active field to true
    if (getDefaultValue() == null
        || (getDefaultValue() instanceof String
            && StringUtils.isEmpty((String) getDefaultValue()))) {
      if ((StringUtils.equals(getPropertyName(), KRADPropertyConstants.ACTIVE))) {
        setDefaultValue(KRADConstants.YES_INDICATOR_VALUE);
      }
    }
  }
  /**
   * @see
   *     org.kuali.rice.krad.service.DataDictionaryService#getAttributeDisplayMask(java.lang.String,
   *     java.lang.String)
   */
  public AttributeSecurity getAttributeSecurity(String entryName, String attributeName) {
    AttributeSecurity attributeSecurity = null;

    AttributeDefinition attributeDefinition = getAttributeDefinition(entryName, attributeName);
    if (attributeDefinition != null) {
      attributeSecurity = attributeDefinition.getAttributeSecurity();
    }

    return attributeSecurity;
  }