public class ConnectorSpec
extends java.lang.Object
Constructor and Description |
---|
ConnectorSpec(java.lang.String name,
ConnectorType type,
java.util.Collection<Property> properties)
Creates a new
ConnectorSpec instance. |
ConnectorSpec(java.lang.String name,
ConnectorType type,
Property... properties)
Creates a new
ConnectorSpec instance. |
Modifier and Type | Method and Description |
---|---|
boolean |
getBooleanProperty(java.lang.String name,
boolean defaultValue)
Returns the value of a specific property as a boolean value.
|
double |
getDoubleProperty(java.lang.String name,
double defaultValue)
Returns the value of a specific property as a double value.
|
int |
getIntProperty(java.lang.String name,
int defaultValue)
Returns the value of a specific property as an int value.
|
long |
getLongProperty(java.lang.String name,
long defaultValue)
Returns the value of a specific property as a long value.
|
java.lang.String |
getName()
Returns the connector instance name.
|
java.util.List<Property> |
getProperties()
Returns all the property objects of this spec.
|
java.lang.String |
getProperty(java.lang.String name)
Returns the value of a specific property.
|
java.lang.String |
getProperty(java.lang.String name,
java.lang.String defaultValue)
Returns the value of a specific property.
|
java.util.List<java.lang.String> |
getPropertyNames()
Returns all the property names of this spec.
|
ConnectorType |
getType()
Returns the connector type
|
java.lang.String |
toString() |
public ConnectorSpec(java.lang.String name, ConnectorType type, Property... properties)
ConnectorSpec
instance.name
- type
- properties
- public ConnectorSpec(java.lang.String name, ConnectorType type, java.util.Collection<Property> properties)
ConnectorSpec
instance.name
- type
- properties
- public java.lang.String getName()
public ConnectorType getType()
public java.lang.String toString()
public java.util.List<Property> getProperties()
Property
objectspublic java.util.List<java.lang.String> getPropertyNames()
public java.lang.String getProperty(java.lang.String name)
name
- Property namepublic java.lang.String getProperty(java.lang.String name, java.lang.String defaultValue)
name
- Property namedefaultValue
- Property default valuedefaultValue
if property value is not found or emptypublic boolean getBooleanProperty(java.lang.String name, boolean defaultValue)
"true"
or "false"
), the specified default value is returned.name
- Property namedefaultValue
- Property default valuedefaultValue
if property value is not found or empty or not a valid booleanpublic int getIntProperty(java.lang.String name, int defaultValue)
name
- Property namedefaultValue
- Property default valuedefaultValue
if property value is not found or empty or not a valid integerpublic long getLongProperty(java.lang.String name, long defaultValue)
name
- Property namedefaultValue
- Property default valuedefaultValue
if property value is not found or empty or not a valid longpublic double getDoubleProperty(java.lang.String name, double defaultValue)
name
- Property namedefaultValue
- Property default valuedefaultValue
if property value is not found or empty or not a valid double