Get string representing usage for this option, of the form "name metaval" or "name=metaval,
e.g. "--foo VALUE" or "--foo=VALUE"
@param rb ResourceBundle to get localized version of meta string
@param properties
Affects the formatting behaviours.
760521
public final String getNameAndMeta(ResourceBundle rb, ParserProperties properties) {
    	String str = option.isArgument() ? "" : option.toString();
    	String meta = getMetaVariable(rb);
    	if (meta != null) {
    		if (str.length() > 0) {
    			str += properties.getOptionValueDelimiter();
    		}
    		str += meta;
    	}
    	return str;
    }
957675
private function _checkResourceNameProperty()
    {
        if (!$this->resourceName) {
            if (Lang::has('resource-controller.propertynotset')) {
                $message = trans('resource-controller.propertynotset', ['property' => '$resourceName']);
            } else {
                $message = '$resourceName property must be set.';
            }

            throw new ResourceControllerException($message);
        }
    }
1048022
public String getStringProperty(final String name) {
        String prop = null;
        try {
            prop = System.getProperty(name);
        } catch (final SecurityException ignored) {
            // Ignore
        }
        return prop == null ? props.getProperty(name) : prop;
    }
853161
public static String get(Properties props, String name, String defval) {
    String value = props.getProperty(name);
    if (value == null)
      value = defval;
    return value;
  }
56575
private ResourceBundle getResourceBundleFromBundle(Object resource, String baseName, Locale locale, String versionRange)
    {
    	ResourceBundle resourceBundle = null;
        if (resource == null)
        {
            Object classAccess = this.getClassBundleService(null, baseName, versionRange, null, 0);
            if (classAccess != null)
            {
                if ((classAccess != null) && (USE_NO_RESOURCE_HACK))
                {
	                try {
						URL url = classAccess.getClass().getClassLoader().getResource(baseName);
						InputStream stream = url.openStream();
						resourceBundle = new PropertyResourceBundle(stream);
					} catch (IOException e) {
						e.printStackTrace();
					}
                }
                else
                {
                    ClassLoader loader = classAccess.getClass().getClassLoader();
                	resourceBundle = ResourceBundle.getBundle(baseName, locale, loader);
                }
            }
        }
        else
        {
        	Bundle bundle = this.findBundle(resource, bundleContext, ClassFinderActivator.getPackageName(baseName, true), versionRange);
            if (USE_NO_RESOURCE_HACK)
            {
                try {
                	// TODO - If I have to do this, then I will have to link up the resourcebundle using the locales.
                	baseName = baseName.replace('.', File.separatorChar) + ClassFinderActivator.PROPERTIES;
					URL url = bundle.getEntry(baseName);
					if (url != null)
						resourceBundle = new PropertyResourceBundle(url.openStream());
				} catch (IOException e) {
					e.printStackTrace();
				}
            }
            else
            {
            	ClassLoader loader = bundle.getClass().getClassLoader();
            	resourceBundle = ResourceBundle.getBundle(baseName, locale, loader);
            }
        }
        return resourceBundle;
    }
1180937
public String getProperty(String strProperty)
    {
        String strValue = null;
        if (m_properties != null)
        {   // Try local properties
            if (m_properties.get(strProperty) != null)
                strValue = m_properties.get(strProperty).toString();
            if ((strValue != null) && (strValue.length() > 0))
                return strValue;
        }
        if (this.getApplication() != null)
            strValue = this.getApplication().getProperty(strProperty);  // Try app
        return strValue;
    }
