AS2Partnership¶
-
public class
AS2Partnership
¶ The
AS2Partnership
is the utilities for maintaining the partnership of AS2. In current version, it support addition or deletion of the partnership.Author: kochiu, Twinsen Tsang (modifiers) See also:
.createAS2Partnership(String)
,.removeAS2Partnership(String)
Methods¶
createAS2Partnership¶
-
public static boolean
createAS2Partnership
(String xmlFile)¶ Create a AS2 partnership with the configuration defined in the
XMLFile
.Parameters: - xmlFile – The partnership XML instance file. It is located at “/data/as2.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/as2.xml” relative to the program folders.
removeAS2Partnership¶
-
public static boolean
removeAS2Partnership
(String xmlFile)¶ Remove a particular partnership defined in the
xmlFile
. Only the attributes <id> in thexmlFile
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.