Package com.atlan.samples.loaders.models
Class ConnectionDetails
- java.lang.Object
-
- com.atlan.samples.loaders.models.AssetDetails
-
- com.atlan.samples.loaders.models.ConnectionDetails
-
public class ConnectionDetails extends AssetDetails
Utility class for capturing the full details provided about a column.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ConnectionDetails.ConnectionDetailsBuilder<C extends ConnectionDetails,B extends ConnectionDetails.ConnectionDetailsBuilder<C,B>>
-
Nested classes/interfaces inherited from class com.atlan.samples.loaders.models.AssetDetails
AssetDetails.AssetDetailsBuilder<C extends AssetDetails,B extends AssetDetails.AssetDetailsBuilder<C,B>>
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
COL_CONNECTION
protected static java.lang.String
COL_CONNECTOR
-
Constructor Summary
Constructors Modifier Constructor Description protected
ConnectionDetails(ConnectionDetails.ConnectionDetailsBuilder<?,?> b)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ConnectionDetails.ConnectionDetailsBuilder<?,?>
builder()
protected boolean
canEqual(java.lang.Object other)
boolean
equals(java.lang.Object o)
static void
findAndCache(java.util.Map<ConnectionDetails,java.lang.String> cache, java.lang.String name, com.atlan.model.enums.AtlanConnectorType type)
Find any existing connection with the provided name and type, and add it to the cache (if it exists).static ConnectionDetails
getFromRow(java.util.Map<java.lang.String,java.lang.String> row, java.lang.String delim)
Build up details about the column on the provided row.java.lang.String
getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.java.lang.String
getName()
static java.lang.String
getQualifiedName(java.util.Map<ConnectionDetails,java.lang.String> connectionCache, java.util.Map<java.lang.String,java.lang.String> row)
Construct a connection's qualifiedName from the row of data and cache of connections.com.atlan.model.enums.AtlanConnectorType
getType()
int
hashCode()
java.lang.String
toString()
static java.util.Map<ConnectionDetails,java.lang.String>
upsert(java.util.Map<java.lang.String,ConnectionDetails> connections, int batchSize, boolean updateOnly)
Create connections in bulk, if they do not exist, or simply cache them if they do (idempotent).-
Methods inherited from class com.atlan.samples.loaders.models.AssetDetails
appendAtlanTags, getAnnouncementMessage, getAnnouncementTitle, getAnnouncementType, getAtlanTags, getBoolean, getCertificate, getCertificateStatusMessage, getDescription, getFromRow, getMissingFields, getMultiValuedList, getOwnerGroups, getOwnerUsers, getRequiredEmptyFields, isStub, selectivelyUpdateCustomMetadata
-
-
-
-
Field Detail
-
COL_CONNECTOR
protected static final java.lang.String COL_CONNECTOR
- See Also:
- Constant Field Values
-
COL_CONNECTION
protected static final java.lang.String COL_CONNECTION
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ConnectionDetails
protected ConnectionDetails(ConnectionDetails.ConnectionDetailsBuilder<?,?> b)
-
-
Method Detail
-
getIdentity
public java.lang.String getIdentity()
Retrieve the unique identity of this asset for deduplication across rows.- Specified by:
getIdentity
in classAssetDetails
- Returns:
- String giving the unique identity of the asset
-
getQualifiedName
public static java.lang.String getQualifiedName(java.util.Map<ConnectionDetails,java.lang.String> connectionCache, java.util.Map<java.lang.String,java.lang.String> row)
Construct a connection's qualifiedName from the row of data and cache of connections.- Parameters:
connectionCache
- cache of connectionsrow
- of data- Returns:
- the qualifiedName for the connection on that row of data
-
getFromRow
public static ConnectionDetails getFromRow(java.util.Map<java.lang.String,java.lang.String> row, java.lang.String delim)
Build up details about the column on the provided row.- Parameters:
row
- a row of data from the spreadsheet, as a map from column name to valuedelim
- delimiter used in cells that can contain multiple values- Returns:
- the column details for that row
-
upsert
public static java.util.Map<ConnectionDetails,java.lang.String> upsert(java.util.Map<java.lang.String,ConnectionDetails> connections, int batchSize, boolean updateOnly)
Create connections in bulk, if they do not exist, or simply cache them if they do (idempotent).- Parameters:
connections
- details of the connections to createbatchSize
- maximum number of connections to create per batchupdateOnly
- if true, only attempt to update existing assets, otherwise allow assets to be created as well- Returns:
- a mapping of connection headers to their qualifiedName (as created or found)
-
findAndCache
public static void findAndCache(java.util.Map<ConnectionDetails,java.lang.String> cache, java.lang.String name, com.atlan.model.enums.AtlanConnectorType type) throws com.atlan.exception.AtlanException
Find any existing connection with the provided name and type, and add it to the cache (if it exists).- Parameters:
cache
- to which to add the connection detailsname
- of the connectiontype
- of the connector for the connection- Throws:
com.atlan.exception.AtlanException
- on any error finding the connection, including if it does not exist
-
builder
public static ConnectionDetails.ConnectionDetailsBuilder<?,?> builder()
-
getName
public java.lang.String getName()
-
getType
public com.atlan.model.enums.AtlanConnectorType getType()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classAssetDetails
-
canEqual
protected boolean canEqual(java.lang.Object other)
- Overrides:
canEqual
in classAssetDetails
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classAssetDetails
-
toString
public java.lang.String toString()
- Overrides:
toString
in classAssetDetails
-
-