Class RexViewHandler
- java.lang.Object
-
- org.odpi.openmetadata.viewservices.rex.handlers.RexViewHandler
-
public class RexViewHandler extends Object
The RexViewHandler is initialised with the server the call should be sent to. The handler exposes methods for functionality for the repository explorer view
-
-
Constructor Summary
Constructors Constructor Description RexViewHandler()Default constructor for RexViewHandlerRexViewHandler(List<ResourceEndpointConfig> resourceEndpoints)Constructor for RexViewHandler with configured resourceEndpoints
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Map<String,RexEntityDigest>findEntities(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String searchText, String entityTypeName, List<String> classificationNames, String methodName)Retrieve entities (by text search) from the repository serverMap<String,RexRelationshipAndEntitiesDigest>findRelationships(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String searchText, String relationshipTypeName, String methodName)Retrieve relationships (by text search) from the repository serverRexExpandedEntityDetailgetEntity(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String entityGUID, String methodName)Retrieve entity (by GUID) from the repository serverRexExpandedRelationshipgetRelationship(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String relationshipGUID, String methodName)Retrieve relationship (by GUID) from the repository serverMap<String,List<ResourceEndpoint>>getResourceEndpoints(String userId, String methodName)getResourceEndpoints - returns a list of the configured resource endpoints.TypeExplorergetTypeExplorer(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String methodName)Retrieve type information from the repository serverRexPreTraversalpreTraversal(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String entityGUID, int depth, String methodName)Retrieve the neighborhood surrounding an entity for pre-traversal.RexTraversaltraversal(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String entityGUID, int depth, List<String> entityTypeGUIDs, List<String> relationshipTypeGUIDs, List<String> classificationNames, String methodName)Retrieve the neighborhood surrounding an entity.
-
-
-
Constructor Detail
-
RexViewHandler
public RexViewHandler()
Default constructor for RexViewHandler
-
RexViewHandler
public RexViewHandler(List<ResourceEndpointConfig> resourceEndpoints)
Constructor for RexViewHandler with configured resourceEndpoints- Parameters:
resourceEndpoints- - list of resource endpoint configuration objects for this view service
-
-
Method Detail
-
getResourceEndpoints
public Map<String,List<ResourceEndpoint>> getResourceEndpoints(String userId, String methodName)
getResourceEndpoints - returns a list of the configured resource endpoints. Does not include discovered resource endpoints.- Parameters:
userId- userId under which the request is performedmethodName- The name of the method being invoked- Returns:
- The resource endpoints that have been configured for the view service
-
getTypeExplorer
public TypeExplorer getTypeExplorer(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String methodName) throws RexViewServiceException
Retrieve type information from the repository server- Parameters:
userId- userId under which the request is performedrepositoryServerName- The name of the repository server to interrogateplatformName- The name of the platform running the repository server to interrogateenterpriseOption- Whether the query is at cohort level or server specificmethodName- The name of the method being invoked- Returns:
- response containing the TypeExplorer object. Exceptions
- Throws:
RexViewServiceException- an error was detected and details are reported in the exception
-
getEntity
public RexExpandedEntityDetail getEntity(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String entityGUID, String methodName) throws RexViewServiceException
Retrieve entity (by GUID) from the repository server- Parameters:
userId- userId under which the request is performedrepositoryServerName- The name of the repository server to interrogateplatformName- The name of the platform running the repository server to interrogateenterpriseOption- Whether the query is at cohort level or server specificentityGUID- the GUID of the entity to retrievemethodName- The name of the method being invoked- Returns:
- response containing the RexExpandedEntityDetail object. Exceptions
- Throws:
RexViewServiceException- an error was detected and details are reported in the exception
-
getRelationship
public RexExpandedRelationship getRelationship(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String relationshipGUID, String methodName) throws RexViewServiceException
Retrieve relationship (by GUID) from the repository server- Parameters:
userId- userId under which the request is performedrepositoryServerName- The name of the repository server to interrogateplatformName- The name of the platform running the repository server to interrogateenterpriseOption- Whether the query is at cohort level or server specificrelationshipGUID- the GUID of the relationship to retrievemethodName- The name of the method being invoked- Returns:
- response containing the RexExpandedEntityDetail object. Exceptions
- Throws:
RexViewServiceException- an error was detected and details are reported in the exception
-
findEntities
public Map<String,RexEntityDigest> findEntities(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String searchText, String entityTypeName, List<String> classificationNames, String methodName) throws RexViewServiceException
Retrieve entities (by text search) from the repository server- Parameters:
userId- userId under which the request is performedrepositoryServerName- The name of the repository server to interrogateplatformName- The name of the platform running the repository server to interrogateenterpriseOption- Whether the query is at cohort level or server specificsearchText- the search expression that entities must matchentityTypeName- the name of a type used to filter the entity searchclassificationNames- classification names to limit find bymethodName- The name of the method being invoked- Returns:
- a map of entity digests for the entities that matched the search Exceptions
- Throws:
RexViewServiceException- an error was detected and details are reported in the exception
-
findRelationships
public Map<String,RexRelationshipAndEntitiesDigest> findRelationships(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String searchText, String relationshipTypeName, String methodName) throws RexViewServiceException
Retrieve relationships (by text search) from the repository server- Parameters:
userId- userId under which the request is performedrepositoryServerName- The name of the repository server to interrogateplatformName- The name of the platform running the repository server to interrogateenterpriseOption- Whether the query is at cohort level or server specificsearchText- the search expression that relationships must matchrelationshipTypeName- the name of a type used to filter the relationship searchmethodName- The name of the method being invoked- Returns:
- a map of relationship digests for the relationships that matched the search Exceptions
- Throws:
RexViewServiceException- an error was detected and details are reported in the exception
-
preTraversal
public RexPreTraversal preTraversal(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String entityGUID, int depth, String methodName) throws RexViewServiceException
Retrieve the neighborhood surrounding an entity for pre-traversal.- Parameters:
userId- userId under which the request is performedrepositoryServerName- The name of the repository server to interrogateplatformName- The name of the platform running the repository server to interrogateenterpriseOption- Whether the query is at cohort level or server specificentityGUID- the identity of the entity from which to traversedepth- the depth to which the method should traversemethodName- The name of the method being invoked- Returns:
- a RexTraversal object containing the neighborhood information Exceptions
- Throws:
RexViewServiceException- an error was detected and details are reported in the exception
-
traversal
public RexTraversal traversal(String userId, String repositoryServerName, String platformName, boolean enterpriseOption, String entityGUID, int depth, List<String> entityTypeGUIDs, List<String> relationshipTypeGUIDs, List<String> classificationNames, String methodName) throws RexViewServiceException
Retrieve the neighborhood surrounding an entity.- Parameters:
userId- userId under which the request is performedrepositoryServerName- The name of the repository server to interrogateplatformName- The name of the platform running the repository server to interrogateenterpriseOption- Whether the query is at cohort level or server specificentityGUID- the identity of the entity from which to traversedepth- the depth to which the method should traverseentityTypeGUIDs- the GUIDs of entity types to filter the neighborhoodrelationshipTypeGUIDs- the GUIDs of relationship types to filter the neighborhoodclassificationNames- the names of classification types to filter the neighborhoodmethodName- The name of the method being invoked- Returns:
- a RexTraversal object containing the neighborhood information Exceptions
- Throws:
RexViewServiceException- an error was detected and details are reported in the exception
-
-