{"id":120,"date":"2022-08-23T20:50:28","date_gmt":"2022-08-23T20:50:28","guid":{"rendered":"http:\/\/xpf.xhlbc.com\/XPF\/?page_id=120"},"modified":"2022-09-18T19:08:10","modified_gmt":"2022-09-18T19:08:10","slug":"java-classes","status":"publish","type":"page","link":"https:\/\/polytech.xcaliber.network\/XPF\/java-classes\/","title":{"rendered":"Java Classes"},"content":{"rendered":"\n<p>basic<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>\/******************************************************************************************************\r\n *                                                                                                    *\r\n *                                           POJO                                            *\r\n *                                                                                                    *\r\n *        Title: XCC Verification Program                                                                   *\r\n *      Version: 1                                                                                      *\r\n *    Developer: Dr.Lou.31600                                                                  *\r\n *   Source Codes are the intellectual property of the author.                                        *\r\n *   Generated by The Xcelious Programming Facility (XPF) using the CLass Blueprint.                  *\r\n *                                                                                                    *\r\n ******************************************************************************************************\/\r\n\r\npackage xcelious.blueprint.xcc;\t\t\t\t\t\t\t\t\/\/ Java package for XPF Library\r\nimport xcelious.blueprint.common.ChainCodeWorkArea;\t\t\t\/\/ Include the Chain Code Work Area (CCWA)\r\nimport com.csa.support.api.CSAPI;\t\t\t\t\t\t\t\t\/\/ Include the CSA Platform Interface\r\nimport com.csa.common.utils.DateUtils;\t\t\t\t\t\t\t\/\/ Include the Date and Time Utilities\r\nimport java.util.Date;\t\t\t\t\t\t\t\t\t\t\t\/\/ Include the standard Java Date package\r\nimport java.util.Iterator;\t\t\t\t\t\t\t\t\t\t\/\/ Include the standard Java Iterator\r\nimport java.util.Set;\t\t\t\t\t\t\t\t\t\t\t\/\/ Include the standatd Java Keyset\r\n\r\n\/******************************************************************************************************\r\n *                                                                                                    *\r\n *                                           POJO                                            *\r\n *                                                                                                    *\r\n *                                        Object Constructor                                          *\r\n *                                                                                                    *\r\n ******************************************************************************************************\/\r\n\r\npublic class POJO1 extends CSAPI\t\t\t\t\/\/ Begin Object Constructor\r\n{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ Create The\r\n\tpublic POJO1()\t\t\t\t\t\t\t\t\/\/   Xcelious HyperLedger\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/    Chain Code Object (XCC)\r\n\t\tsuper();\t\t\t\t\t\t\t\t\t\t\t\t\/\/ Percolate Constructors\r\n\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ End of Object Constructor\r\n\r\n\/******************************************************************************************************\r\n *                                                                                                    *\r\n *                                           POJO                                            *\r\n *                                                                                                    *\r\n *                                        Chain Code Executor                                         *\r\n *                                                                                                    *\r\n ******************************************************************************************************\/\r\n\r\n\tpublic String execute()\t\t\t\t\t\t\t\t\t\t\/\/ Begin Chain Code Executor\r\n\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ Return a task completion code\r\n\ttry\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ Encapsulate the program\r\n\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/  to detect any program checks\r\n\t\tlogicTrace(1001,\"POJO1 - Task:\" \t\t\/\/ Program logic trace\r\n\t\t\t\t\t\t+ tco.getTaskNmbr());\t\t\t\t\t\/\/ Display CSA Task Number\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/\r\n\t\tChainCodeWorkArea ccwa = new ChainCodeWorkArea();\t\t\/\/ Allocate Chain Code Work Area (CCWA)\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/\r\n\t\tccwa.setParmKeyList(progParms.keySet());\t\t\t\t\/\/ Set the Keyset for the program paramters\r\n\t\tccwa.setParmKeys(ccwa.getParmKeyList().iterator());\t\t\/\/ Get the program parameters keyset iterator\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/\r\n\t\twhile (ccwa.getParmKeys().hasNext())\t\t\t\t\t\/\/ Iterate through the program\r\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/  parameter list\r\n\t\t\tccwa.setWkKey((String) ccwa.getParmKeys().next());\t\/\/ Get the paramter name\r\n\t\t\tccwa.setWkValue((String) progParms.get(ccwa.getWkKey())); \/\/ Get the parameter value\r\n\t\t\tlogicTrace(1002,\"POJO1 - Exec Parm:\" \/\/ Program logic trace\r\n\t\t\t\t\t\t    + ccwa.getWkKey()\t\t\t\t\t\/\/ Display parameter name\r\n\t\t\t\t\t\t    + \" Value:\"\t\t\t\t\t\t\t\/\/  and\r\n\t\t\t\t\t\t    + ccwa.getWkValue());\t\t\t\t\/\/   value\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ Continue parameter iteration\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/\r\n\t\tccwa.setToday(new Date());\t\t\t\t\t\t\t\t\/\/ Get the current date and time\r\n       \tccwa.setDateUtils(new DateUtils());\t\t\t\t\t\t\/\/ Create the DateUtils Object\r\n       \tccwa.setReptDate(ccwa.getDateUtils().reptTimeStamp());\t\/\/ Retrieve the formatted date and time\r\n        ccwa.setUserGreeting(ccwa.getDateUtils().getGreeting(ccwa.getToday())); \/\/ Retrieve the greeting\r\n\t\tlogicTrace(1003,\"POJO1 - TimeStamp:\"\t\/\/ Program logic trace\r\n\t\t\t\t\t\t+ ccwa.getReptDate()\t\t\t\t\t\/\/ Display the formatted date and time\r\n\t\t\t\t\t\t+ \" Greeting:\"\t\t\t\t\t\t\t\/\/ Display the user greeting\r\n\t\t\t\t\t\t+ ccwa.getUserGreeting());\t\t\t\t\/\/ i.e. Good Afternoon\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/\r\n\r\n\t    addSymbol(\"&amp;LedgerHeader\",\"Xcelious Programming Facility (XPF)\");\r\n\t    addSymbol(\"&amp;LedgerTitle\",\"HyperLedger Chain Code Workbench\");\r\n\t    addSymbol(\"&amp;LedgerFontColor\",\"blue\");\r\n\t    addSymbol(\"&amp;LedgerNoticeColor\",\"green\");\r\n\t    addSymbol(\"&amp;ProdLogoURL\",\"http:\/\/www.scepterx.com\/MediaLib\/XCCProdIntro.png\");\r\n\r\n\t\taddSymbol(\"&amp;PageHeader\",\"Xcelious Programming Facility (XPF)\");\r\n\t    addSymbol(\"&amp;PageTitle\",\"HyperLedger Java Chain Code Workbench\");\r\n\t    addSymbol(\"&amp;PageFontColor\",\"navy\");\r\n\t    addSymbol(\"&amp;PageNoticeColor\",\"green\");\r\n\t    addSymbol(\"&amp;DevLogoURL\",\"http:\/\/www.scepterx.com\/MediaLib\/CTOLogo.png\");\r\n\r\n\t    addSymbol(\"&amp;DevName\",\"Developer: Dr.Lou.31600\");\r\n\t    addSymbol(\"&amp;ProgMessage1\",\"Installation Verified\");\r\n\r\n\t\taddSymbol(\"&amp;PageMessage2\",ccwa.getReptDate());\t\t\t\/\/ Symbolic substitution for PageMessage1\r\n\t    addSymbol(\"&amp;PageMessage3\",ccwa.getUserGreeting());\t\t\/\/ Symbolic substitution for PageMessage2\r\n\r\n\r\n\r\n\r\n\/******************************************************************************************************\r\n *                                                                                                    *\r\n *                                           POJO                                            *\r\n *                                                                                                    *\r\n *                                          Program Return                                            *\r\n *                                                                                                    *\r\n ******************************************************************************************************\/\r\n\r\n        ccwa = null;\t\t\t\t\t\t\t\t\t\t\t\/\/ Free the Chain Code Work Area (CCWA)\r\n        logicTrace(1004,\"POJO1 - Return\");\t\t\/\/ Program logic trace\r\n\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ Normal end of task\r\n\t\tcatch (Exception servError)\t\t\t\t\t\t\t\t\/\/ Catch all JVM Exceptions\r\n\t\t\t{\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ Begin program check handler\r\n\t\t\tabend(servError);\t\t\t\t\t\t\t\t\t\/\/ Terminate task and report error\r\n\t\t\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ End program check handler\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/\r\n\treturn epilog();\t\t\t\t\t\t\t\t\t\t\t\/\/ Chain Code Program Completed\r\n\t}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ End of Chain Code Executor\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/\r\n}\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\/\/ End of Java Program Class\r\n\r\n<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>basic<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-120","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/polytech.xcaliber.network\/XPF\/wp-json\/wp\/v2\/pages\/120","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/polytech.xcaliber.network\/XPF\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/polytech.xcaliber.network\/XPF\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/polytech.xcaliber.network\/XPF\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/polytech.xcaliber.network\/XPF\/wp-json\/wp\/v2\/comments?post=120"}],"version-history":[{"count":2,"href":"https:\/\/polytech.xcaliber.network\/XPF\/wp-json\/wp\/v2\/pages\/120\/revisions"}],"predecessor-version":[{"id":305,"href":"https:\/\/polytech.xcaliber.network\/XPF\/wp-json\/wp\/v2\/pages\/120\/revisions\/305"}],"wp:attachment":[{"href":"https:\/\/polytech.xcaliber.network\/XPF\/wp-json\/wp\/v2\/media?parent=120"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}