public abstract class AbstractComplexModel extends AbstractNamedImmutableModel implements HasConnectionProviderModels, HasSourceModels, HasOperationModels
AbstractComplexModel which also implements
HasConnectionProviderModels, HasSourceModels and
HasOperationModels| Constructor and Description |
|---|
AbstractComplexModel(String name,
String description,
List<OperationModel> operationModels,
List<ConnectionProviderModel> connectionProviders,
List<SourceModel> sourceModels,
Set<ModelProperty> modelProperties) |
| Modifier and Type | Method and Description |
|---|---|
protected <T extends Named> |
findModel(Collection<T> values,
String name)
Returns the first item in the
values collection which
matches the given name. |
Optional<ConnectionProviderModel> |
getConnectionProviderModel(String name)
Returns the
ConnectionProviderModel that matches
the given name. |
List<ConnectionProviderModel> |
getConnectionProviders()
Returns a
List of ConnectionProviderModels defined at the level
of the component implementing this interface. |
Optional<OperationModel> |
getOperationModel(String name)
Returns the
OperationModel that matches
the given name. |
List<OperationModel> |
getOperationModels()
Returns a
List of OperationModels defined at the level
of the component implementing this interface. |
Optional<SourceModel> |
getSourceModel(String name)
Returns the
SourceModel that matches
the given name. |
List<SourceModel> |
getSourceModels()
Returns a
List of SourceModels defined at the level
of the component implementing this interface. |
protected <T extends Described> |
toList(Collection<T> collection) |
protected <T extends Named> |
unique(Collection<T> values,
String identifier)
Returns an immutable copy of the
values collection, validating
that no items exist such that its name is repeated |
checkArgument, equals, getName, hashCode, toStringgetDescription, getModelProperties, getModelPropertypublic AbstractComplexModel(String name, String description, List<OperationModel> operationModels, List<ConnectionProviderModel> connectionProviders, List<SourceModel> sourceModels, Set<ModelProperty> modelProperties)
public List<OperationModel> getOperationModels()
List of OperationModels defined at the level
of the component implementing this interface.
Each operation is guaranteed to have a unique name which will not
overlap with any SourceModel or ConnectionProviderModel
defined at any level.getOperationModels in interface HasOperationModelsList of OperationModelpublic List<SourceModel> getSourceModels()
List of SourceModels defined at the level
of the component implementing this interface.
Each source is guaranteed to have a unique name which will not
overlap with any OperationModel or ConnectionProviderModel
defined at any level.
getSourceModels in interface HasSourceModelsList of SourceModelpublic Optional<SourceModel> getSourceModel(String name)
SourceModel that matches
the given name.getSourceModel in interface HasSourceModelsname - case sensitive source nameOptional SourceModelpublic Optional<ConnectionProviderModel> getConnectionProviderModel(String name)
ConnectionProviderModel that matches
the given name.getConnectionProviderModel in interface HasConnectionProviderModelsname - case sensitive provider nameOptional ConnectionProviderModelpublic Optional<OperationModel> getOperationModel(String name)
OperationModel that matches
the given name.getOperationModel in interface HasOperationModelsname - case sensitive operation nameOptional OperationModelpublic List<ConnectionProviderModel> getConnectionProviders()
List of ConnectionProviderModels defined at the level
of the component implementing this interface.
Each provider is guaranteed to have a unique name which will not
overlap with any OperationModel or SourceModel
defined in the same ExtensionModelgetConnectionProviders in interface HasConnectionProviderModelsList of ConnectionProviderModelprotected <T extends Named> Optional<T> findModel(Collection<T> values, String name)
values collection which
matches the given name.T - the generic type of the values itemsvalues - a Collection of Named itemsname - the matching criteriaOptional matching itemprotected <T extends Described> List<T> toList(Collection<T> collection)
protected <T extends Named> List<T> unique(Collection<T> values, String identifier)
values collection, validating
that no items exist such that its name is repeatedT - the generic type of the values itemsvalues - the collection to copyidentifier - human friendly identifier of the values contentvaluesCopyright © 2016 MuleSoft, Inc.. All rights reserved.