
//=================================================================
// COPYRIGHT DASSAULT SYSTEMES 2005
//=================================================================
//
// Usage Notes:               This is a PLM ERRORS Catalog
//
//
// In this catalog can be declared ONLY PLM ERRORS.
// Please refer to the PES PLM Error Managment for the definition of a PLM error.
//
// Any error of this catalog must be described with :
//
// - a Definition   :    \\ DEFINTION_WITTEN_WITH_CAPITAL_LETTERS
// - the Mode of Treatment of this error : to be interpreted by ... / to be converted   (comment form)
// - an Error Key & associated description :   MyErrKey.Diagnostic = "........";
//                                             MyErrKey.Advice     = "........";
//                                             MyErrKey.Request    = "........";
// - Diagnostic,Advice,Request's nls parameters documentation :   
//                               Example:      In Diagnostic's /p :  content,  ...
//
//   Diagnostic : what exactly happens
//   Advice     : what to do to solve the error or understand it better
//   Request    : for "by action" error only, expresses what is requested on the PLM component to prevent this error. 
//                This field can be empty.
//   Diagnostic,Advice,Request's nls parameters : 
//
//   This fields are to write in understandable terms for the end user (no debug messages!)
//
//   These fields may be empty : if the error is not understandable in end user terms 
//   (no more possible explanation than "the action failed") these fields may be empty
//   This means that the PLM error is only dedicated to interpretration use. 
//
//   NLS parameters :
//   - have to be understandable by the end user
//   - NEVER indicate which PLM component is concerned by the error.
//     The PLM component concerned by the error is indicated with the CATComponentId associated to the error.
//
//=================================================================




// **************   FURTHER SERVER ERRORS TO PLM ERRORS : MAPPING   **************
//
// FROM ENOVPLMPSFactoryErrors.CATNls    :
//
// EPM_E_MODIFICATION_Reference_IDSetAttributes  --->  PLM_NotFirstVersionNotModifiable
// EPM_E_BASE_ObjFromID                          --->  PLM_NotRetrievedComponent
// EPM_E_ENTITY_Remove                           --->  PLM_DeletionFailed      ! To SUPPRESS FROM THE LIST as soon as possible
// EPM_E_ENTITY_MODIFY_NOT_EDITABLE              --->  PLM_NotEditableBecauseOfMaturity
// EPM_E_ENTITY_MODIFY_AGGR_NOT_EDITABLE         --->  PLM_BecauseOfOwnerMaturity_M  
// EPM_E_PLM_SECURITYDENIED                      --->  PLM_SecurityDenied
//
// FROM ENOVPLMIntegrationErrors.CATNls :
// EntityLocked         --->  PLM_LockedComponent
// SemanticBindFailed   --->  PLM_LinkedWithNotFoundComp
// CanNotBind			--->  PLM_NotRetrievedComponent
// EntityNotEditable    --->  PLM_NotEditableBecauseOfMaturity
// BookingFailed		--->  PLM_IdentifiersAlreadyUsed
//
// old ENOVPLMModel.CATNls : 
// PLM_E_OBJECT_IS_LOCKED				--->	PLM_LockedByAnotherUser
// PLM_E_OBJECT_IS_LOCKED_REFERENCE		--->	PLM_LockedByAnotherUser ??

// old ENOVPLMIntegrationErrors.CATNls :
// CanNotBind					        --->	PLM_NotRetrievedComponent in catalog PLMServerActionErrors
// LockedByCurrentUser					--->	PLM_LockedByCurrentUser
// LockedByAnotherUser					--->	PLM_LockedByAnotherUser
// LOCK_NotLockable						--->	PLM_NotLockable
// LOCK_NeedRefresh						--->	PLM_NoUnlockWithoutRefresh

// *********************************************************************************




//=================   DURING SAVE/OPEN/NEW VERSION PROCESS  ===========================================

// CONCURENT INGENIERING 1 - ENTITY NO MORE PRESENT IN DB
// open/save : To be interpreted by the client factories to indicates in an undertandable way the component on which appear the error.
// new version :To be interpreted by the client new version engine -  factorisation case.
PLM_NotRetrievedComponent.Request    = "";
PLM_NotRetrievedComponent.Diagnostic = "You have tried to perform an action on a component that is no more present in data base.";
PLM_NotRetrievedComponent.Advice     = "Check that your session is synchronized with the database.";

