Enum MenuItemType
- java.lang.Object
-
- java.lang.Enum<MenuItemType>
-
- com.broadleafcommerce.menu.domain.type.MenuItemType
-
- All Implemented Interfaces:
Serializable
,Comparable<MenuItemType>
public enum MenuItemType extends Enum<MenuItemType>
Defines the default possible types forMenuItems
. This is can be helpful to the frontend when determining how to render the content related to theMenuItem.getUrl()
.- Author:
- Nathan Moore (nathandmoore)
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ASSET
Signifies that an item is an asset such as an image.CATEGORY
Signifies that an item leads to a category landing page.CONTENT_ITEM
Signifies that an item leads a Content Item landing page.CONTENT_MODEL
Signifies that an item leads a Content Model landing page, e.g.,/blogs
.LINK
Signifies that an item is a generic hyperlink.PAGE
Signifies that an item leads to a CMS page.PRODUCT
Signifies that an item leads to a product detail page.TEXT
Signifies that an item is simple text.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static MenuItemType
valueOf(String name)
Returns the enum constant of this type with the specified name.static MenuItemType[]
values()
Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
CATEGORY
public static final MenuItemType CATEGORY
Signifies that an item leads to a category landing page.
-
ASSET
public static final MenuItemType ASSET
Signifies that an item is an asset such as an image.
-
LINK
public static final MenuItemType LINK
Signifies that an item is a generic hyperlink.
-
PAGE
public static final MenuItemType PAGE
Signifies that an item leads to a CMS page.
-
CONTENT_MODEL
public static final MenuItemType CONTENT_MODEL
Signifies that an item leads a Content Model landing page, e.g.,/blogs
. This is primarily useful in coordination with the metadata to render a Content Model lookup rather than a manual input.
-
CONTENT_ITEM
public static final MenuItemType CONTENT_ITEM
Signifies that an item leads a Content Item landing page. This is primarily useful in coordination with the metadata to render a Content Item lookup rather than a manual input.
-
PRODUCT
public static final MenuItemType PRODUCT
Signifies that an item leads to a product detail page.
-
TEXT
public static final MenuItemType TEXT
Signifies that an item is simple text.
-
-
Method Detail
-
values
public static MenuItemType[] 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 (MenuItemType c : MenuItemType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static MenuItemType 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
-
-