1191199
private function getPropertyMetadata(ResourceMetadata $resourceMetadata, string $resourceClass, string $io, array $visited, array $options): array
    {
        $data = [];

        foreach ($this->propertyNameCollectionFactory->create($resourceClass, $options) as $propertyName) {
            $propertyMetadata = $this->propertyMetadataFactory->create($resourceClass, $propertyName);
            if (
                ($propertyMetadata->isReadable() && self::OUT_PREFIX === $io) ||
                ($propertyMetadata->isWritable() && self::IN_PREFIX === $io)
            ) {
                $normalizedPropertyName = $this->nameConverter ? $this->nameConverter->normalize($propertyName, $resourceClass) : $propertyName;
                $data[$normalizedPropertyName] = $this->parseProperty($resourceMetadata, $propertyMetadata, $io, null, $visited);
            }
        }

        return $data;
    }
989185
static Properties convertResourceBundleToProperties(ResourceBundle resource) {
        Properties properties = new Properties();

        Enumeration<String> keys = resource.getKeys();
        while (keys.hasMoreElements()) {
            String key = keys.nextElement();
            properties.put(key, resource.getString(key));
        }

        return properties;
    }
473275
public String getProperty(String strProperty)
    {
        String strValue = null;
        if (m_properties != null)
        {   // Try local properties
            if (m_properties.get(strProperty) != null)
                strValue = m_properties.get(strProperty).toString();
            if ((strValue != null) && (strValue.length() > 0))
                return strValue;
        }
        if (this.getApplication() != null)
            strValue = this.getApplication().getProperty(strProperty);  // Try app
        if (strValue == null)
            if (Params.APPLET.equalsIgnoreCase(strProperty))
                return this.getClass().getName();
        return strValue;
    }
707534
public String getProperty(String strProperty)
    {
        String strValue = null;
        if (m_properties != null)
        {   // Try local properties
            if (m_properties.get(strProperty) != null)
                strValue = m_properties.get(strProperty).toString();
            if ((strValue != null) && (strValue.length() > 0))
                return strValue;
        }
        if (this.getServletRequest() != null)
            strValue = BaseHttpTask.getParam(this.getServletRequest(), strProperty, null);
        if (strValue != null)
            return strValue;
        if (DBParams.SERVLET.equalsIgnoreCase(strProperty))
        {   // Special case - looking for the name of the servlet
            if (this.getServletRequest() != null)
            {
                String strContextPath = this.getServletRequest().getRequestURI();
                if (strContextPath != null)
                    if (strContextPath.lastIndexOf('/') != -1)
                        strContextPath = strContextPath.substring(strContextPath.lastIndexOf('/') + 1);
                if (strContextPath != null)
                    return strContextPath;
            }
        }
        if (this.getApplication() != null)
            strValue = this.getApplication().getProperty(strProperty);  // Try app
        return strValue;
    }
1120986
private String readOptionalString(JSONValue val) {

        JSONString str = null == val ? null : val.isString();
        if (str != null) {
            return str.stringValue();
        }
        return null;
    }
751226
public static String getProperty(Class<?> aClass,String key,ResourceBundle resourceBundle)
	{
		return getSettings().getProperty(aClass, key, resourceBundle);
	}
560381
function(properties) {
        var body = '  <d:set>\n' +
            '   <d:prop>\n';

        for(var ii in properties) {
            if (!properties.hasOwnProperty(ii)) {
                continue;
            }

            var property = this.parseClarkNotation(ii);
            var propName;
            var propValue = properties[ii];
            if (this.xmlNamespaces[property.namespace]) {
                propName = this.xmlNamespaces[property.namespace] + ':' + property.name;
            } else {
                propName = 'x:' + property.name + ' xmlns:x="' + property.namespace + '"';
            }

            // FIXME: hard-coded for now until we allow properties to
            // specify whether to be escaped or not
            if (propName !== 'd:resourcetype') {
                propValue = dav._escapeXml(propValue);
            }
            body += '      <' + propName + '>' + propValue + '</' + propName + '>\n';
        }
        body +='    </d:prop>\n';
        body +='  </d:set>\n';
        return body;
    }
