Class DefaultContentDescriptor
- java.lang.Object
-
- org.xwiki.rendering.macro.descriptor.DefaultContentDescriptor
-
- All Implemented Interfaces:
ContentDescriptor
public class DefaultContentDescriptor extends Object implements ContentDescriptor
The default implementation ofContentDescriptor
.- Since:
- 1.9M1
- Version:
- $Id: 79fb573796ce1ba2eb909f425ecb3d4e70a743ae $
-
-
Field Summary
Fields Modifier and Type Field Description static Type
DEFAULT_CONTENT_TYPE
Default content type of all content descriptors.
-
Constructor Summary
Constructors Constructor Description DefaultContentDescriptor()
Default constructor.DefaultContentDescriptor(boolean mandatory)
DefaultContentDescriptor(String description)
DefaultContentDescriptor(String description, boolean mandatory)
DefaultContentDescriptor(String description, boolean mandatory, Type type)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDescription()
Type
getType()
This method will return the type of the macro content.boolean
isMandatory()
-
-
-
Field Detail
-
DEFAULT_CONTENT_TYPE
public static final Type DEFAULT_CONTENT_TYPE
Default content type of all content descriptors.- Since:
- 10.9
-
-
Constructor Detail
-
DefaultContentDescriptor
public DefaultContentDescriptor()
Default constructor.
-
DefaultContentDescriptor
public DefaultContentDescriptor(String description)
- Parameters:
description
- the description of the content.
-
DefaultContentDescriptor
public DefaultContentDescriptor(boolean mandatory)
- Parameters:
mandatory
- indicate if the content is mandatory.
-
DefaultContentDescriptor
public DefaultContentDescriptor(String description, boolean mandatory)
- Parameters:
description
- the description of the content.mandatory
- indicate if the content is mandatory.
-
-
Method Detail
-
getDescription
public String getDescription()
- Specified by:
getDescription
in interfaceContentDescriptor
- Returns:
- the description of the macro content.
-
isMandatory
public boolean isMandatory()
- Specified by:
isMandatory
in interfaceContentDescriptor
- Returns:
- indicate if the macro content is mandatory.
-
getType
public Type getType()
Description copied from interface:ContentDescriptor
This method will return the type of the macro content. By default it fallback to String.- Specified by:
getType
in interfaceContentDescriptor
- Returns:
- the type of the macro content.
-
-