Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/odpi/egeria into fixsec
Browse files Browse the repository at this point in the history
  • Loading branch information
planetf1 committed Apr 16, 2022
2 parents c447d97 + 3c6e3d8 commit 50a5fd3
Show file tree
Hide file tree
Showing 4 changed files with 47 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -836,7 +836,7 @@ public QueryResponse getQueryByGUID(@PathVariable String serverName,
* UserNotAuthorizedException the user is not authorized to issue this request or
* PropertyServerException there is a problem reported in the open metadata server(s)
*/
@PostMapping(path = "/elements/{parentGUID}/data-containers")
@PostMapping(path = "/schemas/elements/{parentGUID}/data-containers")

public GUIDResponse createDataContainer(@PathVariable String serverName,
@PathVariable String userId,
Expand All @@ -863,7 +863,7 @@ public GUIDResponse createDataContainer(@PathVariable String s
* UserNotAuthorizedException the user is not authorized to issue this request or
* PropertyServerException there is a problem reported in the open metadata server(s)
*/
@PostMapping(path = "/elements/{parentGUID}/data-containers/from-template/{templateGUID}")
@PostMapping(path = "/schemas/elements/{parentGUID}/data-containers/from-template/{templateGUID}")

public GUIDResponse createDataContainerFromTemplate(@PathVariable String serverName,
@PathVariable String userId,
Expand All @@ -890,7 +890,7 @@ public GUIDResponse createDataContainerFromTemplate(@PathVariable String
* UserNotAuthorizedException the user is not authorized to issue this request or
* PropertyServerException there is a problem reported in the open metadata server(s)
*/
@PostMapping(path = "/data-containers/{dataContainerGUID}")
@PostMapping(path = "/schemas/data-containers/{dataContainerGUID}")

public VoidResponse updateDataContainer(@PathVariable String serverName,
@PathVariable String userId,
Expand All @@ -916,7 +916,7 @@ public VoidResponse updateDataContainer(@PathVariable String s
* UserNotAuthorizedException the user is not authorized to issue this request or
* PropertyServerException there is a problem reported in the open metadata server(s)
*/
@PostMapping(path = "/data-containers/{dataContainerGUID}/delete")
@PostMapping(path = "/schemas/data-containers/{dataContainerGUID}/delete")

public VoidResponse removeDataContainer(@PathVariable String serverName,
@PathVariable String userId,
Expand All @@ -943,7 +943,7 @@ public VoidResponse removeDataContainer(@PathVariable String
* UserNotAuthorizedException the user is not authorized to issue this request or
* PropertyServerException there is a problem reported in the open metadata server(s)
*/
@PostMapping(path = "/data-containers/by-search-string")
@PostMapping(path = "/schemas/data-containers/by-search-string")

public DataContainersResponse findDataContainers(@PathVariable String serverName,
@PathVariable String userId,
Expand All @@ -969,7 +969,7 @@ public DataContainersResponse findDataContainers(@PathVariable String
* UserNotAuthorizedException the user is not authorized to issue this request or
* PropertyServerException there is a problem reported in the open metadata server(s)
*/
@GetMapping(path = "/data-containers/by-parent-element/{parentGUID}")
@GetMapping(path = "/schemas/data-containers/by-parent-element/{parentGUID}")

public DataContainersResponse getDataContainersForParent(@PathVariable String serverName,
@PathVariable String userId,
Expand All @@ -996,7 +996,7 @@ public DataContainersResponse getDataContainersForParent(@PathVariable String se
* UserNotAuthorizedException the user is not authorized to issue this request or
* PropertyServerException there is a problem reported in the open metadata server(s)
*/
@PostMapping(path = "/data-containers/by-name")
@PostMapping(path = "/schemas/data-containers/by-name")

public DataContainersResponse getDataContainersByName(@PathVariable String serverName,
@PathVariable String userId,
Expand All @@ -1020,7 +1020,7 @@ public DataContainersResponse getDataContainersByName(@PathVariable String
* UserNotAuthorizedException the user is not authorized to issue this request or
* PropertyServerException there is a problem reported in the open metadata server(s)
*/
@GetMapping(path = "/data-containers/{dataContainerGUID}")
@GetMapping(path = "/schemas/data-containers/{dataContainerGUID}")

public DataContainerResponse getDataContainerByGUID(@PathVariable String serverName,
@PathVariable String userId,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,7 @@ protected void mapRelationshipToInstanceProperties(IsA iSARelationship, Instance
SubjectAreaUtils.setStringPropertyInInstanceProperties(instanceProperties, iSARelationship.getSource(), OpenMetadataAPIMapper.SOURCE_PROPERTY_NAME);
}
if (iSARelationship.getStatus() != null) {
EnumPropertyValue enumPropertyValue = new EnumPropertyValue();
enumPropertyValue.setOrdinal(iSARelationship.getStatus().getOrdinal());
instanceProperties.setProperty(OpenMetadataAPIMapper.STATUS_PROPERTY_NAME, enumPropertyValue);
SubjectAreaUtils.setStatusPropertyInInstanceProperties(instanceProperties, iSARelationship.getStatus(), OpenMetadataAPIMapper.STATUS_PROPERTY_NAME);
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
import org.odpi.openmetadata.accessservices.subjectarea.ffdc.SubjectAreaErrorCode;
import org.odpi.openmetadata.accessservices.subjectarea.ffdc.exceptions.InvalidParameterException;
import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.Status;
import org.odpi.openmetadata.accessservices.subjectarea.properties.enums.TermRelationshipStatus;
import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.category.Category;
import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.common.SystemAttributes;
import org.odpi.openmetadata.accessservices.subjectarea.properties.objects.glossary.Glossary;
Expand All @@ -18,6 +19,7 @@
import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.CategoryAnchor;
import org.odpi.openmetadata.accessservices.subjectarea.properties.relationships.TermAnchor;
import org.odpi.openmetadata.accessservices.subjectarea.responses.SubjectAreaOMASAPIResponse;
import org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIMapper;
import org.odpi.openmetadata.frameworks.auditlog.messagesets.ExceptionMessageDefinition;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.instances.*;
import org.odpi.openmetadata.repositoryservices.connectors.stores.metadatacollectionstore.properties.typedefs.PrimitiveDefCategory;
Expand Down Expand Up @@ -305,4 +307,18 @@ public SubjectAreaOMASAPIResponse<IconSummary> getIconSummarySet(String userId,
response.addAllResults(icons);
return response;
}

/**
* Set status values into instance properties.
*
* @param instanceProperties supplied instanceproperties
* @param status Status value
* @param propertyName property name
*/
public static void setStatusPropertyInInstanceProperties(InstanceProperties instanceProperties, TermRelationshipStatus status, String propertyName) {
EnumPropertyValue enumPropertyValue = new EnumPropertyValue();
enumPropertyValue.setOrdinal(status.getOrdinal());
enumPropertyValue.setSymbolicName(status.getName());
instanceProperties.setProperty(propertyName, enumPropertyValue);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?xml version="1.0" encoding="UTF-8"?>

<!-- SPDX-License-Identifier: Apache-2.0 -->
<!-- Copyright Contributors to the ODPi Egeria project. -->

<configuration>

<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<logger name="org.odpi.openmetadata.accessservices.assetconsumer" level="INFO" />


<root level="info">
<appender-ref ref="STDOUT" />
</root>

</configuration>

0 comments on commit 50a5fd3

Please sign in to comment.