976115
private String getPropertyFileName(CmsResource res) {

        StringBuffer ret = new StringBuffer();

        // path to the parent folder
        String parentFolder = CmsResource.getParentFolder(res.getRootPath());
        ret.append(parentFolder);

        // make sure ends with a slash
        if (!parentFolder.endsWith("/")) {
            ret.append("/");
        }

        // append name of the property folder
        ret.append(PROPERTY_DIR);
        ret.append("/");

        // if resource is a folder add the prefix "__"
        if (res.isFolder()) {
            ret.append(FOLDER_PREFIX);
        }

        // append the name of the resource
        ret.append(res.getName());

        return ret.toString();
    }
974501
public static String getString(String name, String defaultVal){
        if(getConfiguration().containsKey(name)){
            return getConfiguration().getString(name);
        } else {
            return defaultVal;
        }
    }
558518
private String getProperty(String property) {

        String ret = sdkProperties.getProperty(property);

        if (null == ret) {
            logger.warn(String.format("No configuration value found for '%s'", property));
        }
        return ret;
    }
80411
private void getAnchorLegacyMetadataFromRel(ValueMap resourceProps, Element element) {
    // Check href attribute - do not change elements with no href or links to anchor names
    String href = element.getAttributeValue("href");
    String linkWindowTarget = element.getAttributeValue("target");
    if (href == null || href.startsWith("#")) {
      return;
    }

    // get link metadata from rel element
    JSONObject metadata = null;
    String metadataString = element.getAttributeValue("rel");
    if (StringUtils.isNotEmpty(metadataString)) {
      try {
        metadata = new JSONObject(metadataString);
      }
      catch (JSONException ex) {
        log.debug("Invalid link metadata: " + metadataString, ex);
      }
    }
    if (metadata == null) {
      metadata = new JSONObject();
    }

    // transform link metadata to virtual JCR resource with JCR properties
    JSONArray metadataPropertyNames = metadata.names();
    if (metadataPropertyNames != null) {
      for (int i = 0; i < metadataPropertyNames.length(); i++) {
        String metadataPropertyName = metadataPropertyNames.optString(i);

        // check if value is array
        JSONArray valueArray = metadata.optJSONArray(metadataPropertyName);
        if (valueArray != null) {
          // store array values
          List<String> values = new ArrayList<String>();
          for (int j = 0; j < valueArray.length(); j++) {
            values.add(valueArray.optString(j));
          }
          resourceProps.put(metadataPropertyName, values.toArray(new String[values.size()]));
        }
        else {
          // store simple value
          Object value = metadata.opt(metadataPropertyName);
          if (value != null) {
            resourceProps.put(metadataPropertyName, value);
          }
        }
      }
    }

    // detect link type
    LinkType linkType = null;
    String linkTypeString = resourceProps.get(LinkNameConstants.PN_LINK_TYPE, String.class);
    for (Class<? extends LinkType> candidateClass : linkHandlerConfig.getLinkTypes()) {
      LinkType candidate = AdaptTo.notNull(adaptable, candidateClass);
      if (StringUtils.isNotEmpty(linkTypeString)) {
        if (StringUtils.equals(linkTypeString, candidate.getId())) {
          linkType = candidate;
          break;
        }
      }
      else if (candidate.accepts(href)) {
        linkType = candidate;
        break;
      }
    }
    if (linkType == null) {
      // skip further processing if link type was not detected
      return;
    }

    // workaround: strip off ".html" extension if it was added automatically by the RTE
    if (linkType instanceof InternalLinkType || linkType instanceof MediaLinkType) {
      String htmlSuffix = "." + FileExtension.HTML;
      if (StringUtils.endsWith(href, htmlSuffix)) {
        href = StringUtils.substringBeforeLast(href, htmlSuffix);
      }
    }

    // store link reference (property depending on link type)
    resourceProps.put(linkType.getPrimaryLinkRefProperty(), href);
    resourceProps.put(LinkNameConstants.PN_LINK_WINDOW_TARGET, linkWindowTarget);

  }