// NO ACCESS RIGHTS FOR THE OPERATION
// To be interpreted by the client engine -  factorisation case
PLM_SecurityDenied.Request     =  "";  
PLM_SecurityDenied.Diagnostic  =  "You cannot process this operation. Access is denied for your role.";  
PLM_SecurityDenied.Advice      =  "Log in with another role or contact your administrator to add access rights for this operation.";     



//=================   DURING SAVE PROCESS  ( creation, modification, or delete) ===========================================

// CONCURENT INGENIERING 2 - ENTITY NOT SAVED BECAUSE POINTING DELETED OBJECT
// To be interpreted by the client save engine - factorisation case
PLM_LinkedWithNotFoundComp.Request = "";
PLM_LinkedWithNotFoundComp.Diagnostic = "This component can not be saved because it points an object that is not retrieved in database.";
PLM_LinkedWithNotFoundComp.Advice = "Check that your session is synchronized with the database.";

// ENTITY NOT SAVED BECAUSE LOCKED BY ANOTHER USER
// To be interpreted by the client save engine - factorisation case
// In Diagnostic's /p1 :  the login of the user trying to perform the action
PLM_LockedComponent.Request    = "";
PLM_LockedComponent.Diagnostic = "You cannot modify or delete this component because it is locked by /p1.";
PLM_LockedComponent.Advice     = "Contact the lock owner.";

// NOT POSSIBLE DELETION -- Error To SUPPRESS FROM THE LIST as soon as possible
// Temporary usefull : the main interest of this error is to inform about the external id of the object the deletion is asked on.
// Later, we will be able to retrieve the external id in client session (with tombstone). This error will become needless.
// To be interpreted by the save engine - factorisation case
// In Diagnostic's /p1 :  the indication, in terme of PLM_ExternalId, of the session deleted object that cannot be deleted in database.
PLM_DeletionFailed.Request     = "";
PLM_DeletionFailed.Diagnostic  = "Cannot remove the /p1 component in database."; 
PLM_DeletionFailed.Advice      = "Check that the components exists in base, is valid and is removable. If yes, contact the support";

// ????????????? LE DELETE DE REF EST_IL DESORMAIS POSSIBLE AU SAVE ?!!!!!!! Indirectement ?
// REFERENCE DELETION & REMAINIG USAGE
// To be interpreted by the client engine -  factorisation case
PLM_ReferenceStillInUse.Request 	 = "";
PLM_ReferenceStillInUse.Diagnostic = "The deletion of this reference is not authorized because it is sill in use.";
PLM_ReferenceStillInUse.Advice     = "Delete all objects linked to this reference.";

// MODIFY OF NOT FIRST VERSION
// To be interpreted by the save engine - factorisation case
PLM_NotFirstVersionNotModifiable.Request    = "";
PLM_NotFirstVersionNotModifiable.Diagnostic = "Cannot modify identifier set attributes on this reference because it is not the first version of the reference."; 
PLM_NotFirstVersionNotModifiable.Advice     = "You can modify the identifier attributes set only on the first version of the reference!";

// NO MODIFY BECAUSE OF MATURITY
// To be interpreted by the save engine - factorisation case
PLM_NotEditableBecauseOfMaturity.Request    = "";
PLM_NotEditableBecauseOfMaturity.Diagnostic = "This component can not be modified because of its maturity status.";
PLM_NotEditableBecauseOfMaturity.Advice     = "";

// NO CREATION BECAUSE OF NO IDENTIFIER SET UNICITY
// To be interpreted by the client save engine -  factorisation case
// (interpretation by the client factory with att value suggestion : no perfo interest)
PLM_IdentifiersAlreadyUsed.Request 		= "";
PLM_IdentifiersAlreadyUsed.Diagnostic	= "Cannot create the component because its identifiers set is already used for an other component.";
PLM_IdentifiersAlreadyUsed.Advice		  = "Choose others identifiers.";

// TOO LONG END USER EDITABLE ATTRIBUTE
// !! Emission : only on end user editable attribute (other case: system error)
// To be interpreted by the client save engine -  factorisation case
// In Diagnostic's /p1 :  the most expressive name (for the end user) of the concerned attribute, that the server is able to give.
// In Diagnostic's /p1 :  The maximal size possible for the attribute value (number of characters)
PLM_MaxArgumentLength.Request		  = ""; 
PLM_MaxArgumentLength.Diagnostic 	  = "\"/p1\" attribute value is longer than the maximum length (/p2 characters).";
PLM_MaxArgumentLength.Advice 		  = "Please change this value"; 

