Retrieve system property by name, failing if it's not found

@param propertyName
@param errorMsgIfNotFound
@return Value of property if it exists
346038
public static String getRequiredSystemProperty(String propertyName, String errorMsgIfNotFound) {
        String propertyValue = System.getProperty(propertyName);
        if (propertyValue == null) {
            throw new RuntimeException(errorMsgIfNotFound);
        }
        return propertyValue;
    }
985606
public FessMessages addErrorsCouldNotFindBackupIndex(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_could_not_find_backup_index));
        return this;
    }
180264
private String getSourceName(final String property) {
        if (propertyNameMap.containsKey(property)) {
            return propertyNameMap.get(property);
        } else {
            return property;
        }
    }
371513
public String getString(String propertyName) {
        Object obj = get(propertyName);
        return obj != null ? obj.toString() : null;
    }
169902
public String getProperty(String propertyName)
    {
        ChangeStack<String> stack = properties.get(propertyName);
        if (stack == null)
        {
            return null;
        }

        return stack.getCurrentValue();
    }
1240845
public BlockProperty findPropertyBlockByName( String propertyName ) {

		BlockProperty result = null;
		for( AbstractBlock region : this.innerBlocks ) {
			if( region.getInstructionType() == PROPERTY
					&& propertyName.equals(((BlockProperty) region).getName())) {

				result = (BlockProperty) region;
				break;
			}
		}

		return result;
	}
849612
protected final int getIntValue(final String propertyName, int defaultValue) {
        int result;
        String property = this.properties.getProperty(propertyName);
        try {
            result = Integer.parseInt(property);
        } catch (NumberFormatException e) {
            LOGGER.warn("Invalid integer property in configuration: {}",
                    propertyName);
            result = defaultValue;
        }
        return result;
    }
1012049
public static Boolean getBoolean(String propertyName, String envName, Boolean defaultValue) {
		checkEnvName(envName);
		Boolean propertyValue = BooleanUtil.toBooleanObject(System.getProperty(propertyName), null);
		if (propertyValue != null) {
			return propertyValue;
		} else {
			propertyValue = BooleanUtil.toBooleanObject(System.getenv(envName), null);
			return propertyValue != null ? propertyValue : defaultValue;
		}
	}
584177
private static String getProperty(Properties extensionProperties, String propertyName) {
        if (extensionProperties.containsKey(propertyName)) {
            Object value = extensionProperties.get(propertyName);
            if (value != null) {
                return value.toString();
            }
        }

        return null;
    }
1135303
public String getColumnNameForProperty(final String propertyName)
   {
     return Optional.ofNullable(propertyToField.get(propertyName))
                    .map(fcInfo -> fcInfo.getDelimitedColumnName())
                    .orElse(null);
   }
1338696
@Override
    public String getProperty(String name) {
        try {
            if (name.startsWith(PREFIX) && initPropertyService()) {
                return propertyService.getValue(name.substring(PREFIX_LEN), null);
            }
        } catch (Exception e) {
            log.error("Exception getting property.", e);
        }
        
        return null;
    }
781664
public String getPropertyValueName(int property, int value, int nameChoice) {
        int valueMapIndex=findProperty(property);
        if(valueMapIndex==0) {
            throw new IllegalArgumentException(
                    "Invalid property enum "+property+" (0x"+Integer.toHexString(property)+")");
        }
        int nameGroupOffset=findPropertyValueNameGroup(valueMaps[valueMapIndex+1], value);
        if(nameGroupOffset==0) {
            throw new IllegalArgumentException(
                    "Property "+property+" (0x"+Integer.toHexString(property)+
                    ") does not have named values");
        }
        return getName(nameGroupOffset, nameChoice);
    }
199882
private String checkProperty(String propName) throws AttributeNotSupportedException {
        final String METHODNAME = "checkProperty";
        boolean inRepos = false;
        boolean inLA = false;
        if (propName.equals(xsiType)) {
/*
 * if (trcLogger.isLoggable(Level.FINER)) {
 * trcLogger.exiting(CLASSNAME, METHODNAME, " " + propName
 * + " is defined in Repository " + repos);
 * }
 */ return repos;
        }
        inRepos = false;
        for (int i = 0; i < entityTypes.size() && !inRepos; i++) {
            inRepos = _metaDataMapper.isPropertyInRepository(propName,
                                                             entityTypes.get(i));
        }
        if (!inRepos) {
            for (int i = 0; i < entityTypes.size(); i++) {
                inLA = _metaDataMapper.isPropertyInLookAside(propName,
                                                             entityTypes.get(i));
            }
        } else {
/*
 * if (trcLogger.isLoggable(Level.FINER)) {
 * trcLogger.exiting(CLASSNAME, METHODNAME, "Property " + propName
 * + " is defined in Repository " + repos);
 * }
 */ return repos;
        }
        if (!inRepos && !inLA) {
            throw new AttributeNotSupportedException(WIMMessageKey.ATTRIBUTE_NOT_SUPPORTED, WIMMessageKey.ATTRIBUTE_NOT_SUPPORTED);
        }
/*
 * if (trcLogger.isLoggable(Level.FINER)) {
 * trcLogger.exiting(CLASSNAME, METHODNAME, "Property " + propName
 * + " is defined in Repository " + la);
 * }
 */ return la;
    }
1236947
public FessMessages addErrorsDesignFileNameIsNotFound(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_design_file_name_is_not_found));
        return this;
    }
66018
public FessMessages addErrorsDesignJspFileDoesNotExist(String property) {
        assertPropertyNotNull(property);
        add(property, new UserMessage(ERRORS_design_jsp_file_does_not_exist));
        return this;
    }
822395
private void throwCannotInstanciateUnsupported(EJBBinding binding,
                                                   JavaColonNamespace jndiType,
                                                   String lookupName,
                                                   String messageId) throws NameNotFoundException {
        J2EEName j2eeName = getJ2EEName(binding);
        String jndiName = jndiType.toString() + "/" + lookupName;
        String msgTxt = Tr.formatMessage(tc, messageId,
                                         binding.interfaceName,
                                         j2eeName.getComponent(),
                                         j2eeName.getModule(),
                                         j2eeName.getApplication(),
                                         jndiName);
        throw (new NameNotFoundException(msgTxt));
    }
1252898
private static long getMsFromProperty(final String propertyName,
            final String propertyNameInSeconds) {
        String property = PropertiesUtils.getProperty(propertyName);
        if (property != null) {
            return Long.parseLong(property);
        }
        return Integer.parseInt(PropertiesUtils.getProperty(propertyNameInSeconds))
                * MILLISECS_IN_A_SECOND;
    }