@Transactional
  void persistView(ViewEntity viewDefinition, Set<ViewInstanceEntity> instanceDefinitions) throws Exception {
    // ensure that the view entity matches the db
    syncView(viewDefinition, instanceDefinitions);

    onDeploy(viewDefinition);

    // update the registry with the view instances
    for (ViewInstanceEntity instanceEntity : instanceDefinitions) {
      addInstanceDefinition(viewDefinition, instanceEntity);
      handlerList.addViewInstance(instanceEntity);
    }
  }
Check the configured view max and min Ambari versions for the given view entity
against the given Ambari server version.

@param view          the view
@param serverVersion the server version
@return true if the given server version >= min version && <= max version for the given view
ambari-server/src/main/java/org/apache/ambari/server/view/ViewRegistry.java