Interface CapabilityHelper

    • Method Detail

      • getCapabilityTypeFromTypeString

        @Nullable
        @Nullable CapabilityType getCapabilityTypeFromTypeString​(String capabilityTypeKey)
      • getCapabilityTypeFromKey

        @NotNull
        @NotNull CapabilityType getCapabilityTypeFromKey​(String key)
        get capability Type object from capability key. e.g. Jdk, Builder, Generic (for custom)
        Parameters:
        key - of the capability
        Returns:
        capbilty type for the given key
      • getCapabilityType

        String getCapabilityType​(String key)
        The key of the type of capability e.g. "jdk"
        Parameters:
        key - of the capability
        Returns:
        key representing the capability type
      • getCapabilityLabel

        @NotNull
        @NotNull String getCapabilityLabel​(String key)
        Tries to figure out the capability Label. If it fails it will return the original key. If its a custom capability we only have the key.
        Parameters:
        key - to find the label for
        Returns:
        the label for the capability (or the original passed in key, if it fails)
      • getCapabilityExtraInfo

        @Nullable
        @Nullable String getCapabilityExtraInfo​(String key)
        tries to figure out the extra information of a capability based on the key. If it fails it returns null.
        Parameters:
        key - of the capability
        Returns:
        the extra information (pretty) for that capability.
      • getCapabilityTabForKey

        String getCapabilityTabForKey​(String key)
        Get the jquery representation of the capability to pick the correct tab to navigate to.
        Parameters:
        key - to replace (usually the Label of the capability)
        Returns:
        jquery representation of the key.
      • getCapabilityTypes

        List<CapabilityType> getCapabilityTypes()
        Returns:
        a list of all selectable capability types.
      • buildCapabilityJsonObject

        @NotNull
        @NotNull com.opensymphony.webwork.dispatcher.json.JSONObject buildCapabilityJsonObject​(@NotNull
                                                                                               @NotNull Capability capability)
                                                                                        throws com.opensymphony.webwork.dispatcher.json.JSONException
        Build JSON object from capability.
        Parameters:
        capability - Capability
        Returns:
        JSON object
        Throws:
        com.opensymphony.webwork.dispatcher.json.JSONException - When an error occurs during creation of JSON object