// BAD VALUE OF A USER EDITABLE ATTRIBUTE
// !! Emission : only on end user editable attribute (other case: system error)
// To be interpreted by the client save engine -  factorisation case
// In Diagnostic's /p1 :  the most expressive name (for the end user) of the concerned attribute, that the server is able to give.
// In Diagnostic's /p1 :  The maximal size possible for the attribute value (number of characters)
PLM_BadAttributeValue.Request		  = ""; 
PLM_BadAttributeValue.Diagnostic 	  = "The value given to the \"/p1\" attribute can not be accepted.";
PLM_BadAttributeValue.Advice 		  = "Please change this value"; 

// DELETION & NOT LAST VERSION
// To be interpreted by the client save engine - factorisation case
PLM_NotFirstVersionNotDeletable.Request 	    = "";
PLM_NotFirstVersionNotDeletable.Diagnostic  	= "This reference can not be deleted because it is not the last version."; 
PLM_NotFirstVersionNotDeletable.Advice		    = "Check that the reference is the last version.";

// COMPONENT MODIFY & OWNER MATURITY
// To be interpreted by the client save engine - factorisation case
PLM_BecauseOfOwnerMaturity_M.Request 	  = "";
PLM_BecauseOfOwnerMaturity_M.Diagnostic  = "This component cannot be modified because its owner is not editable.";  
PLM_BecauseOfOwnerMaturity_M.Advice      = "Change the maturity status of the owner component.";  




//=================   DURING  NEW VERSION PROCESS  ===========================================


// VERSIONNING FORBIDDEN DUE TO MATURITY
// To be interpreted by the client new version engine -  factorisation case
PLM_NotVersionnableBecauseOfMaturity.Request     	= "";
PLM_NotVersionnableBecauseOfMaturity.Diagnostic 	= "This component can not be versionned because of its maturity.";
PLM_NotVersionnableBecauseOfMaturity.Advice     	= "Change the state maturity.";


// COMPONENT CREATION & OWNER MATURITY
// To be interpreted by the client save engine -  factorisation case
PLM_BecauseOfOwnerMaturity_C.Request    	= "";
PLM_BecauseOfOwnerMaturity_C.Diagnostic 	= "This component can not be created because its owner is not editable";
PLM_BecauseOfOwnerMaturity_C.Advice	    = "Change the maturity state of the owner component.";  


// OBJECT CREATION FAILURE      New, usefull for the advice only
// To be interpreted by the client engine -  factorisation case
PLM_CreationPb.Diagnostic  = "Impossible to create this component." ;
PLM_CreationPb.Advice      = "Contact your database administrator to check the database state.";
PLM_CreationPb.Request     = "";


//=================   DURING LOCK or UNLOCK PROCESS  ===========================================

// LOCK NOT DONE : ENTITY ALREADY LOCKED BY THE CURRENT USER
// May be interpreted by the client engine - factorisation case
PLM_LockedByCurrentUser.Request = "";
PLM_LockedByCurrentUser.Diagnostic = "Object already locked by you.";
PLM_LockedByCurrentUser.Advice = "";

// LOCK NOT DONE : ENTITY NOT LOCKED BECAUSE ALREADY LOCKED BY THE ANOTHER USER
// May be interpreted by the client engine - factorisation case
// In Diagnostic's /p1 :  the login of the user trying to perform the action
PLM_LockedByAnotherUser.Request = "";
PLM_LockedByAnotherUser.Diagnostic = "You cannot lock this PLM component because it is already locked by user /p1";
PLM_LockedByAnotherUser.Advice = "Contact the lock owner";

// LOCK NOT DONE : ENTITY NOT LOCKED BECAUSE NOT LOCKABLE
// May be interpreted by the client engine - factorisation case
PLM_NotLockable.Request = "";
PLM_NotLockable.Diagnostic = "The object is not lockable.";
PLM_NotLockable.Advice = "";

// UNLOCK NOT DONE : ENTITY NOT UNLOCKED BECAUSE OLDER THAN THE DB OBJECT
// May be interpreted by the client engine - factorisation case
PLM_NoUnlockWithoutRefresh.Request = "";
PLM_NoUnlockWithoutRefresh.Diagnostic = "The component in session is older than the one in database.";
PLM_NoUnlockWithoutRefresh.Advice = "Check that your session is synchronized with the database.";

// VERSIONING FAILED : REFERENCE IS NOT THE MOST RECENT VERSION
// To be interpreted by the save engine - factorisation case

PLM_NotRemovableBecauseNotLast.Request = "";
PLM_NotRemovableBecauseNotLast.Diagnostic = "The reference in session is not the most recent version.";
PLM_NotRemovableBecauseNotLast.Advice = "Please carry out your versioning from the most recent version.";



