Class ViewServiceAdmin


  • public abstract class ViewServiceAdmin
    extends java.lang.Object
    ViewServiceAdmin is the interface that an view service implements to receive its configuration. The java class that implements this interface is created with a default constructor and then the initialize method is called. It is configured in the ViewServiceDescription enumeration.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getFullServiceName()
      Return the cached service name.
      abstract void initialize​(java.lang.String serverName, ViewServiceConfig viewServiceConfigurationProperties, AuditLog auditLog, java.lang.String serverUserName, int maxPageSize)
      Initialize the view service.
      protected void logBadConfigProperties​(java.lang.String viewServiceFullName, java.lang.String propertyName, java.lang.String propertyValue, AuditLog auditLog, java.lang.String methodName, java.lang.Throwable error)
      Log that a property value is incorrect.
      protected void logBadConfiguration​(java.lang.String viewServiceFullName, java.lang.String propertyName, java.lang.String propertyValue, AuditLog auditLog, java.lang.String methodName)
      Log that the configuration is not valid
      void setFullServiceName​(java.lang.String fullServiceName)
      Set up the cached service name.
      abstract void shutdown()
      Shutdown the view service.
      protected void throwUnexpectedInitializationException​(java.lang.String actionDescription, java.lang.String fullViewServiceName, java.lang.Throwable error)
      Log that an unexpected exception was received during start up.
      • Methods inherited from class java.lang.Object

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

      • ViewServiceAdmin

        public ViewServiceAdmin()
    • Method Detail

      • initialize

        public abstract void initialize​(java.lang.String serverName,
                                        ViewServiceConfig viewServiceConfigurationProperties,
                                        AuditLog auditLog,
                                        java.lang.String serverUserName,
                                        int maxPageSize)
                                 throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Initialize the view service.
        Parameters:
        serverName - name of the local server
        viewServiceConfigurationProperties - specific configuration properties for this view service.
        auditLog - audit log component for logging messages.
        serverUserName - user id to use on OMRS calls where there is no end user.
        maxPageSize - maximum page size. 0 means unlimited
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - invalid parameters in the configuration properties.
      • shutdown

        public abstract void shutdown()
        Shutdown the view service.
      • getFullServiceName

        public java.lang.String getFullServiceName()
        Return the cached service name.
        Returns:
        string name
      • setFullServiceName

        public void setFullServiceName​(java.lang.String fullServiceName)
        Set up the cached service name.
        Parameters:
        fullServiceName - string name
      • logBadConfiguration

        protected void logBadConfiguration​(java.lang.String viewServiceFullName,
                                           java.lang.String propertyName,
                                           java.lang.String propertyValue,
                                           AuditLog auditLog,
                                           java.lang.String methodName)
                                    throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Log that the configuration is not valid
        Parameters:
        viewServiceFullName - name of the calling view service
        propertyName - name of the property in error
        propertyValue - value of the property that is in error
        auditLog - log to write message to
        methodName - calling method
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - exception documenting the error
      • logBadConfigProperties

        protected void logBadConfigProperties​(java.lang.String viewServiceFullName,
                                              java.lang.String propertyName,
                                              java.lang.String propertyValue,
                                              AuditLog auditLog,
                                              java.lang.String methodName,
                                              java.lang.Throwable error)
                                       throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Log that a property value is incorrect.
        Parameters:
        viewServiceFullName - name of the calling view service
        propertyName - name of the property in error
        propertyValue - value of the property that is in error
        auditLog - log to write message to
        methodName - calling method
        error - resulting exception
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - exception documenting the error
      • throwUnexpectedInitializationException

        protected void throwUnexpectedInitializationException​(java.lang.String actionDescription,
                                                              java.lang.String fullViewServiceName,
                                                              java.lang.Throwable error)
                                                       throws org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException
        Log that an unexpected exception was received during start up.
        Parameters:
        actionDescription - calling method
        fullViewServiceName - name of the view service
        error - exception that was caught
        Throws:
        org.odpi.openmetadata.adminservices.ffdc.exception.OMAGConfigurationErrorException - wrapped exception