EbmsPartnership

public class EbmsPartnership

The EbmsPartnership is the utilities for maintaining the partnership of EbMS. In current version, it support addition or deletion of the partnership.

Author:kochiu, Twinsen Tsang (modifiers)

See also: .createEbmsPartnership(String), .removeEbmsPartnership(String)

Methods

createEbmsPartnership

public static boolean createEbmsPartnership(String xmlFile)

Create a EbMS partnership with the configuration defined in the XMLFile.

Parameters:
  • xmlFile – The partnership XML instance file. It is located at “/data/ebms.xml”.
Throws:
  • DAOException – Error in persistence connectivity.
  • DocumentException – Error in reading the parameter in the xmlFile.
  • SAXException – Error in parsing the xmlFile.
  • IOException
Returns:

true if the removal operation ran successfully.

main

public static void main(String[] args)

The entry point for CLI.

Parameters:
  • args – The arguments have two parametes. The first one is the partnership maintenance which is either “-a” (add) or “-d” (delete). The second one is the xml file containing the partnership information. They are located at the “conf/ebms.xml” relative to the program folders.

removeEbmsPartnership

public static boolean removeEbmsPartnership(String xmlFile)

Remove a particular partnership defined in the xmlFile. Only the attributes <id> in the xmlFile will be used for removing partnership.

Parameters:
  • xmlFile – The partnership XML instance file. It is located at “/data/ebms.xml”.
Throws:
  • DAOException – Error in persistence connectivity.
  • DocumentException – Error in reading the parameter in the xmlFile.
  • SAXException – Error in parsing the xmlFile.
  • IOException
Returns:

true if the removal operation ran successfully.