Class 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 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 performed
        methodName - 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 performed
        repositoryServerName - The name of the repository server to interrogate
        platformName - The name of the platform running the repository server to interrogate
        enterpriseOption - Whether the query is at cohort level or server specific
        methodName - 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,
                                                 Date asOfTime,
                                                 String methodName)
                                          throws RexViewServiceException
        Retrieve entity (by GUID) from the repository server
        Parameters:
        userId - userId under which the request is performed
        repositoryServerName - The name of the repository server to interrogate
        platformName - The name of the platform running the repository server to interrogate
        enterpriseOption - Whether the query is at cohort level or server specific
        entityGUID - the GUID of the entity to retrieve
        asOfTime - return the entity at this date, if null then now.
        methodName - 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,
                                                       Date asOfTime,
                                                       String methodName)
                                                throws RexViewServiceException
        Retrieve relationship (by GUID) from the repository server
        Parameters:
        userId - userId under which the request is performed
        repositoryServerName - The name of the repository server to interrogate
        platformName - The name of the platform running the repository server to interrogate
        enterpriseOption - Whether the query is at cohort level or server specific
        relationshipGUID - the GUID of the relationship to retrieve
        asOfTime - return the relationship at this date, if null then now.
        methodName - 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,
                                                              Date asOfTime,
                                                              String methodName)
                                                       throws RexViewServiceException
        Retrieve entities (by text search) from the repository server
        Parameters:
        userId - userId under which the request is performed
        repositoryServerName - The name of the repository server to interrogate
        platformName - The name of the platform running the repository server to interrogate
        enterpriseOption - Whether the query is at cohort level or server specific
        searchText - the search expression that entities must match
        entityTypeName - the name of a type used to filter the entity search
        classificationNames - classification names to limit find by
        asOfTime - return the entities at this date, if null then now.
        methodName - 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,
                                                                                    Date asOfTime,
                                                                                    String methodName)
                                                                             throws RexViewServiceException
        Retrieve relationships (by text search) from the repository server
        Parameters:
        userId - userId under which the request is performed
        repositoryServerName - The name of the repository server to interrogate
        platformName - The name of the platform running the repository server to interrogate
        enterpriseOption - Whether the query is at cohort level or server specific
        searchText - the search expression that relationships must match
        relationshipTypeName - the name of a type used to filter the relationship search
        asOfTime - return the relationships at this date, if null then now.
        methodName - 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,
                                            long asOfTime,
                                            String methodName)
                                     throws RexViewServiceException
        Retrieve the neighborhood surrounding an entity for pre-traversal.
        Parameters:
        userId - userId under which the request is performed
        repositoryServerName - The name of the repository server to interrogate
        platformName - The name of the platform running the repository server to interrogate
        enterpriseOption - Whether the query is at cohort level or server specific
        entityGUID - the identity of the entity from which to traverse
        depth - the depth to which the method should traverse
        asOfTime - return the entities and relationships at this date, if null then now.
        methodName - 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,
                                      long asOfTime,
                                      String methodName)
                               throws RexViewServiceException
        Retrieve the neighborhood surrounding an entity.
        Parameters:
        userId - userId under which the request is performed
        repositoryServerName - The name of the repository server to interrogate
        platformName - The name of the platform running the repository server to interrogate
        enterpriseOption - Whether the query is at cohort level or server specific
        entityGUID - the identity of the entity from which to traverse
        depth - the depth to which the method should traverse
        entityTypeGUIDs - the GUIDs of entity types to filter the neighborhood
        relationshipTypeGUIDs - the GUIDs of relationship types to filter the neighborhood
        classificationNames - the names of classification types to filter the neighborhood
        asOfTime - return the entities and relationships at this date, if null then now.
        methodName - 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