Class CSVMessageDescriptor
- java.lang.Object
-
- fr.paris.lutece.portal.service.csv.CSVMessageDescriptor
-
- All Implemented Interfaces:
Comparable<CSVMessageDescriptor>
public class CSVMessageDescriptor extends Object implements Comparable<CSVMessageDescriptor>
Describe an error that occurred during the reading of a CSV file.
-
-
Constructor Summary
Constructors Constructor Description CSVMessageDescriptor()Default constructorCSVMessageDescriptor(CSVMessageLevel messageLevel, int nLineNumber, String strMessageContent)Creates a new CSVMessageDescriptor with every attributes initialized
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intcompareTo(CSVMessageDescriptor o)compare this CSVMessageDescriptor with another.
This method returns 0 for objects that are not equals ! Use with care in collections !booleanequals(Object o)intgetLineNumber()Get the number of the line of the CSV file associated with this message.StringgetMessageContent()Get the description of the messageCSVMessageLevelgetMessageLevel()Get 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 Detail
-
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 Detail
-
getMessageLevel
public CSVMessageLevel getMessageLevel()
Get the level of the message- Returns:
- The level of the message
-
setMessageLevel
public void setMessageLevel(CSVMessageLevel messageLevel)
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
public String getMessageContent()
Get the description of the message- Returns:
- The description of the message
-
setMessageContent
public void setMessageContent(String strMessageContent)
Set the description of the message- Parameters:
strMessageContent- The description of the message
-
compareTo
public int compareTo(CSVMessageDescriptor o)
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
-
-