Class CompositeDefinition
- java.lang.Object
-
- org.ametys.runtime.model.AbstractModelItem
-
- org.ametys.runtime.model.ModelItemGroup
-
- org.ametys.plugins.repository.model.CompositeDefinition
-
- All Implemented Interfaces:
Comparable<ModelItem>
,ModelItem
,ModelItemAccessor
,ModelItemContainer
,Labelable
,ModifiableLabelable
- Direct Known Subclasses:
ContentRestrictedCompositeDefinition
public class CompositeDefinition extends ModelItemGroup
Definition of a composite
-
-
Field Summary
-
Fields inherited from class org.ametys.runtime.model.ModelItemGroup
DEFAULT_TYPE_ID
-
Fields inherited from class org.ametys.runtime.model.AbstractModelItem
__serviceManager
-
Fields inherited from interface org.ametys.runtime.model.ModelItem
ITEM_PATH_SEPARATOR
-
-
Constructor Summary
Constructors Constructor Description CompositeDefinition()
Default constructor.CompositeDefinition(String name, ModelItemType type, ModelItem... children)
Constructor used to create simple models and items
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static CompositeDefinition
of(String name, String availableTypesExtensionPoint, ModelItem... children)
Creates aCompositeDefinition
-
Methods inherited from class org.ametys.runtime.model.ModelItemGroup
_toJSON, _toJSON, addChild, addChild, getChildren, getChildren, getModelItems, getSwitcher, getType, of, setModel, setType, toJSON, toSAX
-
Methods inherited from class org.ametys.runtime.model.AbstractModelItem
_shouldJSONBeEmpty, _widgetParameterToSAX, _widgetToSAX, addItemChecker, compareTo, equals, getDescription, getDisableConditions, getItemCheckers, getLabel, getModel, getName, getParent, getPath, getPluginName, getWidget, getWidgetParameters, hashCode, setDescription, setDisableConditions, setLabel, setName, setParent, setPluginName, setServiceManager, setWidget, setWidgetParameters, toJSON, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItem
-
-
-
-
Constructor Detail
-
CompositeDefinition
public CompositeDefinition()
Default constructor.
-
CompositeDefinition
public CompositeDefinition(String name, ModelItemType type, ModelItem... children)
Constructor used to create simple models and items- Parameters:
name
- the name of the definitiontype
- the type of the compositechildren
- the composite's children
-
-
Method Detail
-
of
public static CompositeDefinition of(String name, String availableTypesExtensionPoint, ModelItem... children) throws UnknownTypeException, ServiceException
Creates aCompositeDefinition
- Parameters:
name
- the composite's nameavailableTypesExtensionPoint
- the role of the extension point containing all available types for thisModelItem
children
- the composite's children- Returns:
- the created
CompositeDefinition
- Throws:
UnknownTypeException
- if the composite type is not available in the extension pointServiceException
- if an error occurs while getting the extension point of available types
-
-