code: private String addPathProperty(final List<String> command, final String typeName, final String propertyName, final Map<String, String> properties, final DirectoryGrouping directoryGrouping,
                                     final File typeDir, File serverDir) {
          final String result;
          final String value = properties.get(propertyName);
          if (value == null) {
              switch (directoryGrouping) {
                  case BY_TYPE:
                      result = getAbsolutePath(typeDir, "servers", serverName);
                      break;
                  case BY_SERVER:
                  default:
                      result = getAbsolutePath(serverDir, typeName);
                      break;
              }
              properties.put(propertyName, result);
          } else {
              final File dir = new File(value);
              switch (directoryGrouping) {
                  case BY_TYPE:
                      result = getAbsolutePath(dir, "servers", serverName);
                      break;
                  case BY_SERVER:
                  default:
                      result = getAbsolutePath(dir, serverName);
                      break;
              }
          }
          command.add(String.format("-D%s=%s", propertyName, result));
          return result;
      }
docs: Adds the absolute path to command.
  
  @param command           the command to add the arguments to.
  @param typeName          the type of directory.
  @param propertyName      the name of the property.
  @param properties        the properties where the path may already be defined.
  @param directoryGrouping the directory group type.
  @param typeDir           the domain level directory for the given directory type; to be used for by-type grouping
  @param serverDir         the root directory for the server, to be used for 'by-server' grouping
  @return the absolute path that was added.