Class PortHandler<B>
- java.lang.Object
-
- org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler<B>
-
- org.odpi.openmetadata.commonservices.generichandlers.PortHandler<B>
-
- Type Parameters:
B- class of bean for returning the port attributes
public class PortHandler<B> extends OpenMetadataAPIGenericHandler<B>
Manages the maintenance of port entities. It does not currently support effectivity dates but probably should give that option.
-
-
Field Summary
-
Fields inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
auditLog, beanClass, converter, defaultZones, errorHandler, invalidParameterHandler, localServerUserId, publishZones, repositoryHandler, repositoryHelper, securityVerifier, serverName, serviceName, supportedZones
-
-
Constructor Summary
Constructors Constructor Description PortHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog)Construct the handler information needed to interact with the repository services
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclearPortDelegation(String userId, String externalSourceGUID, String externalSourceName, String portOneGUID, String portOneGUIDParameterName, String portTwoGUID, String portTwoGUIDParameterName, String methodName)Remove the port delegation relationship between two ports.voidclearPortSchemaType(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, String schemaTypeGUID, String schemaTypeGUIDParameterName, String methodName)Remove the schema type from a port.voidclearProcessPort(String userId, String externalSourceGUID, String externalSourceName, String processGUID, String processGUIDParameterName, String portGUID, String portGUIDParameterName, String methodName)Unlink a port from a process.StringcreatePort(String userId, String externalSourceGUID, String externalSourceName, String processGUID, String processGUIDParameterName, String qualifiedName, String displayName, int portType, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, String methodName)Create a new metadata element to represent a port.List<B>findPorts(String userId, String searchString, String searchStringParameterName, int startFrom, int pageSize, String methodName)Retrieve the list of port metadata elements that contain the search string.BgetPortByGUID(String userId, String portGUID, String portGUIDParameterName, String methodName)Retrieve the port metadata element with the supplied unique identifier.BgetPortDelegation(String userId, String portGUID, String portGUIDParameterName, String methodName)Retrieve the port that this port delegates to.List<B>getPortsByName(String userId, String name, String nameParameterName, int startFrom, int pageSize, String methodName)Retrieve the list of port metadata elements with a matching qualified or display name.List<B>getPortsForProcess(String userId, String processGUID, String processGUIDParameterName, int startFrom, int pageSize, String methodName)Retrieve the list of ports associated with a process.List<B>getPortUse(String userId, String portGUID, String portGUIDParameterName, int startFrom, int pageSize, String methodName)Retrieve the list of ports that delegate to this port.voidremovePort(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, String methodName)Remove the metadata element representing a port.voidsetupPortDelegation(String userId, String externalSourceGUID, String externalSourceName, String portOneGUID, String portOneGUIDParameterName, String portTwoGUID, String portTwoGUIDParameterName, String methodName)Link two ports together to show that portTwo is an implementation of portOne.voidsetupPortSchemaType(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, String schemaTypeGUID, String schemaTypeGUIDParameterName, String methodName)Link a schema type to a port to show the structure of data it accepts.voidsetupProcessPort(String userId, String externalSourceGUID, String externalSourceName, String processGUID, String processGUIDParameterName, String portGUID, String portGUIDParameterName, String methodName)Link a port to a process.voidupdatePort(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, String qualifiedName, String displayName, int portType, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, String methodName)Update the properties of the metadata element representing a port.-
Methods inherited from class org.odpi.openmetadata.commonservices.generichandlers.OpenMetadataAPIGenericHandler
addAnchorsClassification, archiveBeanInRepository, archiveBeanInRepository, countAttachments, createBeanFromTemplate, createBeanInRepository, deleteAnchoredEntity, deleteBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteBeanInRepository, deleteRelationship, entityMatchSearchCriteria, findAttachmentLinks, findBeanGUIDs, findBeans, findBeans, findBeans, findEntities, findEntities, getAllAttachmentLinks, getAnchorGUIDFromAnchorsClassification, getAttachedElement, getAttachedElementGUID, getAttachedElementGUID, getAttachedElementGUIDs, getAttachedElementGUIDs, getAttachedElements, getAttachedElements, getAttachedElements, getAttachedEntities, getAttachedEntities, getAttachedEntitiesFromUser, getAttachedEntity, getAttachedEntity, getAttachedEntity, getAttachedEntityFromUser, getAttachedFilteredEntities, getAttachedFilteredEntities, getAttachedFilteredEntities, getAttachmentLink, getAttachmentLinks, getAttachmentLinks, getAttachmentLinks, getBeanByUniqueName, getBeanByUniqueName, getBeanByValue, getBeanFromEntity, getBeanFromRepository, getBeanFromRepository, getBeanFromRepository, getBeanGUIDByUniqueName, getBeanGUIDByUniqueName, getBeanGUIDsByClassification, getBeanGUIDsByType, getBeanGUIDsByType, getBeanGUIDsByValue, getBeansByClassification, getBeansByCreator, getBeansByIntValue, getBeansByType, getBeansByType, getBeansByValue, getBeansByValue, getBeansByValue, getBeansByValue, getEffectiveTime, getEffectiveTime, getEntitiesByIntValue, getEntitiesByType, getEntitiesByType, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntitiesByValue, getEntityByValue, getEntityFromRepository, getEntityFromRepository, getEntityGUIDByValue, getEntityGUIDsByValue, getRepositoryHandler, getRepositoryHelper, getServerName, getServiceName, getTypeDefByName, getUniqueAttachmentLink, getUniqueAttachmentLink, isBeanIsolated, isEntityATypeOf, linkElementToElement, linkElementToElement, linkElementToElement, linkElementToElement, maintainSupplementaryProperties, multiLinkElementToElement, regexSearchCriteria, relinkElementToNewElement, relinkElementToNewElement, removeClassificationFromRepository, removeClassificationFromRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setClassificationInRepository, setSecurityVerifier, unlinkAllElements, unlinkConnectedElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, unlinkElementFromElement, updateBeanEffectivityDates, updateBeanEffectivityDates, updateBeanInRepository, updateBeanInRepository, updateBeanInRepository, updateBeanPropertyInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateBeanStatusInRepository, updateClassificationEffectivityDates, updateClassificationEffectivityDates, updateElementToElementLink, updateElementToElementLink, updateElementToElementLink, updateElementToElementLink, updateRelationshipEffectivityDates, updateRelationshipEffectivityDates, updateRelationshipProperties, validateAnchorEntity, validateAnchorEntity, validateUniqueProperty, verifyExternalSourceIdentity
-
-
-
-
Constructor Detail
-
PortHandler
public PortHandler(OpenMetadataAPIGenericConverter<B> converter, Class<B> beanClass, String serviceName, String serverName, InvalidParameterHandler invalidParameterHandler, RepositoryHandler repositoryHandler, OMRSRepositoryHelper repositoryHelper, String localServerUserId, OpenMetadataServerSecurityVerifier securityVerifier, List<String> supportedZones, List<String> defaultZones, List<String> publishZones, AuditLog auditLog)
Construct the handler information needed to interact with the repository services- Parameters:
converter- specific converter for this bean classbeanClass- name of bean class that is represented by the generic class BserviceName- name of this serviceserverName- name of the local serverinvalidParameterHandler- handler for managing parameter errorsrepositoryHandler- manages calls to the repository servicesrepositoryHelper- provides utilities for manipulating the repository services objectslocalServerUserId- userId for this serversecurityVerifier- open metadata security services verifiersupportedZones- list of zones that the access service is allowed to serve Asset instances from.defaultZones- list of zones that the access service should set in all new Asset instances.publishZones- list of zones that the access service sets up in published Asset instances.auditLog- destination for audit log events.
-
-
Method Detail
-
createPort
public String createPort(String userId, String externalSourceGUID, String externalSourceName, String processGUID, String processGUIDParameterName, String qualifiedName, String displayName, int portType, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Create a new metadata element to represent a port.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerprocessGUID- unique identifier of the process where the port is locatedprocessGUIDParameterName- parameter supplying processGUIDqualifiedName- unique name for the port - used in other configurationdisplayName- short display name for the portportType- description of the portadditionalProperties- additional properties for a portsuppliedTypeName- type name from the caller (enables creation of subtypes)extendedProperties- properties for a port subtypemethodName- calling method- Returns:
- unique identifier of the new metadata element for the port
- 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)
-
updatePort
public void updatePort(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, String qualifiedName, String displayName, int portType, Map<String,String> additionalProperties, String suppliedTypeName, Map<String,Object> extendedProperties, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Update the properties of the metadata element representing a port. This call replaces all existing properties with the supplied properties.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerportGUID- unique identifier of the port to updateportGUIDParameterName- parameter supplying portGUIDqualifiedName- unique name for the port - used in other configurationdisplayName- short display name for the portportType- description of the portadditionalProperties- additional properties for a portsuppliedTypeName- type name from the caller (enables creation of subtypes)extendedProperties- properties for a port subtypemethodName- calling method- 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)
-
setupProcessPort
public void setupProcessPort(String userId, String externalSourceGUID, String externalSourceName, String processGUID, String processGUIDParameterName, String portGUID, String portGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Link a port to a process.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerprocessGUID- unique identifier of the processprocessGUIDParameterName- parameter supplying processGUIDportGUID- unique identifier of the portportGUIDParameterName- parameter supplying portGUIDmethodName- calling method- 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)
-
clearProcessPort
public void clearProcessPort(String userId, String externalSourceGUID, String externalSourceName, String processGUID, String processGUIDParameterName, String portGUID, String portGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Unlink a port from a process.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerprocessGUID- unique identifier of the processprocessGUIDParameterName- parameter supplying processGUIDportGUID- unique identifier of the portportGUIDParameterName- parameter supplying portGUIDmethodName- calling method- 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)
-
setupPortDelegation
public void setupPortDelegation(String userId, String externalSourceGUID, String externalSourceName, String portOneGUID, String portOneGUIDParameterName, String portTwoGUID, String portTwoGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Link two ports together to show that portTwo is an implementation of portOne. (That is, portOne delegates to portTwo.)- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerportOneGUID- unique identifier of the port at end 1portOneGUIDParameterName- parameter supplying portOneGUIDportTwoGUID- unique identifier of the port at end 2portTwoGUIDParameterName- parameter supplying portTwoGUIDmethodName- calling method- 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)
-
clearPortDelegation
public void clearPortDelegation(String userId, String externalSourceGUID, String externalSourceName, String portOneGUID, String portOneGUIDParameterName, String portTwoGUID, String portTwoGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the port delegation relationship between two ports.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerportOneGUID- unique identifier of the port at end 1portOneGUIDParameterName- parameter supplying portOneGUIDportTwoGUID- unique identifier of the port at end 2portTwoGUIDParameterName- parameter supplying portTwoGUIDmethodName- calling method- 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)
-
setupPortSchemaType
public void setupPortSchemaType(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, String schemaTypeGUID, String schemaTypeGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Link a schema type to a port to show the structure of data it accepts.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerportGUID- unique identifier of the portportGUIDParameterName- parameter supplying portGUIDschemaTypeGUID- unique identifier of the schemaTypeschemaTypeGUIDParameterName- parameter supplying schemaTypeGUIDmethodName- calling method- 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)
-
clearPortSchemaType
public void clearPortSchemaType(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, String schemaTypeGUID, String schemaTypeGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the schema type from a port.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerportGUID- unique identifier of the portportGUIDParameterName- parameter supplying portGUIDschemaTypeGUID- unique identifier of the schemaTypeschemaTypeGUIDParameterName- parameter supplying schemaTypeGUIDmethodName- calling method- 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)
-
removePort
public void removePort(String userId, String externalSourceGUID, String externalSourceName, String portGUID, String portGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Remove the metadata element representing a port.- Parameters:
userId- calling userexternalSourceGUID- unique identifier of software server capability representing the callerexternalSourceName- unique name of software server capability representing the callerportGUID- unique identifier of the metadata element to removeportGUIDParameterName- parameter supplying portGUIDmethodName- calling method- 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)
-
findPorts
public List<B> findPorts(String userId, String searchString, String searchStringParameterName, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of port metadata elements that contain the search string. The search string is treated as a regular expression.- Parameters:
userId- calling usersearchString- string to find in the propertiessearchStringParameterName- parameter supplying searchStringstartFrom- paging start pointpageSize- maximum results that can be returnedmethodName- calling method- 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)
-
getPortsForProcess
public List<B> getPortsForProcess(String userId, String processGUID, String processGUIDParameterName, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of ports associated with a process.- Parameters:
userId- calling userprocessGUID- unique identifier of the process of interestprocessGUIDParameterName- parameter passing processGUIDstartFrom- paging start pointpageSize- maximum results that can be returnedmethodName- calling method- Returns:
- list of associated 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)
-
getPortUse
public List<B> getPortUse(String userId, String portGUID, String portGUIDParameterName, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of ports that delegate to this port.- Parameters:
userId- calling userportGUID- unique identifier of the starting portportGUIDParameterName- parameter passing portGUIDstartFrom- paging start pointpageSize- maximum results that can be returnedmethodName- calling method- Returns:
- list of associated 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)
-
getPortDelegation
public B getPortDelegation(String userId, String portGUID, String portGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the port that this port delegates to.- Parameters:
userId- calling userportGUID- unique identifier of the starting port aliasportGUIDParameterName- parameter passing portGUIDmethodName- calling method- Returns:
- matching 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)
-
getPortsByName
public List<B> getPortsByName(String userId, String name, String nameParameterName, int startFrom, int pageSize, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the list of port metadata elements with a matching qualified or display name. There are no wildcards supported on this request.- Parameters:
userId- calling username- name to search fornameParameterName- parameter supplying namestartFrom- paging start pointpageSize- maximum results that can be returnedmethodName- calling method- 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)
-
getPortByGUID
public B getPortByGUID(String userId, String portGUID, String portGUIDParameterName, String methodName) throws InvalidParameterException, UserNotAuthorizedException, PropertyServerException
Retrieve the port metadata element with the supplied unique identifier.- Parameters:
userId- calling userportGUID- unique identifier of the requested metadata elementportGUIDParameterName- parameter passing portGUIDmethodName- calling method- Returns:
- matching 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)
-
-