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
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
ConstructorDescriptionDefault constructor.CompositeDefinition
(String name, ModelItemType type, ModelItem... children) Constructor used to create simple models and items -
Method Summary
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
_getModelItemHelper, _shouldJSONBeEmpty, _widgetParameterToSAX, _widgetToJSON, _widgetToSAX, addItemChecker, compareTo, disableConditionsToJSON, 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.ModelItem
getCriterionWidget, getCriterionWidgetParameters
Methods inherited from interface org.ametys.runtime.model.ModelItemAccessor
getChild, getModelItem, hasModelItem
-
Constructor Details
-
CompositeDefinition
public CompositeDefinition()Default constructor. -
CompositeDefinition
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 Details
-
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
-