package com.capgemini.reports.exceptions;

import lombok.Getter;

/**
 * List of all possible problems the user needs to know about. <br>
 * WARNING -> Unsupported characters in web browser ie8 : (&apos;) and (&amp;) use numeric code.
 */
@Getter
public enum UserInputErrorEnum {

  /**
   * Error occurring if the user is requesting a report that has already been asked for, which is still in the queues.
   */
  DUPLICATE_REPORT_LAUNCHED_RECENTLY("Previous similar recent launch detected. Prompting user to confirm.", "Une demande identique lanc&eacute;e par {} est d&eacute;j&agrave; en attente de g&eacute;n&eacute;ration. Vous allez être associ&eacute; au r&eacute;sultat de ce lancement "),
  /**
   * Error occurring if the user is requesting a report that HE himself has already been asked for, which is still in the queues.
   */
  DUPLICATE_REPORT_LAUNCHED_RECENTLY_BY_SELF("Previous similar recent launch detected from the same user. Denying launch.", "Lancement rejet&eacute;. Vous avez d&eacute;j&agrave; lanc&eacute; une demande identique, qui est en attente de g&eacute;n&eacute;ration."),
  /**
   * Error occurring if the user is requestinga scheduling with a name that already exists.
   */
  DUPLICATE_SCHEDULING("Previous scheduling with same name detected. Denying scheduling.", "Lancement rejet&eacute;. Une planification du m&ecirc;me nom existe d&eacute;j&agrave;."),

  /**
   * Error occurring if the user has input a non-numeric Unit.
   */
  UNIT_NOT_NUMERIC("Server requested to perform report with non-numeric UNIT argument", "Le Unit fourni n&rsquo;est pas un nombre."),
  /**
   * Error occurring if the User has input a product that can not be found in the TC database.
   */
  INCORRECT_PRODUCT("Server called with bad arguments: productID is null", "Aucun produit n&rsquo;a &eacute;t&eacute; fourni."),
  /**
   * Error occurring if the User has input a an invalid Generic under a (possibly valid) Product-Unit.
   */
  PRODUCT_UNIT_GENERIC_INVALID("Could not find a correct Product/Unit/Generic combination", "Impossible de trouver le g&eacute;n&eacute;rique fourni sous ce couple produit-unit."),
  /**
   * Error occurring if the User has input a an invalid Generic Assemb under a (possibly valid) Product-Unit.
   */
  PRODUCT_UNIT_GENERIC_ASSEMB_INVALID("Could not find a correct Product/Unit/GenericAssemb combination", "Impossible de trouver le g&eacute;n&eacute;rique assemb fourni sous ce couple produit-unit."),
  /**
   * Error occurring if the User has input a an invalid Generic for the Product-Unit.
   */
  PRODUCT_UNIT_GENERIC_DOES_NOT_EXIST("The requested generic could not be found in the database.", "Le triplet produit-unit-g&eacute;n&eacute;rique n&rsquo;existe pas."),
  /**
   * Error occurring When an internal error has occurred.
   */
  INTERNAL_ERROR("Internal error", "Une erreur interne s&rsquo;est produite."),
  /**
   * Error occurring if the User has input a an invalid Generic.
   */
  GENERIC_DOES_NOT_EXIST("Generic does not exist ", "Le G&eacute;n&eacute;rique est inconnu. Aucune donn&eacute;e ne peut &ecirc;tre affich&eacute;e"),
  /**
   * Error occurring if the User has input a an invalid Generic Assemb.
   */
  GENERIC_ASSEMB_DOES_NOT_EXIST("Generic Assemb does not exist ", "G&eacute;n&eacute;rique Montage inconnu."),
  /**
   * Error occurring if the User has input a an invalid Unit for the Product.
   */
  PRODUCT_AND_UNIT_DOES_NOT_EXIST("The unit is not associated to product.", "Le Unit n'est pas associ&eacute; au Produit."),
  /**
   * Error occurring if the User has input a an invalid Generic Assemb or Generic under a (possibly valid) Product-Unit.
   */
  GENERIC_INPUT("Generic does not exist ", "Saisir un G&eacuten&eacuterique (G&eacuten&eacuterique/G&eacuten&eacuterique Montage) ou cocher ‘Vue Model list’, le ou est exclusif. »"),
  /**
   * Error occurring if the User has input a an invalid Generic Assemb.
   */
  NO_DATA_COULD_BE_EXTRACTED_FOR_GENERIC_PRODUCT_AND_UNIT("No data could be extracted, the triplet product/unit/generic is not consistent", "Aucune donn&eacute;e n&rsquo;a pu &ecirc;tre extraite, relancer le rapport apr&egrave;s avoir v&eacute;rifi&eacute; les crit&egrave;res saisis. Pour rappel, le triplet &lsquo;g&eacute;n&eacute;rique / produit / unit&rsquo; doit &ecirc;tre coh&eacute;rent."),
  /**
   * Error occurring if the User has input a an invalid Generic Assemb or Generic under a (possibly valid) Product-Unit.
   */
  NO_DATA_COULD_BE_EXTRACTED_FOR_GENERIC_ASSEMB_PRODUCT_AND_UNIT("No data could be extracted, the triplet product/unit/genericAssemb is not consistent", "Aucune donn&eacute;e n&rsquo;a pu &ecirc;tre extraite, relancer le rapport apr&egrave;s avoir v&eacute;rifi&eacute; les crit&egrave;res saisis. Pour rappel, le triplet &lsquo;g&eacute;n&eacute;rique montage / produit / unit&rsquo; doit &ecirc;tre coh&eacute;rent."),
  /**
   * Error occurring if the User has input a an invalid type object.
   */
  THE_SELECTED_OBJECT_IS_NOT_PERMITTED_ON_THIS_REPORT("The selected object is not permitted on this report.", "L&rsquo;objet s&eacute;lectionn&eacute; n&rsquo;est pas autoris&eacute; sur ce rapport."),

