Get parameters which passed from the file.

@throws RepositoryConfigurationException
979413
private void readParamsFromFile()
   {
      PropertiesParam pps = initParams.getPropertiesParam(BACKUP_PROPERTIES);

      backupDir = pps.getProperty(BACKUP_DIR);
      // full backup type can be not defined. Using default.
      fullBackupType =
         pps.getProperty(FULL_BACKUP_TYPE) == null ? DEFAULT_VALUE_FULL_BACKUP_TYPE : pps.getProperty(FULL_BACKUP_TYPE);
      // incremental backup can be not configured. Using default values.
      defIncrPeriod =
         pps.getProperty(DEFAULT_INCREMENTAL_JOB_PERIOD) == null ? DEFAULT_VALUE_INCREMENTAL_JOB_PERIOD : pps
            .getProperty(DEFAULT_INCREMENTAL_JOB_PERIOD);
      incrementalBackupType =
         pps.getProperty(INCREMENTAL_BACKUP_TYPE) == null ? DEFAULT_VALUE_INCREMENTAL_BACKUP_TYPE : pps
            .getProperty(INCREMENTAL_BACKUP_TYPE);

      LOG.info("Backup dir from configuration file: " + backupDir);
      LOG.info("Full backup type from configuration file: " + fullBackupType);
      LOG.info("(Experimental) Incremental backup type from configuration file: " + incrementalBackupType);
      LOG.info("(Experimental) Default incremental job period from configuration file: " + defIncrPeriod);

      checkParams();
   }
209931
@GET
    @Path("parameters")
    public Map<String, String> getConnectionParameters()
            throws GuacamoleException {

        // Pull effective permissions
        Permissions effective = userContext.self().getEffectivePermissions();

        // Retrieve permission sets
        SystemPermissionSet systemPermissions = effective.getSystemPermissions();
        ObjectPermissionSet connectionPermissions = effective.getConnectionPermissions();

        // Deny access if adminstrative or update permission is missing
        String identifier = connection.getIdentifier();
        if (!systemPermissions.hasPermission(SystemPermission.Type.ADMINISTER)
         && !connectionPermissions.hasPermission(ObjectPermission.Type.UPDATE, identifier))
            throw new GuacamoleSecurityException("Permission to read connection parameters denied.");

        // Retrieve connection configuration
        GuacamoleConfiguration config = connection.getConfiguration();

        // Return parameter map
        return config.getParameters();

    }
454759
private function getConfigurationParameters(ConfigurationInterface $configuration)
    {
        $parameters = [];

        $values = $configuration->getValues();

        foreach ($configuration->getModel() as $parameterModel) {
            $parameterName = $parameterModel->getName();
            $parameterType = $parameterModel->getType();
            $parameterDataType = $parameterModel->getDataType();

            if (!array_key_exists($parameterName, $values)) {
                continue;
            }

            $value = $values[$parameterName];

            if ($value == $parameterModel->getDefaultValue()
                && !isset($this->persistedParameters[$configuration->getName()][$parameterName])
            ) {
                continue;
            }
            if (null !== $value && gettype($value) !== $parameterDataType) {
                $message = sprintf(
                    'Parameter "%s" of configuration "%s" must have value of "%s" type, "%s" type value provided.',
                    $parameterName,
                    $configuration->getName(),
                    $parameterDataType,
                    gettype($value)
                );

                throw new ConfigurationException($message);
            }

            $value = $this->parameterValueConverter->toString($value, $parameterType, $parameterModel->getOptions());

            $parameters[] = new Parameter($configuration->getName(), $parameterName, $parameterType, $value);
        }

        return $parameters;
    }
1166340
@Override
    public Map<String, Object> getParameters(
            HttpServletRequest request, HttpServletResponse response) {
        final Map<String, Object> mergedParameters = new LinkedHashMap<String, Object>();

        for (final TransformerConfigurationSource source : this.sources) {
            final Map<String, Object> parameters = source.getParameters(request, response);
            if (parameters != null) {
                mergedParameters.putAll(parameters);
            }
        }

        return mergedParameters;
    }
726003
private function getCommandParameters()
    {
        // Map our config options to PhantomJS options.
        $mapping = [
            'port' => '--webdriver',
            'proxy' => '--proxy',
            'proxyType' => '--proxy-type',
            'proxyAuth' => '--proxy-auth',
            'webSecurity' => '--web-security',
            'ignoreSslErrors' => '--ignore-ssl-errors',
            'sslProtocol' => '--ssl-protocol',
            'sslCertificatesPath' => '--ssl-certificates-path',
            'remoteDebuggerPort' => '--remote-debugger-port',
            'remoteDebuggerAutorun' => '--remote-debugger-autorun',
            'cookiesFile' => '--cookies-file',
            'diskCache' => '--disk-cache',
            'maxDiskCacheSize' => '--max-disk-cache-size',
            'loadImages' => '--load-images',
            'localStoragePath' => '--local-storage-path',
            'localStorageQuota' => '--local-storage-quota',
            'localToRemoteUrlAccess' => '--local-to-remote-url-access',
            'outputEncoding' => '--output-encoding',
            'scriptEncoding' => '--script-encoding',
            'webdriverLoglevel' => '--webdriver-loglevel',
            'webdriverLogfile' => '--webdriver-logfile',
        ];

        $params = [];
        foreach ($this->config as $configKey => $configValue) {
            if (!empty($mapping[$configKey])) {
                if (is_bool($configValue)) {
                    // Make sure the value is true/false and not 1/0.
                    $configValue = $configValue ? 'true' : 'false';
                }
                $params[] = $mapping[$configKey] . '=' . $configValue;
            }
        }

        return implode(' ', $params);
    }
