Package org.silverpeas.components.survey.control

## Enum DisplayResultView

- java.lang.Object
- - java.lang.Enum<DisplayResultView>
  - - org.silverpeas.components.survey.control.DisplayResultView

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

      public enum DisplayResultView
      extends Enum<DisplayResultView>

  Definition of the different views of result page a survey can display.
  Author:
    silveryocha

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class | Description
    --- | --- | ---
    `static class` | `DisplayResultView.Constants` |

  - ### Enum Constant Summary

    Enum Constants
    Enum Constant | Description
    --- | ---
    `CLASSIC_GRAPHICAL` |
    `CLASSIC_HORIZONTAL_BAR` |
    `DETAIL` |

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static List<DisplayResultView>` | `fromMainViewOnly​(String mainView)` | Gets a list of `DisplayResultView` instance from a main view part of identifier.
    `static DisplayResultView` | `fromString​(String name)` | Gets the `DisplayResultView` instance that matches the specified result view name or code.
    `String` | `getIdentifier()` | The code of the view is a combination of the main and sub view separated by an underscore.
    `String` | `getMainView()` | Gets the main view.
    `String` | `getMainViewBundleKey()` | Gets the bundle key of main view.
    `String` | `getSecondaryLevelView()` | Gets the secondary level view.
    `String` | `getSecondaryViewBundleKey()` | Gets the bundle key of secondary level view.
    `static DisplayResultView` | `valueOf​(String name)` | Returns the enum constant of this type with the specified name.
    `static DisplayResultView[]` | `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

    - #### CLASSIC_GRAPHICAL

          public static final DisplayResultView CLASSIC_GRAPHICAL

    - #### CLASSIC_HORIZONTAL_BAR

          public static final DisplayResultView CLASSIC_HORIZONTAL_BAR

    - #### DETAIL

          public static final DisplayResultView DETAIL

  - ### Method Detail

    - #### values

          public static DisplayResultView[] 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 (DisplayResultView c : DisplayResultView.values())
              System.out.println(c);

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

    - #### valueOf

          public static DisplayResultView 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

    - #### fromString

          public static DisplayResultView fromString​(String name)

      Gets the `DisplayResultView` instance that matches the specified result view name or code.
      Parameters:
        `name` - the enum name or the full name of a predefined result view in survey component.
      Returns:
        the `DisplayResultView` instance having as name the specified role name or `DETAIL` if no such role exists.

    - #### fromMainViewOnly

          public static List<DisplayResultView> fromMainViewOnly​(String mainView)

      Gets a list of `DisplayResultView` instance from a main view part of identifier.
      Parameters:
        `mainView` - a main view part of identifier.
      Returns:
        a list of `DisplayResultView` instance.

    - #### getIdentifier

          public String getIdentifier()

      The code of the view is a combination of the main and sub view separated by an underscore.
      Returns:
        a code as string.

    - #### getMainView

          public String getMainView()

      Gets the main view.
      Returns:
        a string.

    - #### getSecondaryLevelView

          public String getSecondaryLevelView()

      Gets the secondary level view.
      Returns:
        a string.

    - #### getMainViewBundleKey

          public String getMainViewBundleKey()

      Gets the bundle key of main view.
      Returns:
        a string representing a bundle key.

    - #### getSecondaryViewBundleKey

          public String getSecondaryViewBundleKey()

      Gets the bundle key of secondary level view.
      Returns:
        a string representing a bundle key.