  // Created for R07
  /**
   * Error occurring if the User has input an invalid Product-Unit.
   */
  THE_UNIT_1_IS_NOT_ASSOCIATED_TO_THE_PRODUCT_1("The unit 1 is not associated to the product 1.", "Le unit 1 n&rsquo;est pas associ&eacute; au produit 1."),
  /**
   * Error occurring if the User has input an invalid Product-Unit.
   */
  THE_UNIT_2_IS_NOT_ASSOCIATED_TO_THE_PRODUCT_2("The unit 2 is not associated to the product 2.", "Le unit 2 n&rsquo;est pas associ&eacute; au produit 2."),

  // Created for R11
  /**
   * Error occurring if the User has input a an invalid Product.
   */
  PRODUCT_DOES_NOT_EXIST_NO_DATA_TO_PRINT("Product does not not exist. Unable to print any data.", "Le Produit est inconnu. Aucune donn&eacute;e ne peut &ecirc;tre affich&eacute;e."),
  /**
   * Error occurring if the User has input a an invalid type of Generic.
   */
  THE_GENERIC_MUST_BELONG_TO_THE_TECHNICAL_VIEW("The generic must be a geric type. Unable to print any data.", "Le g&eacute;n&eacute;rique doit &ecirc;tre de type g&eacute;n&eacute;rique. Aucune donn&eacute;e ne peut &ecirc;tre affich&eacute;e."),
  /**
   * Error occurring if the User has input a an invalid Generic under a (possibly valid) Product-Unit.
   */
  NO_GENERIC_REVISION_IS_ASSOCIATED_TO_THE_PRODUCT_UNIT_NO_DATA_TO_PRINT("No Generic Revision is associated to the product-unit. Unbale to print any data.", "Aucune r&eacute;vision du G&eacute;n&eacute;rique ne s&rsquo;applique pour le Produit Unit. Aucune donn&eacute;e ne peut &ecirc;tre affich&eacute;e."),