1170810
protected void readParamsFromRegistryService(SessionProvider sessionProvider) throws PathNotFoundException,
      RepositoryException
   {
      if (LOG.isDebugEnabled())
      {
         LOG.debug("<<< Read init parametrs from registry service.");
      }

      observationListenerConfiguration = new ObservationListenerConfiguration();

      String entryPath = RegistryService.EXO_SERVICES + "/" + SERVICE_NAME + "/" + "nodeType";
      RegistryEntry registryEntry = registryService.getEntry(sessionProvider, entryPath);
      Document doc = registryEntry.getDocument();
      Element element = doc.getDocumentElement();
      nodeType = getAttributeSmart(element, "value");

      entryPath = RegistryService.EXO_SERVICES + "/" + SERVICE_NAME + "/" + "repository";
      registryEntry = registryService.getEntry(sessionProvider, entryPath);
      doc = registryEntry.getDocument();
      element = doc.getDocumentElement();
      observationListenerConfiguration.setRepository(getAttributeSmart(element, "value"));

      entryPath = RegistryService.EXO_SERVICES + "/" + SERVICE_NAME + "/" + "workspaces";
      registryEntry = registryService.getEntry(sessionProvider, entryPath);
      doc = registryEntry.getDocument();
      element = doc.getDocumentElement();
      String workspaces = getAttributeSmart(element, "value");

      String ws[] = workspaces.split(";");
      List<String> wsList = new ArrayList<String>();
      for (String w : ws)
      {
         wsList.add(w);
      }

      observationListenerConfiguration.setWorkspaces(wsList);

      LOG.info("NodeType from RegistryService: " + getNodeType());
      LOG.info("Repository name from RegistryService: "
         + (observationListenerConfiguration.getRepository() != null ? observationListenerConfiguration.getRepository()
            : "not configured, will be used the current one"));

      LOG.info("List of workspaces from RegistryService: " + observationListenerConfiguration.getWorkspaces());
   }
117896
private function readConfigFile()
    {
        // reading the config file to be stored in the 'configurations' variable below
        $configurations = $this->config_reader->get('api');
        $this->mappers_base_namespace = $configurations['mappers'];
        $this->limit = $configurations['limit'];
    }
162194
@Override
    public Map<String, Object> getQueryParameters() {
        HashMap<String, Object> params = new HashMap<String, Object>();
        params.put("userId", this.userId.toString());
        params.put("itemId", this.itemId.toString());
        if (this.sessionId!=null) {
            params.put("sessionId", this.sessionId.toString());
        }
        return params;
    }
1315571
protected ManageableRepository getWorkingRepository() throws RepositoryException, RepositoryConfigurationException
   {
      return repositoryName != null ? repositoryService.getRepository(repositoryName) : repositoryService
         .getCurrentRepository();
   }
135761
protected function loadConfigurationFiles(Application $app, RepositoryContract $repository)
    {
        $files = $this->getConfigurationFiles($app);

        if (! isset($files['app'])) {
            throw new Exception('Unable to load the "app" configuration file.');
        }

        foreach ($files as $key => $path) {
            $repository->set($key, require $path);
        }
    }
438759
private void readParamsFromRegistryService(SessionProvider sessionProvider) throws PathNotFoundException,
            RepositoryException
   {
      String entryPath = RegistryService.EXO_SERVICES + "/" + SERVICE_NAME + "/" + "workspace";
      RegistryEntry registryEntry = registryService.getEntry(sessionProvider, entryPath);
      Document doc = registryEntry.getDocument();
      Element element = doc.getDocumentElement();
      repoWorkspaceName = getAttributeSmart(element, "value");

      entryPath = RegistryService.EXO_SERVICES + "/" + SERVICE_NAME + "/" + "rootNode";
      registryEntry = registryService.getEntry(sessionProvider, entryPath);
      doc = registryEntry.getDocument();
      element = doc.getDocumentElement();
      rootNodePath = getAttributeSmart(element, "value");

      LOG.info("Workspace from RegistryService: " + repoWorkspaceName);
      LOG.info("RootNode from RegistryService: " + rootNodePath);
   }
930424
protected function updateParameters()
    {
        $filename = $this->projectDir.'/app/config/parameters.yml';

        if (!is_writable($filename)) {
            if ($this->output->isVerbose()) {
                $this->output->writeln(sprintf(
                    " <comment>[WARNING]</comment> The value of the <info>secret</info> configuration option cannot be updated because\n".
                    " the <comment>%s</comment> file is not writable.\n",
                    $filename
                ));
            }

            return $this;
        }

        $ret = str_replace('ThisTokenIsNotSoSecretChangeIt', $this->generateRandomSecret(), file_get_contents($filename));
        file_put_contents($filename, $ret);

        return $this;
    }
756503
protected function getParameterInfo()
    {
        $params = array();

        $parameters = $this->reflection->getParameters();
        foreach ($parameters as $parameter) {
            $params[$parameter->getName()] = array(
                'name'      => $parameter->getName(),
                'hint_type' => $parameter->getOriginalTypeHint(),
                'type'      => $parameter->getOriginalTypeHint(),
                'comment'   => null
            );

            if ($parameter->isDefaultValueAvailable()) {
                try {
                    $params[$parameter->getName()]['default'] = trim($parameter->getDefaultValueDefinition());
                } catch (\Exception\RuntimeException $e) {
                    // Just don't provide a default
                }
            }
        }

        $annotations = array_filter($this->getParser()->getAnnotations(), function ($v) {
            $e = explode(' ', $v);
            return isset($e[0]) && $e[0] == '@param';
        });
        foreach ($annotations as $parameter) {
            $parts = explode(' ', $parameter);

            if (count($parts) < 3) {
                continue;
            }

            $type = trim($parts[1]);
            $name = trim(str_replace('$', '', $parts[2]));
            $comment = trim(implode(' ', array_slice($parts, 3)));

            if (isset($params[$name])) {
                if ($params[$name]['type'] == null && $type) {
                    $params[$name]['type'] = $type;
                }
                if ($comment) {
                    $params[$name]['comment'] = $comment;
                }
            }
        }

        return $params;
    }
866078
private void readParameters() {
        ItemRuleMap parameterItemRuleMap = getRequestRule().getParameterItemRuleMap();
        if (parameterItemRuleMap != null && !parameterItemRuleMap.isEmpty()) {
            ItemRuleList parameterItemRuleList = new ItemRuleList(parameterItemRuleMap.values());
            determineSimpleMode(parameterItemRuleList);
            if (procedural) {
                console.setStyle("GREEN");
                console.writeLine("Required parameters:");
                console.styleOff();

                if (!simpleInputMode) {
                    for (ItemRule itemRule : parameterItemRuleList) {
                        Token[] tokens = itemRule.getAllTokens();
                        if (tokens == null) {
                            Token t = new Token(TokenType.PARAMETER, itemRule.getName());
                            t.setDefaultValue(itemRule.getDefaultValue());
                            tokens = new Token[] {t};
                        }
                        String mandatoryMarker = itemRule.isMandatory() ? " * " : "   ";
                        console.setStyle("YELLOW");
                        console.write(mandatoryMarker);
                        console.styleOff();
                        console.setStyle("bold");
                        console.write(itemRule.getName());
                        console.styleOff();
                        console.write(": ");
                        writeToken(tokens);
                        console.writeLine();
                    }
                }
            }
            readRequiredParameters(parameterItemRuleList);
        }
    }
340544
@Override
	public Parameter getParam(final String paramName) {
		Parameter param = getBindParameter(paramName);
		if (param == null) {
			Map<String, Parameter> constParams = getConstParameterMap();
			if (constParams != null) {
				param = constParams.get(paramName.toUpperCase());
			}
		}
		return param;
	}
421188
@Override
  public Configuration getConfiguration() {
    return Tang.Factory.getTang().newConfigurationBuilder()
        .bindNamedParameter(TcpPortRangeBegin.class, String.valueOf(portRangeBegin))
        .bindNamedParameter(TcpPortRangeCount.class, String.valueOf(portRangeCount))
        .bindNamedParameter(TcpPortRangeTryCount.class, String.valueOf(portRangeTryCount))
        .bindSetEntry(EvaluatorConfigurationProviders.class, TcpPortConfigurationProvider.class)
        .build();
  }
523353
public static File[] listRepositories(File parent) {
        if (parent == null) {
            throw new IllegalArgumentException("Input parameter can't be null.");
        }
        parent = checkKnownType(parent);
        if (!parent.isDirectory()) {
            throw new IllegalArgumentException("Input parameter should be an existing directory: " + parent);
        }
        File[] result = parent.listFiles(new FileFilter() {
            @Override
            public boolean accept(File pathname) {
                return pathname.isDirectory() &&
                       getChild(pathname, LogRepositoryBrowserImpl.DEFAULT_LOCATION).isDirectory() ||
                       getChild(pathname, LogRepositoryBrowserImpl.TRACE_LOCATION).isDirectory();
            }
        });
        return result == null ? new File[] {} : result;
    }