public class ConnectorModel
extends java.lang.Object
implements java.io.Serializable
ConnectorModel
objects are immutable.Modifier and Type | Class and Description |
---|---|
static class |
ConnectorModel.Builder
Builder is used for constructing a
ConnectorModel instance. |
static interface |
ConnectorModel.ConnectorModelSource
ConnectorModelSource interface is used to allow registered connectors to be accessed by calling ConnectorModel.getConnectorModel(...) ,
while decoupling the ConnectorModel from the connector registry. |
Modifier and Type | Method and Description |
---|---|
static ConnectorModel.Builder |
builder()
Creates a new blank
ConnectorModel.Builder object used for constructing a ConnectorModel instance. |
static ConnectorModel.Builder |
builder(ConnectorModel template)
Creates a new
ConnectorModel.Builder object, initialized with the values from the specified ConnectorModel object. |
static ConnectorModel |
getConnectorModel(ConnectorFactoryContext context,
java.lang.String type,
java.lang.String subType,
int version)
Returns a registered connector model.
|
static ConnectorModel.ConnectorModelSource |
getConnectorModelSource()
Returns the connector registry object used to access registered connectors.
|
java.util.List<PropertyModel> |
getConnectorProperties()
Returns the list of connector properties that are displayed in the UI when user is creating or editing a connector.
|
java.util.List<PropertyModel> |
getDataSetProperties()
Returns the list of data set properties that are displayed in the UI when user is creating or editing a table data set.
|
java.lang.String |
getDefaultConnectorName()
Returns the default connector name, which is used in case of predefined connector.
|
java.lang.String |
getDisplaySourceFormat()
Returns the template for the text that is displayed below each data set in the UI.
|
byte[] |
getIconBytes()
Returns the icon that must be displayed for this connector type.
|
java.lang.String |
getSubTypeLabel()
Returns the connector sub-type label which is displayed in the UI.
|
java.lang.String |
getSubTypeName()
Returns the connector sub-type name.
|
java.lang.String |
getTypeLabel()
Returns the connector type label which is displayed in the UI.
|
java.lang.String |
getTypeName()
Returns the connector type name.
|
int |
getVersion()
Returns the connector version number.
|
boolean |
isActive()
Returns a boolean flag indicating whether or not this is an active connector.
|
boolean |
isIncrementalOnly()
Returns a boolean flag indicating whether or not this connector is incremental only.
|
boolean |
isPredefined()
Returns a boolean flag indicating whether or not this is a predefined connector.
|
static ConnectorModel.Builder |
newModel(java.lang.String typeName,
java.lang.String subTypeName)
Creates a new
ConnectorModel.Builder object used for constructing a ConnectorModel instance. |
static ConnectorModel.Builder |
newModel(java.lang.String typeName,
java.lang.String typeLabel,
java.lang.String subTypeName,
java.lang.String subTypeLabel)
Creates a new
ConnectorModel.Builder object used for constructing a ConnectorModel instance. |
static PropertyModel.Builder |
newProperty(java.lang.String name)
Creates a new
PropertyModel.Builder object used for constructing a PropertyModel instance. |
static PropertyModel.Builder |
newProperty(java.lang.String name,
java.lang.String label)
Creates a new
PropertyModel.Builder object used for constructing a PropertyModel instance. |
static void |
setConnectorModelSource(ConnectorModel.ConnectorModelSource connectorModelSource)
Sets the connector registry object that can be used to access registered connectors
by calling
ConnectorModel.getConnectorModel(...) |
public static ConnectorModel.ConnectorModelSource getConnectorModelSource()
ConnectorModel.ConnectorModelSource
objectpublic static void setConnectorModelSource(ConnectorModel.ConnectorModelSource connectorModelSource)
ConnectorModel.getConnectorModel(...)
connectorModelSource
- public static ConnectorModel getConnectorModel(ConnectorFactoryContext context, java.lang.String type, java.lang.String subType, int version)
ConnectorModel.setConnectorModelSource(...)
context
- type
- Connector type namesubType
- Connector sub-type nameversion
- Connector versionConnectorModel
object, null if not foundpublic java.lang.String getTypeName()
public java.lang.String getTypeLabel()
public java.lang.String getSubTypeName()
public java.lang.String getSubTypeLabel()
public int getVersion()
public java.lang.String getDefaultConnectorName()
public java.lang.String getDisplaySourceFormat()
${property
} expressions to substitute referenced property names
with their values at runtime. Also, a ${connector
} expression can be used to display
the name of the connector. Default display source format is "${connector
"}.public boolean isIncrementalOnly()
true
if incremental only, false
otherwisepublic boolean isActive()
true
if active, false
otherwisepublic boolean isPredefined()
true
if predefined, false
otherwisepublic java.util.List<PropertyModel> getConnectorProperties()
PropertyModel
objectspublic java.util.List<PropertyModel> getDataSetProperties()
PropertyModel
objectspublic byte[] getIconBytes()
public static ConnectorModel.Builder newModel(java.lang.String typeName, java.lang.String typeLabel, java.lang.String subTypeName, java.lang.String subTypeLabel)
ConnectorModel.Builder
object used for constructing a ConnectorModel
instance.
Connector version is set to 1 by default.typeName
- Connector type nametypeLabel
- Connector type labelsubTypeName
- Connector sub-type namesubTypeLabel
- Connector sub-type labelConnectorModel.Builder
objectpublic static ConnectorModel.Builder newModel(java.lang.String typeName, java.lang.String subTypeName)
ConnectorModel.Builder
object used for constructing a ConnectorModel
instance.
Type label is set to typeName
. Sub-type label is set to subTypeName
. Connector version is set to 1 by default.typeName
- Connector type namesubTypeName
- Connector sub-type nameConnectorModel.Builder
objectpublic static PropertyModel.Builder newProperty(java.lang.String name, java.lang.String label)
PropertyModel.Builder
object used for constructing a PropertyModel
instance.name
- Property namelabel
- Property labelPropertyModel.Builder
objectpublic static PropertyModel.Builder newProperty(java.lang.String name)
PropertyModel.Builder
object used for constructing a PropertyModel
instance.
Property label is set to name
.name
- Property namelabel
- Property labelPropertyModel.Builder
objectpublic static ConnectorModel.Builder builder()
ConnectorModel.Builder
object used for constructing a ConnectorModel
instance.ConnectorModel.Builder
objectpublic static ConnectorModel.Builder builder(ConnectorModel template)
ConnectorModel.Builder
object, initialized with the values from the specified ConnectorModel
object.template
- ConnectorModel
instance used for initializing this builderConnectorModel.Builder
object