Skip to content

Commit

Permalink
Merge pull request #8485 from mandy-chessell/oak2024
Browse files Browse the repository at this point in the history
Change marker for placeholder variables
  • Loading branch information
mandy-chessell authored Nov 11, 2024
2 parents 41b1461 + e38af1e commit 7df6196
Show file tree
Hide file tree
Showing 29 changed files with 78 additions and 75 deletions.
2 changes: 1 addition & 1 deletion EgeriaContentPacksGUIDMap.json

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ platform.security.secrets.collection=userDirectory
# "topicURLRoot": "egeria.omag",\
# "configurationProperties":\
# {\
# "producer": {"bootstrap.servers": "{{kafkaEndpoint}}"},\
# "consumer": {"bootstrap.servers": "{{kafkaEndpoint}}"}\
# "producer": {"bootstrap.servers": "~{kafkaEndpoint}~"},\
# "consumer": {"bootstrap.servers": "~{kafkaEndpoint}~"}\
# }\
# }\
# }
Expand Down
4 changes: 2 additions & 2 deletions container.application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,8 @@ platform.security.secrets.collection=userDirectory
# "topicURLRoot": "egeria.omag",\
# "configurationProperties":\
# {\
# "producer": {"bootstrap.servers": "{{kafkaEndpoint}}"},\
# "consumer": {"bootstrap.servers": "{{kafkaEndpoint}}"}\
# "producer": {"bootstrap.servers": "~{kafkaEndpoint}~"},\
# "consumer": {"bootstrap.servers": "~{kafkaEndpoint}~"}\
# }\
# }\
# }
Expand Down
2 changes: 1 addition & 1 deletion content-packs/APIsContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ApacheAtlasContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ApacheKafkaContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/CoreContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/ObservabilityContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/OpenMetadataTypes.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/PostgresContentPack.omarchive

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion content-packs/UnityCatalogContentPack.omarchive

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,11 @@ Content-Type: application/json
{
"producer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
},
"consumer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/post
Content-Type: application/json

{
"databaseURL": "{{postgreSQLDatabaseURL}}?currentSchema=repository_postgres_metadata_store",
"databaseURL": "~{postgreSQLDatabaseURL}~?currentSchema=repository_postgres_metadata_store",
"databaseSchema": "repository_postgres_metadata_store",
"secretsStore": "{{secretsStore}}",
"secretsCollectionName": "{{postgreSQLServerCollectionName}}"
"secretsStore": "~{secretsStore}~",
"secretsCollectionName": "~{postgreSQLServerCollectionName}~"
}

###
Expand All @@ -59,19 +59,19 @@ Content-Type: text/plain


###
# Set up the common properties needed to call your event bus. The value of {{kafkaEndpoint}} is resolved in the
# Set up the common properties needed to call your event bus. The value of ~{kafkaEndpoint}~ is resolved in the
# application.properties file using the `platform.placeholder.variables` property.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/postgres-metadata-store/event-bus
Content-Type: application/json

{
"producer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
},
"consumer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,11 +34,11 @@ Content-Type: application/json
{
"producer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
},
"consumer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
}
}

