Checks whether the specified event name is restricted. If it is,
then create a pending error, and abort.

@param name The event name
@return Boolean indication whether the event name is restricted
506041
ValidationResult isRestrictedEventName(String name) {
        ValidationResult error = new ValidationResult();
        if (name == null) {
            error.setErrorCode(510);
            error.setErrorDesc("Event Name is null");
            return error;
        }
        for (String x : restrictedNames)
            if (name.equalsIgnoreCase(x)) {
                // The event name is restricted

                error.setErrorCode(513);
                error.setErrorDesc(name + " is a restricted event name. Last event aborted.");
                Logger.v(name + " is a restricted system event name. Last event aborted.");
                return error;
            }
        return error;
    }
562945
public static boolean isSimpleName(String name) {
    if (name == null || name.isEmpty()) {
      return false;
    }
    if (!Character.isJavaIdentifierStart(name.charAt(0))) {
      return false;
    }
    int len = name.length();
    for (int i = 1; i < len; ++i) {
      if (!Character.isJavaIdentifierPart(name.charAt(i))) {
        return false;
      }
    }
    return true;
  }
542816
public boolean nameExists(final String name) {
        boolean rslt = false; // default
        try {
            final ITenant tenant = this.tenantDao.getTenantByName(name);
            rslt = tenant != null;
        } catch (IllegalArgumentException iae) {
            // This exception is completely fine;  it simply
            // means there is no tenant with this name.
            rslt = false;
        }
        return rslt;
    }
303515
public static boolean isValid(String name) {
		char[] nameChars = name.toCharArray();
		for (int i = 0; i < nameChars.length; i++) {
			boolean valid = i == 0 ? Character.isJavaIdentifierStart(nameChars[i]) : Character.isJavaIdentifierPart(nameChars[i]);
			if (!valid) {
				return valid;
			}
		}
		return true;
	}
1252979
public static void checkResourceName(String name) {
        if (name == null || (!name.isEmpty() && !name.matches("^[a-zA-Z0-9_;\\-\\.\\[\\]\\(\\)]+$"))) {
            throw new IllegalArgumentException("name(" + name + ") contains illegal character, must be (a-z,A-Z,0-9,_,.,(,),-,[,])");
        }
    }
510359
public boolean hasValidationStamp(String name, String status) {
        return (StringUtils.equals(name, getValidationStamp().getName()))
                && isRun()
                && (
                StringUtils.isBlank(status)
                        || StringUtils.equals(status, getLastStatus().getStatusID().getId())
        );
    }
164458
public boolean isAttrFlagSet(String name, int flags)
    {
        return (null != m_attrs)
            ? ((m_attrs.getIgnoreCase(name) & flags) != 0)
            : false;
    }
884636
public boolean hasEvents(final EventType _eventtype)
    {
        if (!this.eventChecked) {
            this.eventChecked = true;
            try {
                EventDefinition.addEvents(this);
            } catch (final EFapsException e) {
                AbstractAdminObject.LOG.error("Could not read events for Name:; {}', UUID: {}",  this.name, this.uuid);
            }
        }
        return this.events.get(_eventtype) != null;
    }
106259
public static boolean isValidName(String name) {
    final int length = name.length();
    if (length == 0) {
      return false;
    }
    char ch = name.charAt(0);
    if (!isNameStart(ch)) {
      return false;
    }
    for (int i = 1; i < length; ++i) {
      ch = name.charAt(i);
      if (!isName(ch)) {
        return false;
      }
    }
    return true;
  }
351154
protected IStatus validateNameAgainstOtherSREs(String name) {
		IStatus nameStatus = SARLEclipsePlugin.getDefault().createOkStatus();
		if (isDuplicateName(name)) {
			nameStatus = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
					ISREInstall.CODE_NAME,
					Messages.SREInstallWizard_1);
		} else {
			final IStatus status = ResourcesPlugin.getWorkspace().validateName(name, IResource.FILE);
			if (!status.isOK()) {
				nameStatus = SARLEclipsePlugin.getDefault().createStatus(IStatus.ERROR,
						ISREInstall.CODE_NAME,
						MessageFormat.format(Messages.SREInstallWizard_2, status.getMessage()));
			}
		}
		return nameStatus;
	}
58859
public boolean containsName(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return true;
            }
        }
        return false;
    }
516663
public static boolean isSeparateChecksumBlockFilename(String name) {
    if (isBlockFileName(name) && name.indexOf('.') < 0
        && name.indexOf('_', BLOCK_FILE_PREFIX.length()) < 0) {
      return true;
    } 
    return false;
  }
1300285
protected boolean isValidEventNameForScope(String eventName, Element listenerElement) {
    if (eventName != null && eventName.trim().length() > 0) {
      if ("start".equals(eventName) || "end".equals(eventName)) {
        return true;
      } else {
        addError("Attribute 'event' must be one of {start|end}", listenerElement);
      }
    } else {
      addError("Attribute 'event' is mandatory on listener", listenerElement);
    }
    return false;
  }
613936
public static boolean isStarQualifiedName(String name) {
    return name != null
        && name.endsWith(".*")
        && isQualifiedName(name.substring(0, name.length() - 2));
  }
458893
public static void checkGoodName(String name) throws Failure {
        if(name==null || name.length()==0)
            throw new Failure(Messages.Hudson_NoName());

        if(".".equals(name.trim()))
            throw new Failure(Messages.Jenkins_NotAllowedName("."));
        if("..".equals(name.trim()))
            throw new Failure(Messages.Jenkins_NotAllowedName(".."));
        for( int i=0; i<name.length(); i++ ) {
            char ch = name.charAt(i);
            if(Character.isISOControl(ch)) {
                throw new Failure(Messages.Hudson_ControlCodeNotAllowed(toPrintableName(name)));
            }
            if("?*/\\%!@#$^&|<>[]:;".indexOf(ch)!=-1)
                throw new Failure(Messages.Hudson_UnsafeChar(ch));
        }

        // looks good
    }
193568
protected boolean isStartTagEvent(XMLEvent event, QName tagName) {
        return event.isStartElement()
                && event.asStartElement().getName().equals(tagName);
    }
158138
public static boolean isSupportedRasterExtension( String name ) {
        for( String ext : supportedRasters ) {
            if (name.toLowerCase().endsWith(ext)) {
                return true;
            }
        }
        return false;
    }