public abstract class AbstractComplexModel extends AbstractNamedImmutableModel implements HasConnectionProviderModels, HasSourceModels, HasOperationModels
AbstractComplexModel
which also implements
HasConnectionProviderModels
, HasSourceModels
and
HasOperationModels
description, modelProperties
Constructor and Description |
---|
AbstractComplexModel(String name,
String description,
List<OperationModel> operationModels,
List<ConnectionProviderModel> connectionProviders,
List<SourceModel> sourceModels,
DisplayModel displayModel,
Set<ModelProperty> modelProperties) |
Modifier and Type | Method and Description |
---|---|
protected <T extends NamedObject> |
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 ConnectionProviderModel s 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 OperationModel s 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 SourceModel s defined at the level
of the component implementing this interface. |
protected <T extends DescribedObject> |
toList(Collection<T> collection) |
protected <T extends NamedObject> |
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, getDisplayModel, getName, hashCode, toString
copy, copy, getDescription, getModelProperties, getModelProperty
public AbstractComplexModel(String name, String description, List<OperationModel> operationModels, List<ConnectionProviderModel> connectionProviders, List<SourceModel> sourceModels, DisplayModel displayModel, Set<ModelProperty> modelProperties)
public List<OperationModel> getOperationModels()
List
of OperationModel
s 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 HasOperationModels
List
of OperationModel
public List<SourceModel> getSourceModels()
List
of SourceModel
s 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 HasSourceModels
List
of SourceModel
public Optional<SourceModel> getSourceModel(String name)
SourceModel
that matches
the given name.getSourceModel
in interface HasSourceModels
name
- case sensitive source nameOptional
SourceModel
public Optional<ConnectionProviderModel> getConnectionProviderModel(String name)
ConnectionProviderModel
that matches
the given name.getConnectionProviderModel
in interface HasConnectionProviderModels
name
- case sensitive provider nameOptional
ConnectionProviderModel
public Optional<OperationModel> getOperationModel(String name)
OperationModel
that matches
the given name.getOperationModel
in interface HasOperationModels
name
- case sensitive operation nameOptional
OperationModel
public List<ConnectionProviderModel> getConnectionProviders()
List
of ConnectionProviderModel
s 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 ExtensionModel
getConnectionProviders
in interface HasConnectionProviderModels
List
of ConnectionProviderModel
protected <T extends NamedObject> 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 NamedObject
itemsname
- the matching criteriaOptional
matching itemprotected <T extends DescribedObject> List<T> toList(Collection<T> collection)
protected <T extends NamedObject> 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
contentvalues
Copyright © 2018. All rights reserved.