public final class IntegrationTraitIndex extends java.lang.Object implements KnowledgeIndex
Constructor and Description |
---|
IntegrationTraitIndex(Model model) |
Modifier and Type | Method and Description |
---|---|
java.util.Optional<Trait> |
getIntegrationTrait(ToShapeId service,
ToShapeId shape)
Get the integration trait for a particular operation, resource, or
service bound within a service.
|
<T extends Trait> |
getIntegrationTrait(ToShapeId service,
ToShapeId shape,
java.lang.Class<T> type)
Get the integration trait for a particular operation, resource, or
service bound within a service of a specific type.
|
static IntegrationTraitIndex |
of(Model model) |
public IntegrationTraitIndex(Model model)
public static IntegrationTraitIndex of(Model model)
public java.util.Optional<Trait> getIntegrationTrait(ToShapeId service, ToShapeId shape)
service
- Service shape or ShapeId thereof.shape
- Operation, service, or resource shape in the service.
When the service shape ID is provided, the integration trait of the
service is returned if present.public <T extends Trait> java.util.Optional<T> getIntegrationTrait(ToShapeId service, ToShapeId shape, java.lang.Class<T> type)
T
- Type of trait to retrieve.service
- Service shape or ShapeId thereof.shape
- Operation, service, or resource shape in the service.
When the service shape ID is provided, the integration trait of the
service is returned if present.type
- Integration trait type.