Class FullConnectorStatus
- java.lang.Object
-
- com.snowflake.connectors.application.status.FullConnectorStatus
-
public class FullConnectorStatus extends Object
Representation of the full connector status, comprised of the connector and connector configuration statuses.
-
-
Constructor Summary
Constructors Constructor Description FullConnectorStatus()
Creates an emptyFullConnectorStatus
.FullConnectorStatus(ConnectorStatus status, ConnectorStatus.ConnectorConfigurationStatus configurationStatus)
Creates a newFullConnectorStatus
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
ConnectorStatus.ConnectorConfigurationStatus
getConfigurationStatus()
Returns this connector configuration status.ConnectorStatus
getStatus()
Returns this connector status.boolean
hasConfigurationStatus(ConnectorStatus.ConnectorConfigurationStatus expected)
Returns whether this connector configuration status is equal to the provided one.int
hashCode()
boolean
hasStatus(ConnectorStatus... expected)
Returns whether this connector status contains the provided ones.void
setConfigurationStatus(ConnectorStatus.ConnectorConfigurationStatus configurationStatus)
Sets this connector configuration status.void
setStatus(ConnectorStatus status)
Sets this connector status.void
validateConfigurationStatusIsIn(ConnectorStatus.ConnectorConfigurationStatus... expectedStatuses)
Validates whether this connector configuration status is present among the provided statuses.void
validateConfigurationStatusIsNotIn(ConnectorStatus.ConnectorConfigurationStatus... unexpectedStatuses)
Validates whether this connector configuration status is not present among the provided statuses.void
validateConnectorStatusIn(ConnectorStatus... expected)
Validates whether this connector status is in provided ones.
-
-
-
Constructor Detail
-
FullConnectorStatus
public FullConnectorStatus()
Creates an emptyFullConnectorStatus
.This constructor is used by the Jackson JSON deserialization process and should not be used for any other purpose.
-
FullConnectorStatus
public FullConnectorStatus(ConnectorStatus status, ConnectorStatus.ConnectorConfigurationStatus configurationStatus)
Creates a newFullConnectorStatus
.- Parameters:
status
- connector statusconfigurationStatus
- connector configuration status
-
-
Method Detail
-
validateConnectorStatusIn
public void validateConnectorStatusIn(ConnectorStatus... expected)
Validates whether this connector status is in provided ones.- Parameters:
expected
- expected connector statuses- Throws:
InvalidConnectorStatusException
- if this connector status is different from the expected ones.
-
validateConfigurationStatusIsIn
public void validateConfigurationStatusIsIn(ConnectorStatus.ConnectorConfigurationStatus... expectedStatuses)
Validates whether this connector configuration status is present among the provided statuses.- Parameters:
expectedStatuses
- expected connector configuration statuses- Throws:
InvalidConnectorStatusException
- if this connector status is not present among the provided statuses
-
validateConfigurationStatusIsNotIn
public void validateConfigurationStatusIsNotIn(ConnectorStatus.ConnectorConfigurationStatus... unexpectedStatuses)
Validates whether this connector configuration status is not present among the provided statuses.- Parameters:
unexpectedStatuses
- unexpected connector configuration statuses- Throws:
InvalidConnectorStatusException
- if this connector status is present among the provided statuses
-
getStatus
public ConnectorStatus getStatus()
Returns this connector status.- Returns:
- connector status
-
setStatus
public void setStatus(ConnectorStatus status)
Sets this connector status.- Parameters:
status
- connector status
-
getConfigurationStatus
public ConnectorStatus.ConnectorConfigurationStatus getConfigurationStatus()
Returns this connector configuration status.- Returns:
- connector configuration status
-
setConfigurationStatus
public void setConfigurationStatus(ConnectorStatus.ConnectorConfigurationStatus configurationStatus)
Sets this connector configuration status.- Parameters:
configurationStatus
- connector configuration status
-
hasStatus
public boolean hasStatus(ConnectorStatus... expected)
Returns whether this connector status contains the provided ones.- Parameters:
expected
- expected connector statuses- Returns:
- whether this connector status is equal to the provided one
-
hasConfigurationStatus
public boolean hasConfigurationStatus(ConnectorStatus.ConnectorConfigurationStatus expected)
Returns whether this connector configuration status is equal to the provided one.- Parameters:
expected
- expected connector configuration status- Returns:
- whether this connector configuration status is equal to the provided one
-
-