Class CSVMessageDescriptor
java.lang.Object
fr.paris.lutece.portal.service.csv.CSVMessageDescriptor
- All Implemented Interfaces:
Comparable<CSVMessageDescriptor>
Describe an error that occurred during the reading of a CSV file.
-
Constructor Summary
ConstructorsConstructorDescriptionDefault constructorCSVMessageDescriptor(CSVMessageLevel messageLevel, int nLineNumber, String strMessageContent) Creates a new CSVMessageDescriptor with every attributes initialized -
Method Summary
Modifier and TypeMethodDescriptionintcompare this CSVMessageDescriptor with another.
This method returns 0 for objects that are not equals ! Use with care in collections !booleanintGet the number of the line of the CSV file associated with this message.Get the description of the messageGet the level of the messageinthashCode()voidsetLineNumber(int nLineNumber) Set the number of the line of the CSV file associated with this error.voidsetMessageContent(String strMessageContent) Set the description of the messagevoidsetMessageLevel(CSVMessageLevel messageLevel) Set the level of the message
-
Constructor Details
-
CSVMessageDescriptor
public CSVMessageDescriptor()Default constructor -
CSVMessageDescriptor
public CSVMessageDescriptor(CSVMessageLevel messageLevel, int nLineNumber, String strMessageContent) Creates a new CSVMessageDescriptor with every attributes initialized- Parameters:
messageLevel- The level of the messagenLineNumber- The number of the line associated with the messagestrMessageContent- The content of the message
-
-
Method Details
-
getMessageLevel
Get the level of the message- Returns:
- The level of the message
-
setMessageLevel
Set the level of the message- Parameters:
messageLevel- the level of the message
-
getLineNumber
public int getLineNumber()Get the number of the line of the CSV file associated with this message.- Returns:
- The number of the line of the CSV file associated with this message.
-
setLineNumber
public void setLineNumber(int nLineNumber) Set the number of the line of the CSV file associated with this error.- Parameters:
nLineNumber- The number of the line of the CSV file associated with this error.
-
getMessageContent
Get the description of the message- Returns:
- The description of the message
-
setMessageContent
Set the description of the message- Parameters:
strMessageContent- The description of the message
-
compareTo
compare this CSVMessageDescriptor with another.
This method returns 0 for objects that are not equals ! Use with care in collections !- Specified by:
compareToin interfaceComparable<CSVMessageDescriptor>- Parameters:
o- Object to compare to- Returns:
- Returns :
- -1 if the line number of this object is greater than the line number of the other object, or if this object has an
INFOlevel and the other one anERRORlevel if they have the same line number. - 0 if they both have the same line number and level, regardless of their description
- 1 if the other object is null, if its line number if greater than the line number of the current object, or if this object has a
ERRORlevel whereas the other has theINFOlevel if they have the same line number.
- -1 if the line number of this object is greater than the line number of the other object, or if this object has an
-
equals
-
hashCode
public int hashCode()
-