Class HostManagerClient

    • Constructor Summary

      Constructors 
      Constructor Description
      HostManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot)
      Create a new client with no authentication embedded in the HTTP request.
      HostManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot, java.lang.String userId, java.lang.String password)
      Create a new client that passes userId and password in each HTTP request.
      HostManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot, java.lang.String userId, java.lang.String password, AuditLog auditLog)
      Create a new client that passes userId and password in each HTTP request.
      HostManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot, ITInfrastructureRESTClient restClient, int maxPageSize)
      Create a new client that is going to be used in an OMAG Server.
      HostManagerClient​(java.lang.String serverName, java.lang.String serverPlatformURLRoot, AuditLog auditLog)
      Create a new client with no authentication embedded in the HTTP request.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void clearClusterMember​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.lang.String hostGUID, java.lang.String clusterMemberGUID, java.util.Date effectiveTime)
      Remove a relationship between a host and an cluster member host.
      java.lang.String createHost​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, boolean infrastructureManagerIsHome, HostProperties hostProperties)
      Create a new metadata element to represent a host.
      java.lang.String createHostFromTemplate​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, boolean infrastructureManagerIsHome, java.lang.String templateGUID, TemplateProperties templateProperties)
      Create a new metadata element to represent a host using an existing metadata element as a template.
      java.util.List<HostElement> findHosts​(java.lang.String userId, java.lang.String searchString, java.util.Date effectiveTime, int startFrom, int pageSize)
      Retrieve the list of host metadata elements that contain the search string.
      java.util.List<HostElement> getClusterMembersForHost​(java.lang.String userId, java.lang.String hostGUID, java.util.Date effectiveTime, int startFrom, int pageSize)
      Return the list of cluster members associated with a host.
      HostElement getHostByGUID​(java.lang.String userId, java.lang.String guid)
      Retrieve the host metadata element with the supplied unique identifier.
      java.util.List<HostElement> getHostsByName​(java.lang.String userId, java.lang.String name, java.util.Date effectiveTime, int startFrom, int pageSize)
      Retrieve the list of host metadata elements with a matching qualified or display name.
      java.util.List<HostElement> getHostsForInfrastructureManager​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.util.Date effectiveTime, int startFrom, int pageSize)
      Retrieve the list of hosts created by this caller.
      void publishHost​(java.lang.String userId, java.lang.String hostGUID)
      Update the zones for the host asset so that it becomes visible to consumers.
      void removeHost​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.lang.String hostGUID)
      Remove the metadata element representing a host.
      void setupClusterMember​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, boolean infrastructureManagerIsHome, java.lang.String hostGUID, java.lang.String clusterMemberGUID, java.util.Date effectiveFrom, java.util.Date effectiveTo)
      Create a relationship between a host and an cluster member host.
      void updateHost​(java.lang.String userId, java.lang.String infrastructureManagerGUID, java.lang.String infrastructureManagerName, java.lang.String hostGUID, boolean isMergeUpdate, HostProperties hostProperties)
      Update the metadata element representing a host.
      void withdrawHost​(java.lang.String userId, java.lang.String hostGUID)
      Update the zones for the host asset so that it is no longer visible to consumers.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • HostManagerClient

        public HostManagerClient​(java.lang.String serverName,
                                 java.lang.String serverPlatformURLRoot,
                                 AuditLog auditLog)
                          throws InvalidParameterException
        Create a new client with no authentication embedded in the HTTP request.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        auditLog - logging destination
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • HostManagerClient

        public HostManagerClient​(java.lang.String serverName,
                                 java.lang.String serverPlatformURLRoot)
                          throws InvalidParameterException
        Create a new client with no authentication embedded in the HTTP request.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • HostManagerClient

        public HostManagerClient​(java.lang.String serverName,
                                 java.lang.String serverPlatformURLRoot,
                                 java.lang.String userId,
                                 java.lang.String password)
                          throws InvalidParameterException
        Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        userId - caller's userId embedded in all HTTP requests
        password - caller's userId embedded in all HTTP requests
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • HostManagerClient

        public HostManagerClient​(java.lang.String serverName,
                                 java.lang.String serverPlatformURLRoot,
                                 java.lang.String userId,
                                 java.lang.String password,
                                 AuditLog auditLog)
                          throws InvalidParameterException
        Create a new client that passes userId and password in each HTTP request. This is the userId/password of the calling server. The end user's userId is sent on each request.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        userId - caller's userId embedded in all HTTP requests
        password - caller's userId embedded in all HTTP requests
        auditLog - logging destination
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
      • HostManagerClient

        public HostManagerClient​(java.lang.String serverName,
                                 java.lang.String serverPlatformURLRoot,
                                 ITInfrastructureRESTClient restClient,
                                 int maxPageSize)
                          throws InvalidParameterException
        Create a new client that is going to be used in an OMAG Server.
        Parameters:
        serverName - name of the server to connect to
        serverPlatformURLRoot - the network address of the server running the OMAS REST servers
        restClient - client that issues the REST API calls
        maxPageSize - maximum number of results supported by this server
        Throws:
        InvalidParameterException - there is a problem creating the client-side components to issue any REST API calls.
    • Method Detail

      • createHost

        public java.lang.String createHost​(java.lang.String userId,
                                           java.lang.String infrastructureManagerGUID,
                                           java.lang.String infrastructureManagerName,
                                           boolean infrastructureManagerIsHome,
                                           HostProperties hostProperties)
                                    throws InvalidParameterException,
                                           UserNotAuthorizedException,
                                           PropertyServerException
        Create a new metadata element to represent a host.
        Specified by:
        createHost in interface HostManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the infrastructure manager
        infrastructureManagerName - unique name of software server capability representing the infrastructure manager
        infrastructureManagerIsHome - should the host be marked as owned by the infrastructure manager so others can not update?
        hostProperties - properties to store
        Returns:
        unique identifier of the new metadata element
        Throws:
        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)
      • createHostFromTemplate

        public java.lang.String createHostFromTemplate​(java.lang.String userId,
                                                       java.lang.String infrastructureManagerGUID,
                                                       java.lang.String infrastructureManagerName,
                                                       boolean infrastructureManagerIsHome,
                                                       java.lang.String templateGUID,
                                                       TemplateProperties templateProperties)
                                                throws InvalidParameterException,
                                                       UserNotAuthorizedException,
                                                       PropertyServerException
        Create a new metadata element to represent a host using an existing metadata element as a template.
        Specified by:
        createHostFromTemplate in interface HostManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the infrastructure manager
        infrastructureManagerName - unique name of software server capability representing the infrastructure manager
        infrastructureManagerIsHome - should the host be marked as owned by the infrastructure manager so others can not update?
        templateGUID - unique identifier of the metadata element to copy
        templateProperties - properties that override the template
        Returns:
        unique identifier of the new metadata element
        Throws:
        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)
      • updateHost

        public void updateHost​(java.lang.String userId,
                               java.lang.String infrastructureManagerGUID,
                               java.lang.String infrastructureManagerName,
                               java.lang.String hostGUID,
                               boolean isMergeUpdate,
                               HostProperties hostProperties)
                        throws InvalidParameterException,
                               UserNotAuthorizedException,
                               PropertyServerException
        Update the metadata element representing a host.
        Specified by:
        updateHost in interface HostManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the infrastructure manager
        infrastructureManagerName - unique name of software server capability representing the infrastructure manager
        hostGUID - unique identifier of the metadata element to update
        isMergeUpdate - are unspecified properties unchanged (true) or removed?
        hostProperties - new properties for this element
        Throws:
        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)
      • setupClusterMember

        public void setupClusterMember​(java.lang.String userId,
                                       java.lang.String infrastructureManagerGUID,
                                       java.lang.String infrastructureManagerName,
                                       boolean infrastructureManagerIsHome,
                                       java.lang.String hostGUID,
                                       java.lang.String clusterMemberGUID,
                                       java.util.Date effectiveFrom,
                                       java.util.Date effectiveTo)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Create a relationship between a host and an cluster member host.
        Specified by:
        setupClusterMember in interface HostManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the infrastructure manager
        infrastructureManagerName - unique name of software server capability representing the infrastructure manager
        infrastructureManagerIsHome - ensure that only the infrastructure manager can update this asset
        hostGUID - unique identifier of the host
        clusterMemberGUID - unique identifier of the cluster member host
        effectiveFrom - time when this hosting is effective - null means immediately
        effectiveTo - time when this hosting is no longer effective - null means forever
        Throws:
        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)
      • clearClusterMember

        public void clearClusterMember​(java.lang.String userId,
                                       java.lang.String infrastructureManagerGUID,
                                       java.lang.String infrastructureManagerName,
                                       java.lang.String hostGUID,
                                       java.lang.String clusterMemberGUID,
                                       java.util.Date effectiveTime)
                                throws InvalidParameterException,
                                       UserNotAuthorizedException,
                                       PropertyServerException
        Remove a relationship between a host and an cluster member host.
        Specified by:
        clearClusterMember in interface HostManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the infrastructure manager
        infrastructureManagerName - unique name of software server capability representing the infrastructure manager
        hostGUID - unique identifier of the host
        clusterMemberGUID - unique identifier of the cluster member host
        effectiveTime - time when the hosting is effective
        Throws:
        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)
      • removeHost

        public void removeHost​(java.lang.String userId,
                               java.lang.String infrastructureManagerGUID,
                               java.lang.String infrastructureManagerName,
                               java.lang.String hostGUID)
                        throws InvalidParameterException,
                               UserNotAuthorizedException,
                               PropertyServerException
        Remove the metadata element representing a host.
        Specified by:
        removeHost in interface HostManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the infrastructure manager
        infrastructureManagerName - unique name of software server capability representing the infrastructure manager
        hostGUID - unique identifier of the metadata element to remove
        Throws:
        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)
      • getHostsForInfrastructureManager

        public java.util.List<HostElement> getHostsForInfrastructureManager​(java.lang.String userId,
                                                                            java.lang.String infrastructureManagerGUID,
                                                                            java.lang.String infrastructureManagerName,
                                                                            java.util.Date effectiveTime,
                                                                            int startFrom,
                                                                            int pageSize)
                                                                     throws InvalidParameterException,
                                                                            UserNotAuthorizedException,
                                                                            PropertyServerException
        Retrieve the list of hosts created by this caller.
        Specified by:
        getHostsForInfrastructureManager in interface HostManagerInterface
        Parameters:
        userId - calling user
        infrastructureManagerGUID - unique identifier of software server capability representing the infrastructure manager
        infrastructureManagerName - unique name of software server capability representing the infrastructure manager
        effectiveTime - effective time for the query
        startFrom - paging start point
        pageSize - maximum results that can be returned
        Returns:
        list of matching metadata elements
        Throws:
        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)