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 classDisplayResultView.Constants
-
Enum Constant Summary
Enum Constants Enum Constant Description CLASSIC_GRAPHICALCLASSIC_HORIZONTAL_BARDETAIL
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static List<DisplayResultView>fromMainViewOnly(String mainView)Gets a list ofDisplayResultViewinstance from a main view part of identifier.static DisplayResultViewfromString(String name)Gets theDisplayResultViewinstance that matches the specified result view name or code.StringgetIdentifier()The code of the view is a combination of the main and sub view separated by an underscore.StringgetMainView()Gets the main view.StringgetMainViewBundleKey()Gets the bundle key of main view.StringgetSecondaryLevelView()Gets the secondary level view.StringgetSecondaryViewBundleKey()Gets the bundle key of secondary level view.static DisplayResultViewvalueOf(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.
-
-
-
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 nameNullPointerException- if the argument is null
-
fromString
public static DisplayResultView fromString(String name)
Gets theDisplayResultViewinstance 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
DisplayResultViewinstance having as name the specified role name orDETAILif no such role exists.
-
fromMainViewOnly
public static List<DisplayResultView> fromMainViewOnly(String mainView)
Gets a list ofDisplayResultViewinstance from a main view part of identifier.- Parameters:
mainView- a main view part of identifier.- Returns:
- a list of
DisplayResultViewinstance.
-
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.
-
-