Get child dependent parameters

@param report next report object
@param parameterName current parameter name
@return a map of all parameters that use the current parameter in theirs source definition
172855
public static Map<String, QueryParameter> getChildDependentParameters(Report report, String  parameterName) {
    	if (report == null) {
    		return new HashMap<String, QueryParameter>();
    	}
    	for (QueryParameter qp : report.getParameters()) {
    		if (qp.getName().equals(parameterName)) {
    			return getChildDependentParameters(report.getParameters(), qp);
    		}
    	}
    	return new HashMap<String, QueryParameter>();        
    }
592276
public ParameterValue getQueryParameter(String name) {
        if (!getQueryParameters().containsKey(name)) {
            return buildParameterValue();
        }

        return getQueryParameters().get(name);
    }
1275137
static String getRequiredParameter(Map<String, String> parameters,
                                       String parameterName)
            throws JournalException {
        String value = parameters.get(parameterName);
        if (value == null) {
            throw new JournalException("'" + parameterName + "' is required.");
        }
        return value;
    }
1004848
public static Map<String, QueryParameter> intersectParametersMap(List<Report> reports) {
    	Map<String, QueryParameter> map = new LinkedHashMap<String, QueryParameter>();
    	if ((reports == null) || (reports.size() == 0)) {
    		return map;
    	}
    	if (reports.size() == 1) {
    		return getUsedParametersMap(reports.get(0), false, false);
    	}    	
    	Map<String, QueryParameter> firstParamMap = getUsedParametersMap(reports.get(0), false, false);  
    	Map<String, QueryParameter> secondParamMap = getUsedParametersMap(reports.get(1), false, false);
        map = intersectParametersMap(firstParamMap, secondParamMap);
        
        for (int i=2, n=reports.size(); i<n; i++) {
        	Map<String, QueryParameter> paramMap = getUsedParametersMap(reports.get(i), false, false);
        	map = intersectParametersMap(map, paramMap);
        	if (map.size() == 0) {
        		break;
        	}
        }
        return map;
    }
1251655
public void actionRename(I_CmsReport report) {

        m_report = report;
        List locales = OpenCms.getLocaleManager().getAvailableLocales();
        List xmlPages = getXmlPages();
        if (ALL.equals(getParamLocale())) {
            Iterator i = locales.iterator();
            while (i.hasNext()) {
                Locale locale = (Locale)i.next();
                performRenameOperation(xmlPages, locale);
            }
        } else {
            performRenameOperation(xmlPages, CmsLocaleManager.getLocale(getParamLocale()));
        }
    }
468996
static StructrParameterDefinition deserialize(final StructrMethodDefinition parent, final String name, final Map<String, Object> source) {

		final StructrParameterDefinition newParameter = new StructrParameterDefinition(parent, name);

		newParameter.deserialize(source);

		return newParameter;
	}
791563
@Override
    public String getParameter(String name) {
        String value = super.getParameter(name);
        if (value == null) {
            value = parameters.get(name);
        }
        return value;
    }
534605
public static List<UIParameter> getValidUIParameterChildren(
            FacesContext facesContext, List<UIComponent> children,
            boolean skipNullValue, boolean skipUnrendered)
    {
        return getValidUIParameterChildren(facesContext, children,
                skipNullValue, skipUnrendered, true);
    }
132962
@SuppressWarnings("OptionalGetWithoutIsPresent") // Previous validation ensures this is fine.
  private ImmutableList<FieldSpec> adapterDependenciesInternal(
      Collection<AdapterDescriptor> adapters, Set<TypeName> scoped) {

    ImmutableList.Builder<FieldSpec> adapterFields = new ImmutableList.Builder<>();
    for (AdapterDescriptor adapter : adapters) {
      // Don't define the same adapter twice
      if (scoped.contains(adapter.typeName())) {
        continue;
      }
      scoped.add(adapter.typeName());

      if (!adapter.singletonInstance().isPresent()) {
        ConstructorInfo constructorInfo = adapter.constructorInfo().get();

        // Add dependencies, then create and add the current adapter
        List<AdapterDescriptor> adapterDependencies = new ArrayList<>();
        for (ConstructorInfo.Param param : constructorInfo.constructorParameters()) {
          if (param instanceof ConstructorInfo.AdapterParam) {
            adapterDependencies.add(((ConstructorInfo.AdapterParam) param).adapter);
          }
        }
        if (adapterDependencies.size() > 0) {
          adapterFields.addAll(adapterDependenciesInternal(adapterDependencies, scoped));
        }

        // Construct the single instance of this type adapter
        String adapterName = adapterNames.getName(adapter.typeName());
        CodeBlock parameters = getAdapterParameterList(constructorInfo);
        ParameterizedTypeName adapterInterfaceType =
            ParameterizedTypeName.get(TYPE_ADAPTER, adapter.adaptedTypeName());

        adapterFields.add(
            FieldSpec.builder(adapterInterfaceType, adapterName, STATIC, FINAL)
                .initializer(CodeBlock.of("new $T($L)", adapter.typeName(), parameters))
                .build());
      }
    }

    return adapterFields.build();
  }
