Class ParametersUtil


  • public final class ParametersUtil
    extends Object
    Refactored the PopulateSearchParameterMap code, and marked class as final so there are no 'children' and inheritance which overwrites the behaviors of the buildInSearchParameters.
    Call init() before using the class in order to avoid a slight performance hit on first use.
    • Method Detail

      • init

        public static void init()
        Loads the class in the classloader to initialize static members. Call this before using the class in order to avoid a slight performance hit on first use.
      • getCanonicalUrl

        public static String getCanonicalUrl​(SearchParameter sp)
        Construct the canonical URL from the SearchParameter's url and version
        Returns:
        the url of this search parameter with a version postfix (if version is non-null)
      • getTenantSPs

        public static Map<String,​ParametersMap> getTenantSPs​(String tenantId)
        Get the applicable SearchParameter objects for a particular tenant.
        Parameters:
        tenantId -
        Returns:
        a set of ParametersMaps, organized by resource type; never null
      • getAllSearchParameters

        public static Set<SearchParameter> getAllSearchParameters()
        Get all search parameters of all types from the registry.
        Returns:
      • checkAndWarnForIssueWithCodeAndName

        static void checkAndWarnForIssueWithCodeAndName​(String code,
                                                        String name)
        checks and warns if name and code are not equivalent.
        Parameters:
        code -
        name -
      • print

        public static void print​(PrintStream out)
        convenience method to print the output of the Search Parameters.
        Parameters:
        out -
      • printSearchParameter

        public static void printSearchParameter​(SearchParameter parameter,
                                                PrintStream out)
        outputs the search parameter.
        Parameters:
        parameter -
        out -