|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.xmatters.ca.servicedesk.util.ParseCAFile
public class ParseCAFile
This class parses the CA notification file generated by CA Service Desk when the 'Write to file' check box is selected in the xMatters Notification Method Detail page.
This class follows the description of the Notification File as described in the CA Service Desk Manager Implementation Guide r12.5, Chapter 6: Customising, Subsection: The Notification File, page 241.
The file is parsed into three maps representing each section of the file. The parse method of this class returns a map containing the three maps. The key for each map is the name of each section. Within each section map the attributes in the notification file are the keys.
Constructor Summary | |
---|---|
ParseCAFile()
|
|
ParseCAFile(java.lang.String file)
|
Method Summary | |
---|---|
void |
copyFileTo(java.io.File destFile,
boolean preserveFileDate)
Exposing the raw copy operation so that clients can implement their own 'markedProcessed' logic. |
java.lang.String |
getEncoding()
|
java.lang.String |
getEQUALS()
|
java.lang.String |
getFILE_SECTION_DIVIDER()
|
java.lang.String |
getFILE_SECTION_HEADER()
|
java.lang.String |
getFile()
|
java.lang.String |
getNEW_KEY_PREFIX()
|
java.lang.String |
getNEWLINE()
|
java.lang.String |
getProcessedFile()
|
boolean |
isCopyAfterProcessing()
|
void |
markProcessed()
Convenience method that provides a default processed file location and file name. |
void |
markProcessed(java.lang.String directory)
Convenience method that provides a default processed file name. |
void |
markProcessed(java.lang.String directory,
java.lang.String file)
This method is provided to either copy or move the parsed CA SDM notification method file once it has been processed. |
void |
moveFile(java.io.File destFile)
Exposing the raw move operation so that clients can implement their own 'markedProcessed' logic. |
java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> |
parse()
Parse a CA Service Desk notification method file. |
void |
setCopyAfterProcessing(boolean copyAfterProcessing)
|
void |
setEncoding(java.lang.String fileEncoding)
|
void |
setEQUALS(java.lang.String eQUALS)
|
void |
setFILE_SECTION_DIVIDER(java.lang.String fILESECTIONDIVIDER)
|
void |
setFILE_SECTION_HEADER(java.lang.String fILESECTIONHEADER)
|
void |
setFile(java.lang.String file)
|
void |
setNEW_KEY_PREFIX(java.lang.String nEWKEYPREFIX)
|
void |
setNEWLINE(java.lang.String nEWLINE)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ParseCAFile()
public ParseCAFile(java.lang.String file)
Method Detail |
---|
public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> parse() throws java.io.FileNotFoundException
java.io.FileNotFoundException
public void markProcessed(java.lang.String directory, java.lang.String file) throws java.io.IOException
directory
- A string representing the target directory for the processed file.file
- A string representing the target file name for the processed file.
java.io.IOException
public void markProcessed(java.lang.String directory) throws java.io.IOException
java.io.IOException
public void markProcessed() throws java.io.IOException
java.io.IOException
public void copyFileTo(java.io.File destFile, boolean preserveFileDate) throws java.io.IOException
destFile
- A java File object that represents the target file to copy to.preserveFileDate
- Expose Apache Commons FileUtils.copyFile preserveFileDate parameter so clients can choose behaviour.
java.io.IOException
public void moveFile(java.io.File destFile) throws java.io.IOException
destFile
- A java File object that represents the target file to move to.
java.io.IOException
public java.lang.String getFile()
public final void setFile(java.lang.String file)
public java.lang.String getProcessedFile()
public boolean isCopyAfterProcessing()
public void setCopyAfterProcessing(boolean copyAfterProcessing)
public void setEncoding(java.lang.String fileEncoding)
public java.lang.String getEncoding()
public java.lang.String getNEWLINE()
public void setNEWLINE(java.lang.String nEWLINE)
public java.lang.String getEQUALS()
public void setEQUALS(java.lang.String eQUALS)
public java.lang.String getFILE_SECTION_DIVIDER()
public void setFILE_SECTION_DIVIDER(java.lang.String fILESECTIONDIVIDER)
public java.lang.String getFILE_SECTION_HEADER()
public void setFILE_SECTION_HEADER(java.lang.String fILESECTIONHEADER)
public java.lang.String getNEW_KEY_PREFIX()
public void setNEW_KEY_PREFIX(java.lang.String nEWKEYPREFIX)
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |