Package org.silverpeas.components.gallery.web

## Enum MediaSort

- java.lang.Object
- - java.lang.Enum<MediaSort>
  - - org.silverpeas.components.gallery.web.MediaSort

- All Implemented Interfaces:
    `Serializable`, `Comparable<MediaSort>`

      public enum MediaSort
      extends Enum<MediaSort>

  This enumeration defines functional sorting rules. All the rule defines can be defined as not exposed to the user (displayed parameter).
  Author:
    Yohann Chastagnier

- - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `Author` |
    `CreationDateAsc` |
    `CreationDateDesc` |
    `Definition` |
    `Size` |
    `Title` |

  - ### Field Summary

    Fields
    Modifier and Type | Field | Description
    --- | --- | ---
    `static Set<MediaSort>` | `ALL` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static MediaSort` | `from​(String type)` |
    `String` | `getBundleKey()` | Gets the bundle key in order to perform right label into the user language.
    `String` | `getName()` |
    `boolean` | `isDisplayed()` | Indicates if the sorting rule can be displayed to the user.
    `void` | `perform​(List<Media> mediaList)` | Sorts of the specified list.
    `static MediaSort` | `valueOf​(String name)` | Returns the enum constant of this type with the specified name.
    `static MediaSort[]` | `values()` | Returns an array containing the constants of this enum type, in the order they are declared.

    - ### Methods inherited from class java.lang.Enum

      `clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

    - ### Methods inherited from class java.lang.Object

      `getClass, notify, notifyAll, wait, wait, wait`

- - ### Enum Constant Detail

    - #### CreationDateAsc

          public static final MediaSort CreationDateAsc

    - #### CreationDateDesc

          public static final MediaSort CreationDateDesc

    - #### Title

          public static final MediaSort Title

    - #### Size

          public static final MediaSort Size

    - #### Author

          public static final MediaSort Author

    - #### Definition

          public static final MediaSort Definition

  - ### Field Detail

    - #### ALL

          public static final Set<MediaSort> ALL

  - ### Method Detail

    - #### values

          public static MediaSort[] values()

      Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

          for (MediaSort c : MediaSort.values())
              System.out.println(c);

      Returns:
        an array containing the constants of this enum type, in the order they are declared

    - #### valueOf

          public static MediaSort valueOf​(String name)

      Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
      Parameters:
        `name` - the name of the enum constant to be returned.
      Returns:
        the enum constant with the specified name
      Throws:
        `IllegalArgumentException` - if this enum type has no constant with the specified name
        `NullPointerException` - if the argument is null

    - #### from

          public static MediaSort from​(String type)

    - #### getName

          public String getName()

    - #### isDisplayed

          public boolean isDisplayed()

      Indicates if the sorting rule can be displayed to the user.
      Returns:
        true if the rule can be displayed, false otherwise.

    - #### getBundleKey

          public String getBundleKey()

      Gets the bundle key in order to perform right label into the user language.
      Returns:
        the label bundle key.

    - #### perform

          public void perform​(List<Media> mediaList)

      Sorts of the specified list.
      Parameters:
        `mediaList` - the list of media to sort