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
,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.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
addChild, addChild, getChildren, getChildren, getModelItems, getSwitcher, getType, of, setModel, setType, toJSON, toJSON
-
Methods inherited from class org.ametys.runtime.model.AbstractModelItem
addItemChecker, compareTo, equals, getDescription, getItemCheckers, getLabel, getModel, getName, getParent, getPath, hashCode, setDescription, setLabel, setName, setParent, setServiceManager, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.ametys.runtime.model.ModelItemContainer
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
-
-