public class DefaultCamelConnectorCatalog extends Object implements CamelConnectorCatalog
Constructor and Description |
---|
DefaultCamelConnectorCatalog() |
Modifier and Type | Method and Description |
---|---|
void |
addConnector(String groupId,
String artifactId,
String version,
String name,
String scheme,
String javaType,
String description,
String labels,
String connectorJson,
String connectorSchemaJson,
String componentSchemaJson)
Adds or updates the connector to the catalog
|
String |
asEndpointUri(String scheme,
Map<String,String> properties,
boolean encode)
Creates an endpoint uri in Java style from the information from the properties
|
String |
asEndpointUriXml(String scheme,
Map<String,String> properties,
boolean encode)
Creates an endpoint uri in XML style (eg escape & as &l;) from the information from the properties
|
String |
componentSchemaJSon(String groupId,
String artifactId,
String version)
Returns the camel-component-schema json file for the given connector with the Maven coordinate
|
String |
connectorJSon(String groupId,
String artifactId,
String version)
Returns the camel-connector json file for the given connector with the Maven coordinate
|
String |
connectorSchemaJSon(String groupId,
String artifactId,
String version)
Returns the camel-connector-schema json file for the given connector with the Maven coordinate
|
List<ConnectorDto> |
findConnector(boolean latestVersionOnly)
Finds all the connectors from the catalog
|
List<ConnectorDto> |
findConnector(String filter,
boolean latestVersionOnly)
Find all the connectors that matches the maven coordinate, name, label or description from the catalog
|
boolean |
hasConnector(String groupId,
String artifactId,
String version)
Is the connector already registered in the catalog
|
void |
removeConnector(String groupId,
String artifactId,
String version)
Removes the connector from the catalog
|
void |
setConnectorDataStore(ConnectorDataStore dataStore)
To configure which
ConnectorDataStore to use |
public void setConnectorDataStore(ConnectorDataStore dataStore)
CamelConnectorCatalog
ConnectorDataStore
to usesetConnectorDataStore
in interface CamelConnectorCatalog
public boolean hasConnector(String groupId, String artifactId, String version)
CamelConnectorCatalog
hasConnector
in interface CamelConnectorCatalog
groupId
- maven group idartifactId
- maven artifact idversion
- maven versionpublic void addConnector(String groupId, String artifactId, String version, String name, String scheme, String javaType, String description, String labels, String connectorJson, String connectorSchemaJson, String componentSchemaJson)
CamelConnectorCatalog
addConnector
in interface CamelConnectorCatalog
groupId
- maven group idartifactId
- maven artifact idversion
- maven versionname
- name of connectorscheme
- scheme of connectorjavaType
- fully qualified class name of the connectordescription
- description of connectorlabels
- labels (separated by comma) of connectorconnectorJson
- the camel-connector json fileconnectorSchemaJson
- the camel-connector-schema json filecomponentSchemaJson
- the camel-component-schema json filepublic void removeConnector(String groupId, String artifactId, String version)
CamelConnectorCatalog
removeConnector
in interface CamelConnectorCatalog
groupId
- maven group idartifactId
- maven artifact idversion
- maven versionpublic List<ConnectorDto> findConnector(boolean latestVersionOnly)
CamelConnectorCatalog
findConnector
in interface CamelConnectorCatalog
latestVersionOnly
- whether to include only latest version of the connectorspublic List<ConnectorDto> findConnector(String filter, boolean latestVersionOnly)
CamelConnectorCatalog
findConnector
in interface CamelConnectorCatalog
filter
- filter textlatestVersionOnly
- whether to include only latest version of the connectorspublic String connectorJSon(String groupId, String artifactId, String version)
CamelConnectorCatalog
connectorJSon
in interface CamelConnectorCatalog
groupId
- maven group idartifactId
- maven artifact idversion
- maven versionpublic String connectorSchemaJSon(String groupId, String artifactId, String version)
CamelConnectorCatalog
connectorSchemaJSon
in interface CamelConnectorCatalog
groupId
- maven group idartifactId
- maven artifact idversion
- maven versionpublic String componentSchemaJSon(String groupId, String artifactId, String version)
CamelConnectorCatalog
componentSchemaJSon
in interface CamelConnectorCatalog
groupId
- maven group idartifactId
- maven artifact idversion
- maven versionpublic String asEndpointUri(String scheme, Map<String,String> properties, boolean encode) throws URISyntaxException
CamelConnectorCatalog
asEndpointUri
in interface CamelConnectorCatalog
scheme
- the endpoint schemaproperties
- the properties as key value pairsencode
- whether to URL encode the returned uri or notURISyntaxException
- is thrown if there is encoding errorpublic String asEndpointUriXml(String scheme, Map<String,String> properties, boolean encode) throws URISyntaxException
CamelConnectorCatalog
asEndpointUriXml
in interface CamelConnectorCatalog
scheme
- the endpoint schemaproperties
- the properties as key value pairsencode
- whether to URL encode the returned uri or notURISyntaxException
- is thrown if there is encoding errorApache Camel