Class FilterableSelectionFieldDescriptor.SearchableType

    • Constructor Detail

      • SearchableType

        public SearchableType​(String name,
                              String tabTitle,
                              String endpoint,
                              String idField,
                              String displayNameField)
        These types define the parameters that will get used in the selection.js file for dynamic searching in the admin console.
        Parameters:
        tabTitle - - The will display as the tab title in the UI (Header to click on). MUST BE UNIQUE
        endpoint - - The endpoint the javascript will make GET requests to get items to display.
        idField - - This is the field in the JSON that gets returned that the javascript should use as the identifier. When the form is submitted, the value will be TYPE-idField
        displayNameField - - This is the field in the JSON that should be used as a display name in the UI. idField could often be the string to display in the UI, however, this parameter can be used to display something different.
    • Method Detail

      • getApiPrefix

        public static String getApiPrefix()
        Gets the API prefix of a SearchableType.
        Returns:
        the Admin API prefix
      • getEndpoint

        public String getEndpoint()
        Gets the API end-point of a SearchableType.
        Returns:
        the Admin API end-point
      • getIdField

        public String getIdField()
        Gets the API ID field name of a SearchableType.
        Returns:
        the Admin API field used to uniquely identify a particular searchable data object in its corresponding Admin API end point
      • getDisplayNameField

        public String getDisplayNameField()
        Gets the API display name field of a SearchableType.
        Returns:
        the Admin API field used to name a particular searchable data object (may not be unique) in its corresponding Admin API end point
      • getTabTitle

        public String getTabTitle()
        Gets the tab title of a SearchableType.
        Returns:
        the tab title displayed in the filterable drop-down menu
      • name

        public String name()
        Gets the name of SearchableType. Added for backwards compatibility due to changing SearchableType from an enum to a class.
        Returns:
        the name of the SearchableType