001/*
002 * Copyright 2020 Global Biodiversity Information Facility (GBIF)
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 *     http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.gbif.api.model.registry.metasync;
017
018/**
019 * Enumeration of all the different categories of results we want to report on during metadata synchronisation.
020 */
021public enum MetasyncResult {
022
023  /**
024   * The synchronization was successful.
025   */
026  OK,
027
028  /**
029   * Is any kind of error establishing a connection or during a connection that's usually on the network level
030   * (connection refused, timeouts etc.).
031   */
032  IO_EXCEPTION,
033
034  /**
035   * Any kind of HTTP error (e.g. a non 200 response code).
036   */
037  HTTP_ERROR,
038
039  /**
040   * This means that we got a reply from the endpoint but it does not conform to what we expected (e.g. HTML instead of
041   * XML).
042   */
043  PROTOCOL_ERROR,
044
045  /**
046   * Anything that doesn't fit in the former categories (e.g. invalid URI stored in our Registry).
047   */
048  OTHER_ERROR
049}