Interface CapabilityType

    • Method Detail

      • getSortOrder

        int getSortOrder()
        Specifies how early in the UI the type should be shown
        Returns:
      • getCapabilityTypeKey

        @NotNull
        @NotNull String getCapabilityTypeKey()
        The key for the type typically lower case
        Returns:
      • getCapabilityTypeLabel

        @NotNull
        @NotNull String getCapabilityTypeLabel()
        Human readable version of the key
      • getViewTypeAction

        @Nullable
        @Nullable String getViewTypeAction()
        The action name of the list view action of this capability type
        Returns:
      • validate

        @NotNull
        @NotNull Map<String,​String> validate​(@NotNull
                                                   @NotNull Map<String,​String[]> params)
        Validate given an action params map.
        Parameters:
        params -
        Returns:
        Map with errors. key = field name, value = error message
      • getCapability

        @NotNull
        @NotNull Capability getCapability​(@NotNull
                                          @NotNull Map<String,​String[]> params)
        Returns a new capability given the action params map
        Parameters:
        params -
      • getLabel

        @NotNull
        @NotNull String getLabel​(@NotNull
                                 @NotNull String key)
        The display label
        Parameters:
        key -
        Returns:
      • getExtraInfo

        @Nullable
        @Nullable String getExtraInfo​(@NotNull
                                      @NotNull String key)
        Displayed after the label
        Parameters:
        key -
        Returns:
      • getValueDescriptionKey

        @Nullable
        @Nullable String getValueDescriptionKey​(@NotNull
                                                @NotNull String key,
                                                @Nullable
                                                @Nullable String value)
        Given the key and value, show any custom description for the value
        Parameters:
        key -
        value -
        Returns:
      • isAllowRename

        boolean isAllowRename()
        Can you rename the key for this type
        Returns:
      • getNewKeyFromLabel

        @NotNull
        @NotNull String getNewKeyFromLabel​(@NotNull
                                           @NotNull String oldKey,
                                           @NotNull
                                           @NotNull String label)
        From the key and label, return a new key. This is used in the rename process
        Parameters:
        oldKey -
        label -
        Returns:
      • getCapabilityTypeSpecificTaskConfigurationKey

        default String getCapabilityTypeSpecificTaskConfigurationKey()
        Get task configuration key for the capability type.
        Since:
        6.5
      • updatePlanForNewLabel

        @Deprecated
        void updatePlanForNewLabel​(@NotNull
                                   @NotNull Buildable plan,
                                   @NotNull
                                   @NotNull String oldLabel,
                                   @NotNull
                                   @NotNull String newLabel)
        Deprecated.
        since 6.5 it doesn't work, modification of build definition requires use of manager.
        Perform custom work when the key has been updated.
        Parameters:
        plan -
        oldLabel - label to replace
        newLabel - new label