Expand Down Expand Up @@ -102,10 +102,10 @@ POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{tu
Content-Type: application/json

{
"databaseURL": "{{postgreSQLDatabaseURL}}?currentSchema=repository_postgres_metadata_store",
"databaseURL": "~{postgreSQLDatabaseURL}~?currentSchema=repository_postgres_metadata_store",
"databaseSchema": "repository_postgres_metadata_store",
"secretsStore": "{{secretsStore}}",
"secretsCollectionName": "{{postgreSQLServerCollectionName}}"
"secretsStore": "~{secretsStore}~",
"secretsCollectionName": "~{postgreSQLServerCollectionName}~"
}

###
Expand All @@ -118,19 +118,19 @@ Content-Type: text/plain


###
# Set up the common properties needed to call your event bus. The value of {{kafkaEndpoint}} is resolved in the
# Set up the common properties needed to call your event bus. The value of ~{kafkaEndpoint}~ is resolved in the
# application.properties file using the `platform.placeholder.variables` property.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{tutServer}}/event-bus
Content-Type: application/json

{
"producer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
},
"consumer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ private Date getAsOfTime(Date suppliedAsOfTime)
* Return the entity identified by the guid.
*
* @param guid - unique identifier for the entity
* @param asOfTime value from caller
* @return entity object
* @throws RepositoryErrorException problem forming entity proxy
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@
*/
public enum PostgresConfigurationProperty
{
DATABASE_URL("databaseURL", "Connection string for the database where the schema is located.", DataType.STRING.getName(), "{{postgreSQLDatabaseURL}}"),
DATABASE_URL("databaseURL", "Connection string for the database where the schema is located.", DataType.STRING.getName(), "~{postgreSQLDatabaseURL}~"),
DATABASE_SCHEMA ("databaseSchema", "The name of the database schema used to store the repository contents.", DataType.STRING.getName(), "repository_{{serverName}}"),
SECRETS_STORE ("secretsStore", "The file name of the secrets store containing the log on credentials to access the database schema.", DataType.STRING.getName(), "{{secretsStore}}"),
SECRETS_COLLECTION_NAME ("secretsCollectionName", "The name of the secrets collection.", DataType.STRING.getName(), "{{secretsStore}}"),
SECRETS_STORE ("secretsStore", "The file name of the secrets store containing the log on credentials to access the database schema.", DataType.STRING.getName(), "~{secretsStore}~"),
SECRETS_COLLECTION_NAME ("secretsCollectionName", "The name of the secrets collection.", DataType.STRING.getName(), "~{secretsStore}~"),
DEFAULT_AS_OF_TIME ("defaultAsOfTime", "Optional value that changes the default value for 'asOfTime'. The 'asOfTime' parameter is used on queries to control which point in time to take the open metadata from. The standard default is 'null' which means use the current time. If the 'defaultAsOfTime' option is specified then, by default, queries will use the supplied asOfTime value. This can be overridden on individual requests. Creates, updates, deletes continue to be appended to the database. The mode recent data can be retrieved by setting the asOfTime to the current time on queries.", DataType.DATE.getName(), null),
REPOSITORY_MODE ("repositoryMode", "Optional value that controls which functions are active in the repository. If it is set to 'readOnly' the repository is switched into read-only mode. Any other value (or if it is not specified) results in a read-write repository.", DataType.DATE.getName(), "yyyy/MM/dd HH:mm:ss"),
;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ public EntityMapper getEntityFromStore(String guid,
RepositoryColumn.INSTANCE_GUID.getColumnName() + " = '" + guid + "'" + getAsOfTimeClause(asOfTime),
RepositoryTable.ENTITY.getColumnNameTypeMap());

return this.getCompleteEntityFromStore(guid, entityRow);
return this.getCompleteEntityFromStore(guid, entityRow, asOfTime);
}
catch (PropertyServerException sqlException)
{
Expand Down Expand Up @@ -484,11 +484,13 @@ public List<RelationshipMapper> retrieveRelationshipsByProperties(QueryBuilder q
*
* @param guid unique identifier of the entity
* @param entityRow appropriate row from table
* @param asOfTime database time
* @return entity mapper
* @throws RepositoryErrorException problem communicating with the database, or mapping the values returned
*/
public EntityMapper getCompleteEntityFromStore(String guid,
Map<String, JDBCDataValue> entityRow) throws RepositoryErrorException
Map<String, JDBCDataValue> entityRow,
Date asOfTime) throws RepositoryErrorException
{
final String methodName = "getCompleteEntityFromStore";

Expand All @@ -506,8 +508,7 @@ public EntityMapper getCompleteEntityFromStore(String guid,
whereClause,
RepositoryTable.ENTITY_ATTRIBUTE_VALUE.getColumnNameTypeMap());

Map<String, List<ClassificationMapper>> classificationMappersForEntityGUIDs = getClassificationMappersForEntityGUIDs(whereClause);

Map<String, List<ClassificationMapper>> classificationMappersForEntityGUIDs = getClassificationMappersForEntityGUIDs(RepositoryColumn.INSTANCE_GUID.getColumnName() + " = '" + guid + "'" + getAsOfTimeClause(asOfTime));

return new EntityMapper(entityRow,
entityProperties,
Expand Down Expand Up @@ -1060,7 +1061,9 @@ public List<EntityMapper> getEntityHistoryFromStore(String guid,
{
for (Map<String, JDBCDataValue> entityRow : entityRows)
{
entityMappers.add(this.getCompleteEntityFromStore(guid, entityRow));
Date versionEndTime = baseMapper.getDatePropertyFromColumn(RepositoryColumn.VERSION_END_TIME.getColumnName(), entityRow, false);

entityMappers.add(this.getCompleteEntityFromStore(guid, entityRow, versionEndTime));
}
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,10 @@ POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/{{se
Content-Type: application/json

{
"databaseURL": "{{postgreSQLDatabaseURL}}",
"databaseURL": "~{postgreSQLDatabaseURL}~",
"databaseSchema": "repository_{{server}}",
"secretsStore": "{{secretsStore}}",
"secretsCollectionName": "{{postgreSQLServerCollectionName}}"
"secretsStore": "~{secretsStore}~",
"secretsCollectionName": "~{postgreSQLServerCollectionName}~"
}

###
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ public class OMAGServerConfig extends AdminServicesConfigHeader
*/
public static final String defaultLocalServerType = null;
private static final String defaultLocalOrganizationName = null;
private static final String defaultLocalServerURL = "{{egeriaEndpoint}}";
private static final String defaultLocalServerURL = "~{egeriaEndpoint}~";
private static final String defaultLocalServerUserId = "OMAGServer";
public static final int defaultMaxPageSize = 1000;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ public OMAGServerConfig getServerConfigForStartUp(String userId,

for (String variableName : currentPlaceholderValues.keySet())
{
String regExMatchString = Pattern.quote("{{"+ variableName + "}}");
String regExMatchString = Pattern.quote("~{"+ variableName + "}~");
String[] configBits = omagServerConfigString.split(regExMatchString);

if (configBits.length > 1)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ public enum OpenMetadataType
SEARCH_KEYWORD("0134c9ae-0fe6-4224-bb3b-e18b78a90b1e",
"SearchKeyword",
OpenMetadataWikiPages.MODEL_0012_SEARCH_KEYWORDS,
"A shareable keyword to help locating relevant assets.",
"26707bea-f65c-43bc-9576-5991d9bafc24"),
"26707bea-f65c-43bc-9576-5991d9bafc24",
"A shareable keyword to help locating relevant assets."),

/**
* Provides a link to a keyword that helps to identify specific elements in a search.
Expand Down Expand Up @@ -1091,8 +1091,8 @@ public enum OpenMetadataType
PROJECT("0799569f-0c16-4a1f-86d9-e2e89568f7fd",
"Project",
OpenMetadataWikiPages.MODEL_0130_PROJECTS,
"An organized activity, typically to achieve a well defined goal.",
"1d8eed39-17e2-400c-adac-4d0c8f3063ad"),
"1d8eed39-17e2-400c-adac-4d0c8f3063ad",
"An organized activity, typically to achieve a well-defined goal."),

/**
* An person with overall responsibility for one or more project.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -411,11 +411,11 @@ public enum OMRSErrorCode implements ExceptionMessageSet
"Correct the caller's code and attempt the request again."),

/**
* OMRS-REPOSITORY-400-048 - A {0} request has been made to repository {1} to remove a non-existent classification {2} from entity {3}
* OMRS-REPOSITORY-400-048 - A {0} request has been made to repository {1} to access a non-existent classification {2} from entity {3}
*/
ENTITY_NOT_CLASSIFIED(400, "OMRS-REPOSITORY-400-048",
"A {0} request has been made to repository {1} to remove a non-existent classification {2} from entity {3}",
"The system is unable to perform the request as the instance has invalid values.",
"A {0} request has been made to repository {1} to access a non-existent classification {2} from entity {3}",
"The system is unable to perform the request as the instance has a missing classification.",
"Correct the caller's code and reattempt the request."),

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
package org.odpi.openmetadata.repositoryservices.localrepository.repositorycontentmanager;

import org.odpi.openmetadata.frameworks.auditlog.AuditLog;
import org.odpi.openmetadata.frameworks.openmetadata.types.OpenMetadataType;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.MatchCriteria;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.SequencingOrder;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*;
Expand Down Expand Up @@ -1503,11 +1504,11 @@ public void checkEntityNotClassifiedEntity(String sourceName,
*/
@Override
public Classification checkEntityNotClassifiedEntity(String sourceName,
EntitySummary entity,
String classificationName,
InstanceProperties classificationProperties,
AuditLog auditLog,
String methodName) throws ClassificationErrorException
EntitySummary entity,
String classificationName,
InstanceProperties classificationProperties,
AuditLog auditLog,
String methodName) throws ClassificationErrorException
{
final String thisMethodName = "checkEntityNotClassifiedEntity";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/acti
Content-Type: application/json

{
"databaseURL": "{{postgreSQLDatabaseURL}}?currentSchema=repository_active_metadata_store",
"databaseURL": "~{postgreSQLDatabaseURL}~?currentSchema=repository_active_metadata_store",
"databaseSchema": "repository_active_metadata_store",
"secretsStore": "{{secretsStore}}",
"secretsCollectionName": "{{postgreSQLServerCollectionName}}"
"secretsStore": "~{secretsStore}~",
"secretsCollectionName": "~{postgreSQLServerCollectionName}~"
}

###
Expand All @@ -82,19 +82,19 @@ Content-Type: text/plain


###
# Set up the common properties needed to call your event bus. The value of {{kafkaEndpoint}} is resolved in the
# Set up the common properties needed to call your event bus. The value of ~{kafkaEndpoint}~ is resolved in the
# application.properties file using the `platform.placeholder.variables` property.
POST {{baseURL}}/open-metadata/admin-services/users/{{adminUserId}}/servers/active-metadata-store/event-bus
Content-Type: application/json

{
"producer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
},
"consumer":
{
"bootstrap.servers":"{{kafkaEndpoint}}"
"bootstrap.servers":"~{kafkaEndpoint}~"
}
}

Expand Down Expand Up @@ -140,7 +140,7 @@ Content-Type: application/json
{
"class": "ViewServiceRequestBody",
"omagserverName": "active-metadata-store",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}"
"omagserverPlatformRootURL": "~{egeriaEndpoint}~"
}

###
Expand Down Expand Up @@ -252,7 +252,7 @@ Content-Type: application/json
"engineUserId": "generalnpa"
}
],
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverPlatformRootURL": "~{egeriaEndpoint}~",
"omagserverName": "active-metadata-store"
}

Expand Down Expand Up @@ -280,43 +280,43 @@ Content-Type: application/json
[
{
"class": "IntegrationGroupConfig",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverPlatformRootURL": "~{egeriaEndpoint}~",
"omagserverName" : "active-metadata-store",
"integrationGroupQualifiedName" : "Egeria:IntegrationGroup:Default"
},
{
"class": "IntegrationGroupConfig",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverPlatformRootURL": "~{egeriaEndpoint}~",
"omagserverName" : "active-metadata-store",
"integrationGroupQualifiedName" : "Egeria:IntegrationGroup:ApacheAtlas"
},
{
"class": "IntegrationGroupConfig",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverPlatformRootURL": "~{egeriaEndpoint}~",
"omagserverName" : "active-metadata-store",
"integrationGroupQualifiedName" : "Egeria:IntegrationGroup:ApacheKafka"
},
{
"class": "IntegrationGroupConfig",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverPlatformRootURL": "~{egeriaEndpoint}~",
"omagserverName" : "active-metadata-store",
"integrationGroupQualifiedName" : "Egeria:IntegrationGroup:OpenAPIs"
},
{
"class": "IntegrationGroupConfig",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverPlatformRootURL": "~{egeriaEndpoint}~",
"omagserverName" : "active-metadata-store",
"integrationGroupQualifiedName" : "Egeria:IntegrationGroup:OpenMetadataObservability"
},
{
"class": "IntegrationGroupConfig",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverPlatformRootURL": "~{egeriaEndpoint}~",
"omagserverName" : "active-metadata-store",
"integrationGroupQualifiedName" : "Egeria:IntegrationGroup:PostgreSQL"
},
{
"class": "IntegrationGroupConfig",
"omagserverPlatformRootURL": "{{egeriaEndpoint}}",
"omagserverPlatformRootURL": "~{egeriaEndpoint}~",
"omagserverName" : "active-metadata-store",
"integrationGroupQualifiedName" : "Egeria:IntegrationGroup:UnityCatalog"
}
Expand Down

Large diffs are not rendered by default.

Loading

0 comments on commit 7df6196

Please sign in to comment.