com.xmatters.ca.servicedesk.util
Class ParseCAFile

java.lang.Object
  extended by com.xmatters.ca.servicedesk.util.ParseCAFile

public class ParseCAFile
extends java.lang.Object

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: Customizing, 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
 java.lang.String getEncoding()
           
 java.lang.String getEQUALS()
           
 java.lang.String getFILE_SECTION_DIVIDER()
           
 java.lang.String getFILE_SECTION_HEADER()
           
 java.lang.String getFileName()
           
 java.lang.String getNEW_KEY_PREFIX()
           
 java.lang.String getNEWLINE()
           
 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 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

ParseCAFile

public ParseCAFile()

ParseCAFile

public ParseCAFile(java.lang.String file)
Method Detail

parse

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.String>> parse()
                                                                                       throws java.io.FileNotFoundException
Parse a CA Service Desk notification method file.

Returns:
Map containing the notification file sections and their key value pairs
Throws:
java.io.FileNotFoundException

getFileName

public java.lang.String getFileName()

setFile

public void setFile(java.lang.String file)

setEncoding

public void setEncoding(java.lang.String fileEncoding)

getEncoding

public java.lang.String getEncoding()

getNEWLINE

public java.lang.String getNEWLINE()

setNEWLINE

public void setNEWLINE(java.lang.String nEWLINE)

getEQUALS

public java.lang.String getEQUALS()

setEQUALS

public void setEQUALS(java.lang.String eQUALS)

getFILE_SECTION_DIVIDER

public java.lang.String getFILE_SECTION_DIVIDER()

setFILE_SECTION_DIVIDER

public void setFILE_SECTION_DIVIDER(java.lang.String fILESECTIONDIVIDER)

getFILE_SECTION_HEADER

public java.lang.String getFILE_SECTION_HEADER()

setFILE_SECTION_HEADER

public void setFILE_SECTION_HEADER(java.lang.String fILESECTIONHEADER)

getNEW_KEY_PREFIX

public java.lang.String getNEW_KEY_PREFIX()

setNEW_KEY_PREFIX

public void setNEW_KEY_PREFIX(java.lang.String nEWKEYPREFIX)