498423
public static void initStaticNotHiddenDefaultParameterValues(Report report,
                                                           Map<String, Object> parameterValues) throws QueryException {
        Map<String, QueryParameter> params = getUsedParametersMap(report);
        for (QueryParameter qp : params.values()) {
            if (!qp.isHidden()) {
                initStaticDefaultParameterValues(qp, parameterValues);
            }
        }
    }
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;
    }
591317
def children_and_parameters(m:nn.Module):
    ""
    children = list(m.children())
    children_p = sum([[id(p) for p in c.parameters()] for c in m.children()],[])
    for p in m.parameters():
        if id(p) not in children_p: children.append(ParameterModule(p))
    return children
506687
@Override
    public Iterable<TableReportEntry> getReportEntries(String reportId, final AllTablesReportQuery query) {
        checkNotNull(reportId, "reportId");

        final String reportTable = getTableName(reportId);

        // Set up several filters based on the query attributes

        final Predicate<String> placementFilter = query.getPlacements().isEmpty()
                ? Predicates.<String>alwaysTrue()
                : Predicates.in(query.getPlacements());

        final Predicate<Boolean> droppedFilter = query.isIncludeDropped()
                ? Predicates.<Boolean>alwaysTrue()
                : Predicates.equalTo(false);

        final Predicate<Boolean> facadeFilter = query.isIncludeFacades()
                ? Predicates.<Boolean>alwaysTrue()
                : Predicates.equalTo(false);

        return new Iterable<TableReportEntry>() {
            @Override
            public Iterator<TableReportEntry> iterator() {
                return Iterators.limit(
                        Iterators.filter(
                                Iterators.transform(
                                        queryDataStoreForTableReportResults(reportTable, query),
                                        new Function<Map<String, Object>, TableReportEntry>() {
                                            @Nullable
                                            @Override
                                            public TableReportEntry apply(Map<String, Object> map) {
                                                if (Intrinsic.getId(map).startsWith("~")) {
                                                    // Skip this row, it's the metadata
                                                    return null;
                                                }
                                                return convertToTableReportEntry(
                                                        map, placementFilter, droppedFilter, facadeFilter);
                                            }
                                        }),
                                Predicates.notNull()
                        ),
                        query.getLimit()
                );
            }
        };
    }
1030765
public static List<Element> getChildren(Element parent, String childName) {
		ArrayList<Element> children = new ArrayList<Element>();
		NodeList nodes = parent.getChildNodes();
		for (int i = 0; i < nodes.getLength(); ++i) {
			Node node = nodes.item(i);
			if ((node instanceof Element) && node.getNodeName().equals(childName))
				children.add((Element)node);
		}
		return children;
	}
803160
public static Map<String, Object> getParamMap(final Condition condition) {
    final Map<String, Object> params = new HashMap<String, Object>();
    if (!Strings.contains(condition.getContent(), "?")) {
      final List<String> paramNames = condition.getParamNames();
      /*
       * Abort check param and names for it will updated by params invocation
       * if (paramNames.size() > condition.getParams().size()) { throw new RuntimeException(
       * "condition params not set [" + condition.getContent() + "] with value:" +
       * condition.getParams()); }
       */
      for (int i = 0; i < paramNames.size(); i++) {
        if (i >= condition.getParams().size()) break;
        params.put(paramNames.get(i), condition.getParams().get(i));
      }
    }
    return params;
  }
796747
public ParameterBinding getBindingFor(String name) {

        Assert.hasText(name, PARAMETER_NAME_MISSING);

        for (ParameterBinding binding : bindings) {
            if (binding.hasName(name)) {
                return binding;
            }
        }

        throw new IllegalArgumentException(String.format("No parameter binding found for name %s!", name));
    }
21000
@Override
  public Collection<ConfigKeyPath> getChildren(ConfigKeyPath configKey, String version)
      throws VersionDoesNotExistException {
    Preconditions.checkNotNull(configKey, "configKey cannot be null!");
    Preconditions.checkArgument(version.equals(getCurrentVersion()));

    List<ConfigKeyPath> children = new ArrayList<>();
    Path datasetDir = getDatasetDirForKey(configKey);

    try {

      if (!Files.exists(this.fs.getPath(datasetDir.toString()))) {
        return children;
      }

      Stream<Path> files = Files.walk(datasetDir, 1);

      for (Iterator<Path> it = files.iterator(); it.hasNext();) {
        Path path = it.next();

        if (Files.isDirectory(path) && !path.equals(datasetDir)) {
          children.add(configKey.createChild(StringUtils.removeEnd(path.getName(path.getNameCount() - 1).toString(),
              SingleLinkedListConfigKeyPath.PATH_DELIMETER)));
        }

      }
      return children;
    } catch (IOException e) {
      throw new RuntimeException(String.format("Error while getting children for configKey: \"%s\"", configKey), e);
    }
  }