  // Created for R16
  /**
   * Error occurring if the User has input a an invalid Product or couple of Product-Unit.
   */
  WRONG_EFFECTIVITY_THE_PRODUCT_DOES_NOT_EXIST_OR_THE_UNIT_DOES_NOT_EXIST_FOR_THE_PRODUCT("Wrong effectivity, the product does not exist or the unit does not exit for the product.", "Effectivit&eacute; erron&eacute;e, produit inconnu ou unit inconnu pour ce produit."),
  /**
   * Error occurring if the User has input a an invalid Generic or Product-Unit-Generic.
   */
  GENERIC_DOES_NOT_EXIST_OR_ENTRY_EFFECTIVITY_IS_NOT_COMPATIBLE_WITH_THE_GENERIC("Generic does not exist - OR - entry effectivity is not compatible with the Generic.", "G&eacute;n&eacute;rique inconnu – OU - l&rsquo;effectivit&eacute; saisie n&rsquo;est pas compatible avec le g&eacute;n&eacute;rique."),

  // Created for R19
  /**
   * Error occurring if the User has selected an invalid object.
   */
  TYPE_DOCUMENT_SELECTED_NOT_AUTHORIZED("<div style=\"float:left\">" + "<p style=\"text-align: left;margin:0;padding:0px;\">The type of item selected is not compatible with the report R19." + "<p style=\"text-align: left;margin:0;padding:0px;\">The only types compatible are:</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">- Document &#34;DocDrawing&#34; (revision)</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">- Document &#34;DocNorm&#34; (master and review)</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">- Document &#34;DocNormStandard&#34; (master and review)</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">- Document &#34;DocTechnic&#34; (revision)</p>" + "</div>", "<div style=\"float:left;\">" + "<p style=\"text-align: left;margin:0;padding:0px;\">Le type d&#39;article s&eacute;lectionn&eacute; n&#39;est pas compatible avec le rapport R19.</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">Les seuls types compatibles sont les suivants:</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">- Document &#34;DocDrawing&#34; (r&eacute;vision)</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">- Document &#34;DocNorm&#34; (master et r&eacute;vision)</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">- Document &#34;DocNormStandard&#34; (master et r&eacute;vision)</p>" + "<p style=\"text-align: left;margin:0;padding:0px;\">- Document &#34;DocTechnic&#34; (r&eacute;vision)</p>" + "</div>"),

  // Created for R20
  /**
   * Error occurring if the User has input an invalid Product-Unit.
   */
  THE_UNIT_AFTER_IS_NOT_ASSOCIATED_TO_THE_PRODUCT_AFTER("The Unit &lsquo;After&rsquo; is not associated to the Product &lsquo;After&rsquo;", "Le Unit &lsquo;Apr&egrave;s&rsquo; n&rsquo;est pas associ&eacute; au Produit &lsquo;Apr&egrave;s&rsquo;."),
  /**
   * Error occurring if the User has input an invalid Product-Unit.
   */
  THE_UNIT_BEFORE_IS_NOT_ASSOCIATED_TO_THE_PRODUCT_BEFORE("The Unit &lsquo;Before&rsquo; is not associated to the Product &lsquo;Before&rsquo;", "Le Unit &lsquo;Avant&rsquo; n&rsquo;est pas associ&eacute; au Produit &lsquo;Avant&rsquo;."),
  /**
   * Error occurring if the User has input an Product-Unit after where th unit's latest maturity status is of the wrong type.
   */
  THE_LATEST_UNIT_AFTER_DOES_NOT_HAVE_THE_APPROPRIATE_MATURITY("The latest Unit &lsquo;After&rsquo; does not have the proper maturity status", "La r&eacute;vision du Unit &lsquo;Apr&egrave;s&rsquo; la plus r&eacute;cemment statu&eacute;e n&lsquo;a pas la maturit&eacute; appropri&eacute;e pour le gel du unit."),
  /**
   * Error occurring if the User has input an Product-Unit before where th unit's latest maturity status is of the wrong type.
   */
  THE_LATEST_UNIT_BEFORE_DOES_NOT_HAVE_THE_APPROPRIATE_MATURITY("The latest Unit &lsquo;Before&rsquo; does not have the proper maturity status", "La r&eacute;vision du Unit &lsquo;Avant&rsquo; la plus r&eacute;cemment statu&eacute;e n&lsquo;a pas la maturit&eacute; appropri&eacute;e pour le gel du unit."),
  /**
   * Dynamic error occurring if a ChangeRequest doesn't exist.
   */
  UNKNOWN_CHANGE_REQUEST("Unknown ChangeRequest {}", "ChangeRequest {} inconnu"),
  /**
   * Dynamic error occurring if a ChangeRequest is not compatible with the Unit Before.
   */
  REMOVED_CHANGE_REQUEST_IS_NOT_COMPATIBLE_WITH_BEFORE_EFFECTIVITY("Removed ChangeRequest {} is not compatible with &lsquo;Before&rsquo; effectivity", "ChangeRequest {} retir&eacute;e, elle n&rsquo;est pas compatible avec l&rsquo;effectivit&eacute; &lsquo;Avant&rsquo; saisie."),
  /**
   * Dynamic error occurring if a ChangeRequest is deprecated.
   */
  REMOVED_CHANGE_REQUEST_IS_DEPRECATED("The LMR Change Request {} is deprecated, which is not authorized for an LMR.", "La modification suivante n&rsquo;est pas un changeRequest non d&eacute;pr&eacute;ci&eacute; : {}."),
  /**
   * Dynamic error occurring if a ChangeRequest has several revisions under a Unit.
   */
  SEVERAL_REVISIONS_OF_RETRIEVED_CHANGE_REQUEST_ARE_COMPATIBLE_WITH_BEFORE_EFFECTIVITY("Several revisions of retrieved ChangeRequest {} are compatible with the &lsquo;Before&rsquo; effectivity.", "Plusieurs r&eacute;visions du ChangeRequest {} retir&eacute; sont compatibles avec l&rsquo;effectivit&eacute; &lsquo;Avant&rsquo; saisie."),
  /**
   * Error occurring if the User has input an invalid ID or UID.
   */
  OBJECT_DOES_NOT_EXIST("The Object does not seem to exist in Tc", "L&rsquo;objet demand&eacute; n&rsquo;existe pas"),

  NO_DATA_COULD_BE_EXTRACTED_NO_FROZEN_OR_OPEN_UNIT_TO_THE_PRODUCT("No data could be extracted, no open or frozen Unit found for this Product.", "Aucune donn&eacute;e n&rsquo;a pu etre extraite, aucun Unit ouvert ou gel&eacute; trouv&eacute; pour ce Produit."),
  NO_DATA_COULD_BE_EXTRACTED_NO_OPEN_UNIT_TO_THE_PRODUCT("No data could be extracted, no open Unit found for this Product.", "Aucune donn&eacute;e n&rsquo;a pu etre extraite, aucun Unit ouvert trouv&eacute; pour ce Produit."),

  NO_DATA_EXTRACTED_FOR_CRITERIA("No data could be extracted for the criteria.", "Aucune donn&eacute;e n&rsquo;a pu etre extraite pour les crit&egrave;res saisis."),

  NO_CONFIGURATION_CHANGES("No configuration changes. Report generation canceled.", "Aucune configuration en évolution. La génération du rapport a été annulée"),
  INVALID_FILE("Invalid file. Report generation canceled.", "Fichier non conforme. La g&eacute;n&eacute;ration du rapport a &eacute;t&eacute; annul&eacute;e"),

  // Created for R24
  /**
   * Error occurring if no generics exist for the Product-Unit.
   */
  NO_GENERIC_FOUND_FOR_THIS_PU("No data could be extracted, no generic found for this Product/Unit or Product.", "Aucune donn&eacute;e n&rsquo;a pu etre extraite, aucun g&eacute;n&eacute;rique trouv&eacute; pour ce Product/Unit ou Produit."),

  /**
   * Error occurring if no data exists to be shown in the User Interface. This is normal behavior.
   */
  NOTHING_TO_BE_SHOWN("Nothing to be shown", "Il n'y a rien à afficher"),

  UNABLE_TO_USE_REVISION_RULE("Unable to use the revision rule required for the report. Thank you for renewing your request.", "Impossible d&rsquo;utiliser la r&egrave;gle de r&eacute;vision n&eacute;cessaire &agrave; l&rsquo;&eacute;laboration du rapport. Merci de renouveler votre demande.");

  protected final String msgEn;
  protected final String msgFr;

  UserInputErrorEnum(final String aMsgEn, final String aMsgFr) {
    msgEn = aMsgEn;
    msgFr = aMsgFr;
  }
}
