Class SolutionPortHandler
java.lang.Object
org.odpi.openmetadata.frameworks.openmetadata.handlers.OpenMetadataHandlerBase
org.odpi.openmetadata.frameworks.openmetadata.handlers.SolutionPortHandler
SolutionPortHandler provides methods to define solution ports and their relationships: the SolutionComponentPort
relationship that attaches a port to the solution component that exposes it, and the SolutionPortDelegation
relationship that aligns the port of a composite component with the port of one of its subcomponents.
-
Field Summary
Fields inherited from class org.odpi.openmetadata.frameworks.openmetadata.handlers.OpenMetadataHandlerBase
auditLog, classificationBuilder, elementBuilder, localServerName, localServiceName, metadataElementTypeName, openMetadataClient, propertyHelper, relationshipBuilder -
Constructor Summary
ConstructorsConstructorDescriptionSolutionPortHandler(String localServerName, AuditLog auditLog, String serviceName, OpenMetadataClient openMetadataClient) Create a new handler. -
Method Summary
Modifier and TypeMethodDescriptioncreateSolutionPort(String userId, NewElementOptions newElementOptions, Map<String, ClassificationProperties> initialClassifications, SolutionPortProperties properties, RelationshipProperties parentRelationshipProperties) Create a new solution port.createSolutionPortFromTemplate(String userId, TemplateOptions templateOptions, String templateGUID, EntityProperties replacementProperties, Map<String, ClassificationProperties> replacementClassifications, Map<String, String> placeholderProperties, RelationshipProperties parentRelationshipProperties) Create a new metadata element to represent a solution port using an existing element as a template.voiddeleteSolutionPort(String userId, String solutionPortGUID, DeleteOptions deleteOptions) Delete a solution port.voiddetachSolutionComponentPort(String userId, String solutionComponentGUID, String solutionPortGUID, DeleteOptions deleteOptions) Detach a solution port from the solution component that exposed it.voiddetachSolutionPortDelegation(String userId, String alignsToPortGUID, String delegationPortGUID, DeleteOptions deleteOptions) Detach a solution port from the solution port that it delegated to.findSolutionPorts(String userId, String searchString, SearchOptions searchOptions) Retrieve the list of solution ports that contain the search string.getSolutionPortByGUID(String userId, String solutionPortGUID, GetOptions getOptions) Return the properties of a specific solution port.getSolutionPortsByName(String userId, String name, QueryOptions queryOptions) Returns the list of solution ports with a particular name.voidlinkSolutionComponentPort(String userId, String solutionComponentGUID, String solutionPortGUID, MakeAnchorOptions makeAnchorOptions, SolutionComponentPortProperties relationshipProperties) Attach a solution port to the solution component that exposes it.voidlinkSolutionPortDelegation(String userId, String alignsToPortGUID, String delegationPortGUID, MakeAnchorOptions makeAnchorOptions, SolutionPortDelegationProperties relationshipProperties) Attach a solution port to the solution port that it delegates to.booleanupdateSolutionPort(String userId, String solutionPortGUID, UpdateOptions updateOptions, SolutionPortProperties properties) Update the properties of a solution port.Methods inherited from class org.odpi.openmetadata.frameworks.openmetadata.handlers.OpenMetadataHandlerBase
addDefaultType, addDefaultType, addDefaultType, addMermaidToRootElement, convertRootElement, convertRootElement, convertRootElements, createElementFromTemplate, createNewElement, findRootElements, getClassificationSearch, getDeletedElementByUniqueName, getElementHierarchies, getElementHierarchies, getElementHierarchy, getElementRelatedElements, getElementsByClassification, getFullParentContext, getLineageElementByUniqueName, getMermaidGraph, getMermaidGraph, getQueryOptions, getQueryOptions, getQueryOptions, getRelatedRootElements, getRootElementByGUID, getRootElementByUniqueName, getRootElementByUniqueName, getRootElementsByName, getRootElementsByUniqueName, populateRootElement, updateElement
-
Constructor Details
-
SolutionPortHandler
public SolutionPortHandler(String localServerName, AuditLog auditLog, String serviceName, OpenMetadataClient openMetadataClient) Create a new handler.- Parameters:
localServerName- name of this server (view server)auditLog- logging destinationserviceName- local service nameopenMetadataClient- access to open metadata
-
-
Method Details
-
createSolutionPort
public String createSolutionPort(String userId, NewElementOptions newElementOptions, Map<String, ClassificationProperties> initialClassifications, SolutionPortProperties properties, RelationshipProperties parentRelationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedExceptionCreate a new solution port.- Parameters:
userId- userId of user making request.newElementOptions- details of the element to createinitialClassifications- map of classification names to classification properties to include in the entity creation requestproperties- properties for the new element.parentRelationshipProperties- properties to include in parent relationship- Returns:
- unique identifier of the newly created element
- Throws:
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.
-
createSolutionPortFromTemplate
public String createSolutionPortFromTemplate(String userId, TemplateOptions templateOptions, String templateGUID, EntityProperties replacementProperties, Map<String, ClassificationProperties> replacementClassifications, Map<String, throws InvalidParameterException, UserNotAuthorizedException, PropertyServerExceptionString> placeholderProperties, RelationshipProperties parentRelationshipProperties) Create a new metadata element to represent a solution port using an existing element as a template. The template defines additional classifications and relationships that should be added to the new solution port.- Parameters:
userId- calling usertemplateOptions- details of the element to createtemplateGUID- the unique identifier of the existing element to copyreplacementProperties- properties that override the templatereplacementClassifications- classifications that override the templateplaceholderProperties- property name-to-property value map to replace any placeholder values in the template element - and their anchored elements, which are also copied as part of this operation.parentRelationshipProperties- properties to include in parent relationship- Returns:
- unique identifier of the new metadata element
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
updateSolutionPort
public boolean updateSolutionPort(String userId, String solutionPortGUID, UpdateOptions updateOptions, SolutionPortProperties properties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Update the properties of a solution port.- Parameters:
userId- userId of user making request.solutionPortGUID- unique identifier of the solution port (returned from create)updateOptions- provides a structure for the additional options when updating an element.properties- properties for the element.- Returns:
- boolean - true if an update occurred
- Throws:
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.
-
deleteSolutionPort
public void deleteSolutionPort(String userId, String solutionPortGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Delete a solution port.- Parameters:
userId- userId of user making request.solutionPortGUID- unique identifier of the elementdeleteOptions- options for a delete request- Throws:
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.
-
getSolutionPortsByName
public List<OpenMetadataRootElement> getSolutionPortsByName(String userId, String name, QueryOptions queryOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Returns the list of solution ports with a particular name.- Parameters:
userId- userId of user making requestname- name of the element to return - match is full text match in qualifiedName, identifier or displayNamequeryOptions- multiple options to control the query- Returns:
- a list of elements
- Throws:
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.
-
getSolutionPortByGUID
public OpenMetadataRootElement getSolutionPortByGUID(String userId, String solutionPortGUID, GetOptions getOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Return the properties of a specific solution port.- Parameters:
userId- userId of user making requestsolutionPortGUID- unique identifier of the required elementgetOptions- multiple options to control the query- Returns:
- retrieved properties
- Throws:
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.
-
findSolutionPorts
public List<OpenMetadataRootElement> findSolutionPorts(String userId, String searchString, SearchOptions searchOptions) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException Retrieve the list of solution ports that contain the search string.- Parameters:
userId- calling usersearchString- string to find in the propertiessearchOptions- multiple options to control the query- Returns:
- list of matching metadata elements
- Throws:
InvalidParameterException- one of the parameters is invalidUserNotAuthorizedException- the user is not authorized to issue this requestPropertyServerException- there is a problem reported in the open metadata server(s)
-
linkSolutionComponentPort
public void linkSolutionComponentPort(String userId, String solutionComponentGUID, String solutionPortGUID, MakeAnchorOptions makeAnchorOptions, SolutionComponentPortProperties relationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach a solution port to the solution component that exposes it.- Parameters:
userId- userId of user making requestsolutionComponentGUID- unique identifier of the solution componentsolutionPortGUID- unique identifier of the solution portmakeAnchorOptions- options to control access to open metadatarelationshipProperties- description of the relationship.- Throws:
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.
-
detachSolutionComponentPort
public void detachSolutionComponentPort(String userId, String solutionComponentGUID, String solutionPortGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach a solution port from the solution component that exposed it.- Parameters:
userId- userId of user making request.solutionComponentGUID- unique identifier of the solution componentsolutionPortGUID- unique identifier of the solution portdeleteOptions- options to control access to open metadata- Throws:
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.
-
linkSolutionPortDelegation
public void linkSolutionPortDelegation(String userId, String alignsToPortGUID, String delegationPortGUID, MakeAnchorOptions makeAnchorOptions, SolutionPortDelegationProperties relationshipProperties) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Attach a solution port to the solution port that it delegates to. The port that aligns to is typically on a composite solution component and the delegation port is on one of its subcomponents.- Parameters:
userId- userId of user making requestalignsToPortGUID- unique identifier of the solution port that is aligned todelegationPortGUID- unique identifier of the solution port that delegatesmakeAnchorOptions- options to control access to open metadatarelationshipProperties- description of the relationship.- Throws:
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.
-
detachSolutionPortDelegation
public void detachSolutionPortDelegation(String userId, String alignsToPortGUID, String delegationPortGUID, DeleteOptions deleteOptions) throws InvalidParameterException, PropertyServerException, UserNotAuthorizedException Detach a solution port from the solution port that it delegated to.- Parameters:
userId- userId of user making request.alignsToPortGUID- unique identifier of the solution port that is aligned todelegationPortGUID- unique identifier of the solution port that delegatesdeleteOptions- options to control access to open metadata- Throws:
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.
-