Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add deployedImplementationType to EmbeddedProcess #8488

Merged
merged 2 commits into from
Nov 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -706,35 +706,30 @@ else if (matchClassifications.getMatchCriteria() == MatchCriteria.NONE)
}

StringBuilder stringBuilder = new StringBuilder();
boolean firstCondition = true;


for (ClassificationCondition classificationCondition : matchClassifications.getConditions())
{
if (classificationCondition != null)
{
if (firstCondition)
stringBuilder.append(matchOperand);
stringBuilder.append(" (");
stringBuilder.append(RepositoryColumn.CLASSIFICATION_NAME.getColumnName(RepositoryTable.CLASSIFICATION.getTableName()));
if (operator == PropertyComparisonOperator.EQ)
{
firstCondition = false;
stringBuilder.append(" = '");
}
else
{
stringBuilder.append(matchOperand);
stringBuilder.append(" != '");
}
stringBuilder.append(" (");
stringBuilder.append(RepositoryColumn.CLASSIFICATION_NAME.getColumnName());
stringBuilder.append(operator);
stringBuilder.append(" '");
stringBuilder.append(classificationCondition.getName());
stringBuilder.append("' ");

if (classificationCondition.getMatchProperties() != null)
{
stringBuilder.append(" and (");
stringBuilder.append(this.getPropertyComparisonFromPropertyConditions(classificationCondition.getMatchProperties(),
RepositoryTable.CLASSIFICATION_ATTRIBUTE_VALUE.getTableName(),
null));
stringBuilder.append(") ");
}

stringBuilder.append(") ");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
* Connectors are uses to access the underlying assets.
* <br><br>
* The properties for VirtualConnectionProperties are those for ConnectionProperties plus a list of
* connections for the
* connections for the embedded connectors.
*/
public class VirtualConnectionProperties extends ConnectionProperties
{
Expand Down Expand Up @@ -70,6 +70,7 @@ public VirtualConnectionProperties(VirtualConnectionProperties templateConnectio
*
* @return connection bean
*/
@Override
protected VirtualConnection getConnectionBean()
{
return connectionBean;
Expand Down Expand Up @@ -108,16 +109,15 @@ public List<EmbeddedConnectionProperties> getEmbeddedConnections()
* Returns a formatted string with the connection name. It is used in formatting error messages for the
* exceptions thrown by consuming components. It is extremely cautious because most of the exceptions
* are reporting a malformed connection object so who knows what else is wrong with it.
*
* Within the connection are 2 possible properties that could
* contain the connection name:
* ** qualifiedName - this is a uniqueName and should be there
* ** displayName - shorter simpler name but may not be unique - so may not identify the connection in error
*
* This method inspects these properties and builds up a string to represent the connection name
*
* @return connection name
*/
@Override
public String getConnectionName()
{
String connectionName = "<Unknown>"; /* if all properties are blank */
Expand All @@ -127,14 +127,14 @@ public String getConnectionName()
/*
* The qualifiedName is preferred because it is unique.
*/
if (qualifiedName != null && (!qualifiedName.equals("")))
if (qualifiedName != null && (!qualifiedName.isEmpty()))
{
/*
* Use qualified name.
*/
connectionName = qualifiedName;
}
else if (displayName != null && (!displayName.equals("")))
else if (displayName != null && (!displayName.isEmpty()))
{
/*
* The qualifiedName is not set but the displayName is available so use it.
Expand All @@ -152,6 +152,7 @@ else if (displayName != null && (!displayName.equals("")))
*
* @return description
*/
@Override
public String getDescription()
{
return connectionBean.getDescription();
Expand All @@ -164,6 +165,7 @@ public String getDescription()
*
* @return connector type for the connection
*/
@Override
public ConnectorTypeProperties getConnectorType()
{
ConnectorType connectorType = connectionBean.getConnectorType();
Expand All @@ -185,6 +187,7 @@ public ConnectorTypeProperties getConnectorType()
*
* @return endpoint for the connection
*/
@Override
public EndpointProperties getEndpoint()
{
Endpoint endpoint = connectionBean.getEndpoint();
Expand All @@ -207,6 +210,7 @@ public EndpointProperties getEndpoint()
*
* @return secured properties typically user credentials for the connection
*/
@Override
public Map<String, String> getSecuredProperties()
{
return connectionBean.getSecuredProperties();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ public void setLocalRepository(String localMetadataCol
* @throws RepositoryErrorException there is a problem accessing the archive
*/
public void addOpenMetadataArchive(OpenMetadataArchiveStore archiveStore,
String archiveSource) throws RepositoryErrorException
String archiveSource) throws RepositoryErrorException
{
this.processOpenMetadataArchiveStore(archiveStore, archiveSource, repositoryContentManager, localInstanceEventProcessor);
this.openMetadataArchiveStores.add(archiveStore);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,10 +123,6 @@ public OpenMetadataArchive getOpenMetadataArchive()
*/
this.getOriginalTypes();

this.add0265AnalyticsAssets();
this.add0118ActorRoles();
this.addLabelToLineage();

/*
* The completed archive is ready to be packaged up and returned
*/
Expand Down Expand Up @@ -158,7 +154,9 @@ public void getOriginalTypes()
*/
previousTypes.getOriginalTypes();


this.add0265AnalyticsAssets();
this.add0118ActorRoles();
this.addLabelToLineage();
}


Expand Down Expand Up @@ -364,6 +362,7 @@ private void add0265AnalyticsAssets()
{
this.archiveBuilder.addEntityDef(getDeployedAnalyticsModelEntity());
this.archiveBuilder.addEntityDef(getAnalyticsModelRunEntity());
this.archiveBuilder.addTypeDefPatch(updateTransientEmbeddedProcess());
}


Expand Down Expand Up @@ -392,6 +391,28 @@ private EntityDef getAnalyticsModelRunEntity()
}


private TypeDefPatch updateTransientEmbeddedProcess()
{
/*
* Create the Patch
*/
TypeDefPatch typeDefPatch = archiveBuilder.getPatchForType(OpenMetadataType.TRANSIENT_EMBEDDED_PROCESS.typeName);

typeDefPatch.setUpdatedBy(originatorName);
typeDefPatch.setUpdateTime(creationDate);

/*
* Build the attributes
*/
List<TypeDefAttribute> properties = new ArrayList<>();

properties.add(archiveHelper.getTypeDefAttribute(OpenMetadataProperty.DEPLOYED_IMPLEMENTATION_TYPE));

typeDefPatch.setPropertyDefinitions(properties);

return typeDefPatch;
}


/*
* -------------------------------------------------------------------------------------------------------
Expand Down
Loading