Class SchemaMakerRESTServices
java.lang.Object
org.odpi.openmetadata.tokencontroller.TokenController
org.odpi.openmetadata.viewservices.schemamaker.server.SchemaMakerRESTServices
The SchemaMakerRESTServices provides the server-side implementation of the Schema Maker Open Metadata
View Service (OMVS). This interface provides access to a person's profile, roles and network.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateSchemaAttribute
(String serverName, String viewServiceURLMarker, NewElementRequestBody requestBody) Create a schemaAttribute.createSchemaAttributeFromTemplate
(String serverName, String viewServiceURLMarker, TemplateRequestBody requestBody) Create a new metadata element to represent a schemaAttribute using an existing metadata element as a template.createSchemaType
(String serverName, String viewServiceURLMarker, NewElementRequestBody requestBody) Create a schema type.createSchemaTypeFromTemplate
(String serverName, String viewServiceURLMarker, TemplateRequestBody requestBody) Create a new metadata element to represent a schema type using an existing metadata element as a template.deleteSchemaAttribute
(String serverName, String viewServiceURLMarker, String schemaAttributeGUID, boolean cascadedDelete, MetadataSourceRequestBody requestBody) Delete a schemaAttribute.deleteSchemaType
(String serverName, String viewServiceURLMarker, String schemaTypeGUID, boolean cascadedDelete, MetadataSourceRequestBody requestBody) Delete a schema type.detachAssetFromProfile
(String serverName, String viewServiceURLMarker, String assetGUID, String itProfileGUID, MetadataSourceRequestBody requestBody) Detach an asset from an IT profile.detachLocationFromProfile
(String serverName, String viewServiceURLMarker, String schemaTypeGUID, String locationGUID, MetadataSourceRequestBody requestBody) Detach a schema type from a location.detachPeerPerson
(String serverName, String viewServiceURLMarker, String personOneGUID, String personTwoGUID, MetadataSourceRequestBody requestBody) Detach a person profile from one of its peers.detachTeamFromLeadershipRole
(String serverName, String viewServiceURLMarker, String teamGUID, String personRoleGUID, MetadataSourceRequestBody requestBody) Detach a team profile from its leadership role.detachTeamFromMembershipRole
(String serverName, String viewServiceURLMarker, String teamGUID, String personRoleGUID, MetadataSourceRequestBody requestBody) Detach a team profile from its membership role.detachTeamStructure
(String serverName, String viewServiceURLMarker, String superTeamGUID, String subteamGUID, MetadataSourceRequestBody requestBody) Detach a super team from a subteam.findSchemaAttributes
(String serverName, String viewServiceURLMarker, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize, FilterRequestBody requestBody) Retrieve the list of schema attribute metadata elements that contain the search string.findSchemaTypes
(String serverName, String viewServiceURLMarker, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize, FilterRequestBody requestBody) Retrieve the list of schema type metadata elements that contain the search string.getSchemaAttributeByGUID
(String serverName, String viewServiceURLMarker, String schemaAttributeGUID, AnyTimeRequestBody requestBody) Retrieve the list of schema attribute metadata elements that contain the search string.getSchemaAttributesByName
(String serverName, String viewServiceURLMarker, int startFrom, int pageSize, FilterRequestBody requestBody) Retrieve the list of schema attribute metadata elements that contain the search string.getSchemaTypeByGUID
(String serverName, String viewServiceURLMarker, String schemaTypeGUID, AnyTimeRequestBody requestBody) Retrieve the list of schema type metadata elements that contain the search string.getSchemaTypesByName
(String serverName, String viewServiceURLMarker, int startFrom, int pageSize, FilterRequestBody requestBody) Retrieve the list of schema type metadata elements that contain the search string.linkAssetToProfile
(String serverName, String viewServiceURLMarker, String assetGUID, String itProfileGUID, RelationshipRequestBody requestBody) Attach an asset to an IT profile.linkLocationToProfile
(String serverName, String viewServiceURLMarker, String schemaTypeGUID, String locationGUID, RelationshipRequestBody requestBody) Attach a profile to a location.linkPeerPerson
(String serverName, String viewServiceURLMarker, String personOneGUID, String personTwoGUID, RelationshipRequestBody requestBody) Attach a person profile to one of its peers.linkTeamStructure
(String serverName, String viewServiceURLMarker, String superTeamGUID, String subteamGUID, RelationshipRequestBody requestBody) Attach a super team to a subteam.linkTeamToLeadershipRole
(String serverName, String viewServiceURLMarker, String teamGUID, String personRoleGUID, RelationshipRequestBody requestBody) Attach a team to its leadership role.linkTeamToMembershipRole
(String serverName, String viewServiceURLMarker, String teamGUID, String personRoleGUID, RelationshipRequestBody requestBody) Attach a team to its membership role.updateSchemaAttribute
(String serverName, String viewServiceURLMarker, String schemaAttributeGUID, boolean replaceAllProperties, UpdateElementRequestBody requestBody) Update the properties of a schemaAttribute.updateSchemaType
(String serverName, String viewServiceURLMarker, String schemaTypeGUID, boolean replaceAllProperties, UpdateElementRequestBody requestBody) Update the properties of a schema type.Methods inherited from class org.odpi.openmetadata.tokencontroller.TokenController
getUser
-
Constructor Details
-
SchemaMakerRESTServices
public SchemaMakerRESTServices()Default constructor
-
-
Method Details
-
createSchemaType
public GUIDResponse createSchemaType(String serverName, String viewServiceURLMarker, NewElementRequestBody requestBody) Create a schema type.- Parameters:
serverName
- name of called server.viewServiceURLMarker
- 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
public GUIDResponse createSchemaTypeFromTemplate(String serverName, String viewServiceURLMarker, 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 userviewServiceURLMarker
- 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
public VoidResponse updateSchemaType(String serverName, String viewServiceURLMarker, String schemaTypeGUID, boolean replaceAllProperties, UpdateElementRequestBody requestBody) Update the properties of a schema type.- Parameters:
serverName
- name of called server.viewServiceURLMarker
- 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
public VoidResponse linkLocationToProfile(String serverName, String viewServiceURLMarker, String schemaTypeGUID, String locationGUID, RelationshipRequestBody requestBody) Attach a profile to a location.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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.
-
detachLocationFromProfile
public VoidResponse detachLocationFromProfile(String serverName, String viewServiceURLMarker, String schemaTypeGUID, String locationGUID, MetadataSourceRequestBody requestBody) Detach a schema type from a location.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public VoidResponse linkPeerPerson(String serverName, String viewServiceURLMarker, String personOneGUID, String personTwoGUID, RelationshipRequestBody requestBody) Attach a person profile to one of its peers.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- view service URL markerpersonOneGUID
- unique identifier of the first schema typepersonTwoGUID
- unique identifier of the second 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.
-
detachPeerPerson
public VoidResponse detachPeerPerson(String serverName, String viewServiceURLMarker, String personOneGUID, String personTwoGUID, MetadataSourceRequestBody requestBody) Detach a person profile from one of its peers.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public VoidResponse linkTeamStructure(String serverName, String viewServiceURLMarker, String superTeamGUID, String subteamGUID, RelationshipRequestBody requestBody) Attach a super team to a subteam.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public VoidResponse detachTeamStructure(String serverName, String viewServiceURLMarker, String superTeamGUID, String subteamGUID, MetadataSourceRequestBody requestBody) Detach a super team from a subteam.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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.
-
linkAssetToProfile
public VoidResponse linkAssetToProfile(String serverName, String viewServiceURLMarker, String assetGUID, String itProfileGUID, RelationshipRequestBody requestBody) Attach an asset to an IT profile.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- view service URL markerassetGUID
- unique identifier of the assetitProfileGUID
- unique identifier of the IT 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.
-
detachAssetFromProfile
public VoidResponse detachAssetFromProfile(String serverName, String viewServiceURLMarker, String assetGUID, String itProfileGUID, MetadataSourceRequestBody requestBody) Detach an asset from an IT profile.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- view service URL markerassetGUID
- unique identifier of the assetitProfileGUID
- unique identifier of the IT 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.
-
linkTeamToMembershipRole
public VoidResponse linkTeamToMembershipRole(String serverName, String viewServiceURLMarker, String teamGUID, String personRoleGUID, RelationshipRequestBody requestBody) Attach a team to its membership role.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public VoidResponse detachTeamFromMembershipRole(String serverName, String viewServiceURLMarker, String teamGUID, String personRoleGUID, MetadataSourceRequestBody requestBody) Detach a team profile from its membership role.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public VoidResponse linkTeamToLeadershipRole(String serverName, String viewServiceURLMarker, String teamGUID, String personRoleGUID, RelationshipRequestBody requestBody) Attach a team to its leadership role.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public VoidResponse detachTeamFromLeadershipRole(String serverName, String viewServiceURLMarker, String teamGUID, String personRoleGUID, MetadataSourceRequestBody requestBody) Detach a team profile from its leadership role.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public VoidResponse deleteSchemaType(String serverName, String viewServiceURLMarker, String schemaTypeGUID, boolean cascadedDelete, MetadataSourceRequestBody requestBody) Delete a schema type.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public SchemaTypesResponse getSchemaTypesByName(String serverName, String viewServiceURLMarker, int startFrom, int pageSize, 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 toviewServiceURLMarker
- 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)
-
getSchemaTypeByGUID
public SchemaTypeResponse getSchemaTypeByGUID(String serverName, String viewServiceURLMarker, String schemaTypeGUID, AnyTimeRequestBody requestBody) Retrieve the list of schema type metadata elements that contain the search string.- Parameters:
serverName
- name of the service to route the request toviewServiceURLMarker
- 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)
-
findSchemaTypes
public SchemaTypesResponse findSchemaTypes(String serverName, String viewServiceURLMarker, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize, 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 toviewServiceURLMarker
- 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)
-
createSchemaAttribute
public GUIDResponse createSchemaAttribute(String serverName, String viewServiceURLMarker, NewElementRequestBody requestBody) Create a schemaAttribute.- Parameters:
serverName
- name of called server.viewServiceURLMarker
- 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
public GUIDResponse createSchemaAttributeFromTemplate(String serverName, String viewServiceURLMarker, TemplateRequestBody requestBody) Create a new metadata element to represent a schemaAttribute 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 userviewServiceURLMarker
- 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
public VoidResponse updateSchemaAttribute(String serverName, String viewServiceURLMarker, String schemaAttributeGUID, boolean replaceAllProperties, UpdateElementRequestBody requestBody) Update the properties of a schemaAttribute.- Parameters:
serverName
- name of called server.viewServiceURLMarker
- 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
public VoidResponse deleteSchemaAttribute(String serverName, String viewServiceURLMarker, String schemaAttributeGUID, boolean cascadedDelete, MetadataSourceRequestBody requestBody) Delete a schemaAttribute.- Parameters:
serverName
- name of called serverviewServiceURLMarker
- 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
public SchemaAttributesResponse getSchemaAttributesByName(String serverName, String viewServiceURLMarker, int startFrom, int pageSize, 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 toviewServiceURLMarker
- 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)
-
getSchemaAttributeByGUID
public SchemaAttributeResponse getSchemaAttributeByGUID(String serverName, String viewServiceURLMarker, String schemaAttributeGUID, AnyTimeRequestBody requestBody) Retrieve the list of schema attribute metadata elements that contain the search string.- Parameters:
serverName
- name of the service to route the request toviewServiceURLMarker
- 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)
-
findSchemaAttributes
public SchemaAttributesResponse findSchemaAttributes(String serverName, String viewServiceURLMarker, boolean startsWith, boolean endsWith, boolean ignoreCase, int startFrom, int pageSize, 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 toviewServiceURLMarker
- 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)
-