Class SchemaMakerResource
java.lang.Object
org.odpi.openmetadata.viewservices.schemamaker.server.spring.SchemaMakerResource
@RestController
@RequestMapping("/servers/{serverName}/api/open-metadata/{urlMarker}")
public class SchemaMakerResource
extends Object
The SchemaMakerResource provides part of the server-side implementation of the Schema Maker OMVS.
=
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSchemaAttribute
(String serverName, String urlMarker, NewElementRequestBody requestBody) Create a schema attribute.createSchemaAttributeFromTemplate
(String serverName, String urlMarker, TemplateRequestBody requestBody) Create a new metadata element to represent a schema attribute using an existing metadata element as a template.createSchemaType
(String serverName, String urlMarker, NewElementRequestBody requestBody) Create a schema type.createSchemaTypeFromTemplate
(String serverName, String urlMarker, TemplateRequestBody requestBody) Create a new metadata element to represent a schema type using an existing metadata element as a template.deleteSchemaAttribute
(String serverName, String urlMarker, String schemaAttributeGUID, boolean cascadedDelete, MetadataSourceRequestBody requestBody) Delete a schema attribute.deleteSchemaType
(String serverName, String urlMarker, String schemaTypeGUID, boolean cascadedDelete, MetadataSourceRequestBody requestBody) Delete a schema type.detachLocationFromProfile
(String serverName, String urlMarker, String schemaTypeGUID, String locationGUID, MetadataSourceRequestBody requestBody) Detach a schema type from a location.detachPeerPerson
(String serverName, String urlMarker, String personOneGUID, String personTwoGUID, MetadataSourceRequestBody requestBody) Detach a person profile from one of its peers.detachTeamFromLeadershipRole
(String serverName, String urlMarker, String teamGUID, String personRoleGUID, MetadataSourceRequestBody requestBody) Detach a team profile from its leadership role.detachTeamFromMembershipRole
(String serverName, String urlMarker, String teamGUID, String personRoleGUID, MetadataSourceRequestBody requestBody) Detach a team profile from its membership role.detachTeamStructure
(String serverName, String urlMarker, String superTeamGUID, String subteamGUID, MetadataSourceRequestBody requestBody) Detach a super team from a subteam.findSchemaAttributes
(String serverName, String urlMarker, int startFrom, int pageSize, boolean startsWith, boolean endsWith, boolean ignoreCase, FilterRequestBody requestBody) Retrieve the list of schema attribute metadata elements that contain the search string.findSchemaTypes
(String serverName, String urlMarker, int startFrom, int pageSize, boolean startsWith, boolean endsWith, boolean ignoreCase, FilterRequestBody requestBody) Retrieve the list of schema type metadata elements that contain the search string.getSchemaAttributeByGUID
(String serverName, String urlMarker, String schemaAttributeGUID, AnyTimeRequestBody requestBody) Return the properties of a specific schema attribute.getSchemaAttributesByName
(String serverName, String urlMarker, int startFrom, int pageSize, FilterRequestBody requestBody) Returns the list of schema attributes with a particular name.getSchemaTypeByGUID
(String serverName, String urlMarker, String schemaTypeGUID, AnyTimeRequestBody requestBody) Return the properties of a specific schema type.getSchemaTypesByName
(String serverName, String urlMarker, int startFrom, int pageSize, FilterRequestBody requestBody) Returns the list of schema types with a particular name.linkLocationToProfile
(String serverName, String urlMarker, String schemaTypeGUID, String locationGUID, RelationshipRequestBody requestBody) Attach a profile to a location.linkPeerPerson
(String serverName, String urlMarker, String personOneGUID, String personTwoGUID, RelationshipRequestBody requestBody) Attach a person profile to one of its peers.linkTeamStructure
(String serverName, String urlMarker, String superTeamGUID, String subteamGUID, RelationshipRequestBody requestBody) Attach a super team to a subteam.linkTeamToLeadershipRole
(String serverName, String urlMarker, String teamGUID, String personRoleGUID, RelationshipRequestBody requestBody) Attach a team to its leadership role.linkTeamToMembershipRole
(String serverName, String urlMarker, String teamGUID, String personRoleGUID, RelationshipRequestBody requestBody) Attach a team to its membership role.updateSchemaAttribute
(String serverName, String urlMarker, String schemaAttributeGUID, boolean replaceAllProperties, UpdateElementRequestBody requestBody) Update the properties of a schema attribute.updateSchemaType
(String serverName, String urlMarker, String schemaTypeGUID, boolean replaceAllProperties, UpdateElementRequestBody requestBody) Update the properties of a schema type.
-
Constructor Details
-
SchemaMakerResource
public SchemaMakerResource()Default constructor
-
-
Method Details
-
createSchemaType
@PostMapping(path="/schema-types") public GUIDResponse createSchemaType(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody(required=false) NewElementRequestBody requestBody) Create a schema type.- Parameters:
serverName
- name of called server.urlMarker
- view service URL markerrequestBody
- properties for the schema type.- Returns:
- unique identifier of the newly created element InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createSchemaTypeFromTemplate
@PostMapping(path="/schema-types/from-template") public GUIDResponse createSchemaTypeFromTemplate(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody(required=false) TemplateRequestBody requestBody) Create a new metadata element to represent a schema type using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new element.- Parameters:
serverName
- calling userurlMarker
- view service URL markerrequestBody
- properties that override the template- Returns:
- unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
updateSchemaType
@PostMapping(path="/schema-types/{schemaTypeGUID}/update") public VoidResponse updateSchemaType(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String schemaTypeGUID, @RequestParam(required=false,defaultValue="false") boolean replaceAllProperties, @RequestBody(required=false) UpdateElementRequestBody requestBody) Update the properties of a schema type.- Parameters:
serverName
- name of called server.urlMarker
- view service URL markerschemaTypeGUID
- unique identifier of the schema type (returned from create)replaceAllProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.requestBody
- properties for the new element.- Returns:
- void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkLocationToProfile
@PostMapping(path="/schema-types/{schemaTypeGUID}/profile-locations/{locationGUID}/attach") public VoidResponse linkLocationToProfile(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String schemaTypeGUID, @PathVariable String locationGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Attach a profile to a location.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerlocationGUID
- unique identifier of the locationschemaTypeGUID
- unique identifier of the schema typerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachLocationFromProfile
@PostMapping(path="/schema-types/{schemaTypeGUID}/profile-locations/{locationGUID}/detach") public VoidResponse detachLocationFromProfile(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String schemaTypeGUID, @PathVariable String locationGUID, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Detach a schema type from a location.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerschemaTypeGUID
- unique identifier of the schema typelocationGUID
- unique identifier of the locationrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkPeerPerson
@PostMapping(path="/schema-types/{personOneGUID}/peer-persons/{personTwoGUID}/attach") public VoidResponse linkPeerPerson(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String personOneGUID, @PathVariable String personTwoGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Attach a person profile to one of its peers.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerpersonOneGUID
- unique identifier of the first person profilepersonTwoGUID
- unique identifier of the second person profilerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachPeerPerson
@PostMapping(path="/schema-types/{personOneGUID}/peer-persons/{personTwoGUID}/detach") public VoidResponse detachPeerPerson(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String personOneGUID, @PathVariable String personTwoGUID, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Detach a person profile from one of its peers.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerpersonOneGUID
- unique identifier of the first person profilepersonTwoGUID
- unique identifier of the second person profilerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkTeamStructure
@PostMapping(path="/schema-types/{superTeamGUID}/team-structures/{subteamGUID}/attach") public VoidResponse linkTeamStructure(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String superTeamGUID, @PathVariable String subteamGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Attach a super team to a subteam.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markersuperTeamGUID
- unique identifier of the super teamsubteamGUID
- unique identifier of the subteamrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachTeamStructure
@PostMapping(path="/schema-types/{superTeamGUID}/team-structures/{subteamGUID}/detach") public VoidResponse detachTeamStructure(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String superTeamGUID, @PathVariable String subteamGUID, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Detach a super team from a subteam.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markersuperTeamGUID
- unique identifier of the super teamsubteamGUID
- unique identifier of the subteamrequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkTeamToMembershipRole
@PostMapping(path="/schema-types/{teamGUID}/team-membership-roles/{personRoleGUID}/attach") public VoidResponse linkTeamToMembershipRole(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String teamGUID, @PathVariable String personRoleGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Attach a team to its membership role.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerteamGUID
- unique identifier of the teampersonRoleGUID
- unique identifier of the associated person rolerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachTeamFromMembershipRole
@PostMapping(path="/schema-types/{teamGUID}/team-membership-roles/{personRoleGUID}/detach") public VoidResponse detachTeamFromMembershipRole(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String teamGUID, @PathVariable String personRoleGUID, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Detach a team profile from its membership role.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerteamGUID
- unique identifier of the teampersonRoleGUID
- unique identifier of the associated person rolerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
linkTeamToLeadershipRole
@PostMapping(path="/schema-types/{teamGUID}/team-leadership-roles/{personRoleGUID}/attach") public VoidResponse linkTeamToLeadershipRole(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String teamGUID, @PathVariable String personRoleGUID, @RequestBody(required=false) RelationshipRequestBody requestBody) Attach a team to its leadership role.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerteamGUID
- unique identifier of the teampersonRoleGUID
- unique identifier of the associated person rolerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
detachTeamFromLeadershipRole
@PostMapping(path="/schema-types/{teamGUID}/team-leadership-roles/{personRoleGUID}/detach") public VoidResponse detachTeamFromLeadershipRole(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String teamGUID, @PathVariable String personRoleGUID, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Detach a team profile from its leadership role.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerteamGUID
- unique identifier of the teampersonRoleGUID
- unique identifier of the associated person rolerequestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
deleteSchemaType
@PostMapping(path="/schema-types/{schemaTypeGUID}/delete") public VoidResponse deleteSchemaType(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String schemaTypeGUID, @RequestParam(required=false,defaultValue="false") boolean cascadedDelete, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Delete a schema type.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerschemaTypeGUID
- unique identifier of the element to deletecascadedDelete
- ca schema types be deleted if data fields are attached?requestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getSchemaTypesByName
@PostMapping(path="/schema-types/by-name") public SchemaTypesResponse getSchemaTypesByName(@PathVariable String serverName, @PathVariable String urlMarker, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of schema types with a particular name.- Parameters:
serverName
- name of the service to route the request tourlMarker
- view service URL markerstartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
findSchemaTypes
@PostMapping(path="/schema-types/by-search-string") public SchemaTypesResponse findSchemaTypes(@PathVariable String serverName, @PathVariable String urlMarker, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestParam(required=false,defaultValue="false") boolean startsWith, @RequestParam(required=false,defaultValue="false") boolean endsWith, @RequestParam(required=false,defaultValue="false") boolean ignoreCase, @RequestBody(required=false) FilterRequestBody requestBody) Retrieve the list of schema type metadata elements that contain the search string.- Parameters:
serverName
- name of the service to route the request tourlMarker
- view service URL markerstartsWith
- does the value start with the supplied string?endsWith
- does the value end with the supplied string?ignoreCase
- should the search ignore case?startFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getSchemaTypeByGUID
@PostMapping(path="/schema-types/{schemaTypeGUID}/retrieve") public SchemaTypeResponse getSchemaTypeByGUID(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String schemaTypeGUID, @RequestBody(required=false) AnyTimeRequestBody requestBody) Return the properties of a specific schema type.- Parameters:
serverName
- name of the service to route the request tourlMarker
- view service URL markerschemaTypeGUID
- unique identifier of the required elementrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
createSchemaAttribute
@PostMapping(path={"/schema-attributes","/solution-roles"}) public GUIDResponse createSchemaAttribute(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody(required=false) NewElementRequestBody requestBody) Create a schema attribute.- Parameters:
serverName
- name of called server.urlMarker
- view service URL markerrequestBody
- properties for the schema attribute.- Returns:
- unique identifier of the newly created element InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
createSchemaAttributeFromTemplate
@PostMapping(path={"/schema-attributes/from-template","/solution-roles/from-template"}) public GUIDResponse createSchemaAttributeFromTemplate(@PathVariable String serverName, @PathVariable String urlMarker, @RequestBody(required=false) TemplateRequestBody requestBody) Create a new metadata element to represent a schema attribute using an existing metadata element as a template. The template defines additional classifications and relationships that should be added to the new element.- Parameters:
serverName
- calling userurlMarker
- view service URL markerrequestBody
- properties that override the template- Returns:
- unique identifier of the new metadata element InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
updateSchemaAttribute
@PostMapping(path={"/schema-attributes/{schemaAttributeGUID}/update","/solution-roles/{schemaAttributeGUID}/update"}) public VoidResponse updateSchemaAttribute(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String schemaAttributeGUID, @RequestParam(required=false,defaultValue="false") boolean replaceAllProperties, @RequestBody(required=false) UpdateElementRequestBody requestBody) Update the properties of a schema attribute.- Parameters:
serverName
- name of called server.urlMarker
- view service URL markerschemaAttributeGUID
- unique identifier of the schema attribute (returned from create)replaceAllProperties
- flag to indicate whether to completely replace the existing properties with the new properties, or just update the individual properties specified on the request.requestBody
- properties for the new element.- Returns:
- void or InvalidParameterException one of the parameters is invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
deleteSchemaAttribute
@PostMapping(path={"/schema-attributes/{schemaAttributeGUID}/delete","/solution-roles/{schemaAttributeGUID}/delete"}) public VoidResponse deleteSchemaAttribute(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String schemaAttributeGUID, @RequestParam(required=false,defaultValue="false") boolean cascadedDelete, @RequestBody(required=false) MetadataSourceRequestBody requestBody) Delete a schema attribute.- Parameters:
serverName
- name of called serverurlMarker
- view service URL markerschemaAttributeGUID
- unique identifier of the element to deletecascadedDelete
- ca schemaAttributes be deleted if data fields are attached?requestBody
- description of the relationship.- Returns:
- void or InvalidParameterException one of the parameters is null or invalid. PropertyServerException there is a problem retrieving information from the property server(s). UserNotAuthorizedException the requesting user is not authorized to issue this request.
-
getSchemaAttributesByName
@PostMapping(path={"/schema-attributes/by-name","/solution-roles/by-name"}) public SchemaAttributesResponse getSchemaAttributesByName(@PathVariable String serverName, @PathVariable String urlMarker, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestBody(required=false) FilterRequestBody requestBody) Returns the list of schema attributes with a particular name.- Parameters:
serverName
- name of the service to route the request tourlMarker
- view service URL markerstartFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
findSchemaAttributes
@PostMapping(path={"/schema-attributes/by-search-string","/solution-roles/by-search-string"}) public SchemaAttributesResponse findSchemaAttributes(@PathVariable String serverName, @PathVariable String urlMarker, @RequestParam(required=false,defaultValue="0") int startFrom, @RequestParam(required=false,defaultValue="0") int pageSize, @RequestParam(required=false,defaultValue="false") boolean startsWith, @RequestParam(required=false,defaultValue="false") boolean endsWith, @RequestParam(required=false,defaultValue="false") boolean ignoreCase, @RequestBody(required=false) FilterRequestBody requestBody) Retrieve the list of schema attribute metadata elements that contain the search string.- Parameters:
serverName
- name of the service to route the request tourlMarker
- view service URL markerstartsWith
- does the value start with the supplied string?endsWith
- does the value end with the supplied string?ignoreCase
- should the search ignore case?startFrom
- paging start pointpageSize
- maximum results that can be returnedrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-
getSchemaAttributeByGUID
@PostMapping(path={"/schema-attributes/{schemaAttributeGUID}/retrieve","/solution-roles/{schemaAttributeGUID}/retrieve"}) public SchemaAttributeResponse getSchemaAttributeByGUID(@PathVariable String serverName, @PathVariable String urlMarker, @PathVariable String schemaAttributeGUID, @RequestBody(required=false) AnyTimeRequestBody requestBody) Return the properties of a specific schema attribute.- Parameters:
serverName
- name of the service to route the request tourlMarker
- view service URL markerschemaAttributeGUID
- unique identifier of the required elementrequestBody
- string to find in the properties- Returns:
- list of matching metadata elements or InvalidParameterException one of the parameters is invalid UserNotAuthorizedException the user is not authorized to issue this request PropertyServerException there is a problem reported in the open metadata server(s)
-