Class AbstractComplexModel

All Implemented Interfaces:
org.mule.runtime.api.meta.DescribedObject, org.mule.runtime.api.meta.model.connection.HasConnectionProviderModels, org.mule.runtime.api.meta.model.deprecated.DeprecableModel, org.mule.runtime.api.meta.model.display.HasDisplayModel, org.mule.runtime.api.meta.model.EnrichableModel, org.mule.runtime.api.meta.model.operation.HasOperationModels, org.mule.runtime.api.meta.model.source.HasSourceModels, org.mule.runtime.api.meta.NamedObject
Direct Known Subclasses:
ImmutableConfigurationModel, ImmutableExtensionModel

public abstract class AbstractComplexModel extends AbstractNamedImmutableModel implements org.mule.runtime.api.meta.model.connection.HasConnectionProviderModels, org.mule.runtime.api.meta.model.source.HasSourceModels, org.mule.runtime.api.meta.model.operation.HasOperationModels, org.mule.runtime.api.meta.model.deprecated.DeprecableModel
A specialization of AbstractComplexModel which also implements HasConnectionProviderModels, HasSourceModels and HasOperationModels
Since:
1.0
  • Constructor Details

    • AbstractComplexModel

      public AbstractComplexModel(String name, String description, List<org.mule.runtime.api.meta.model.operation.OperationModel> operationModels, List<org.mule.runtime.api.meta.model.connection.ConnectionProviderModel> connectionProviders, List<org.mule.runtime.api.meta.model.source.SourceModel> sourceModels, org.mule.runtime.api.meta.model.display.DisplayModel displayModel, Set<org.mule.runtime.api.meta.model.ModelProperty> modelProperties)
    • AbstractComplexModel

      public AbstractComplexModel(String name, String description, List<org.mule.runtime.api.meta.model.operation.OperationModel> operationModels, List<org.mule.runtime.api.meta.model.connection.ConnectionProviderModel> connectionProviders, List<org.mule.runtime.api.meta.model.source.SourceModel> sourceModels, org.mule.runtime.api.meta.model.display.DisplayModel displayModel, Set<org.mule.runtime.api.meta.model.ModelProperty> modelProperties, org.mule.runtime.api.meta.model.deprecated.DeprecationModel deprecationModel)
  • Method Details

    • getOperationModels

      public List<org.mule.runtime.api.meta.model.operation.OperationModel> getOperationModels()
      Specified by:
      getOperationModels in interface org.mule.runtime.api.meta.model.operation.HasOperationModels
    • getSourceModels

      public List<org.mule.runtime.api.meta.model.source.SourceModel> getSourceModels()
      Specified by:
      getSourceModels in interface org.mule.runtime.api.meta.model.source.HasSourceModels
    • getSourceModel

      public Optional<org.mule.runtime.api.meta.model.source.SourceModel> getSourceModel(String name)
      Specified by:
      getSourceModel in interface org.mule.runtime.api.meta.model.source.HasSourceModels
    • getConnectionProviderModel

      public Optional<org.mule.runtime.api.meta.model.connection.ConnectionProviderModel> getConnectionProviderModel(String name)
      Specified by:
      getConnectionProviderModel in interface org.mule.runtime.api.meta.model.connection.HasConnectionProviderModels
    • getOperationModel

      public Optional<org.mule.runtime.api.meta.model.operation.OperationModel> getOperationModel(String name)
      Specified by:
      getOperationModel in interface org.mule.runtime.api.meta.model.operation.HasOperationModels
    • getConnectionProviders

      public List<org.mule.runtime.api.meta.model.connection.ConnectionProviderModel> getConnectionProviders()
      Specified by:
      getConnectionProviders in interface org.mule.runtime.api.meta.model.connection.HasConnectionProviderModels
    • findModel

      protected <T extends org.mule.runtime.api.meta.NamedObject> Optional<T> findModel(Collection<T> values, String name)
      Returns the first item in the values collection which matches the given name.
      Type Parameters:
      T - the generic type of the values items
      Parameters:
      values - a Collection of NamedObject items
      name - the matching criteria
      Returns:
      an Optional matching item
    • toList

      protected <T extends org.mule.runtime.api.meta.DescribedObject> List<T> toList(Collection<T> collection)
    • unique

      protected <T extends org.mule.runtime.api.meta.NamedObject> List<T> 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
      Type Parameters:
      T - the generic type of the values items
      Parameters:
      values - the collection to copy
      identifier - human friendly identifier of the values content
      Returns:
      an immutable copy of the values
    • getDeprecationModel

      public Optional<org.mule.runtime.api.meta.model.deprecated.DeprecationModel> getDeprecationModel()
      Specified by:
      getDeprecationModel in interface org.mule.runtime.api.meta.model.deprecated.DeprecableModel
    • isDeprecated

      public boolean isDeprecated()
      Specified by:
      isDeprecated in interface org.mule.runtime.api.meta.model.deprecated.DeprecableModel
    • toString

      public String toString()
      Overrides:
      toString in class AbstractNamedImmutableModel