web3
/******************************************************************************************************
* *
* HLWS *
* *
* Title: XCC Verification Program *
* Version: 1 *
* Developer: Dr.Lou.31600 *
* Source Codes are the intellectual property of the author. *
* Generated by The Xcelious Programming Facility (XPF) using the Web30 Blueprint. *
* *
******************************************************************************************************/
package xcelious.blueprint.xcc; // Java package for XPF Library
import xcelious.blueprint.common.ChainCodeWorkArea; // Include the Chain Code Work Area (CCWA)
import com.csa.support.api.CSAPI; // Include the CSA Platform Interface
import com.csa.common.utils.DateUtils; // Include the Date and Time Utilities
import java.util.Date; // Include the standard Java Date package
import java.util.Iterator; // Include the standard Java Iterator
import java.util.Set; // Include the standatd Java Keyset
/******************************************************************************************************
* *
* HLWS *
* *
* Object Constructor *
* *
******************************************************************************************************/
public class HLWS1 extends CSAPI // Begin Object Constructor
{ // Create The
public HLWS1() // Xcelious HyperLedger
{ // Chain Code Object (XCC)
super(); // Percolate Constructors
} // End of Object Constructor
/******************************************************************************************************
* *
* HLWS *
* *
* Chain Code Executor *
* *
******************************************************************************************************/
public String execute() // Begin Chain Code Executor
{ // Return a task completion code
try // Encapsulate the program
{ // to detect any program checks
logicTrace(1001,"HLWS1 - Task:" // Program logic trace
+ tco.getTaskNmbr()); // Display CSA Task Number
//
ChainCodeWorkArea ccwa = new ChainCodeWorkArea(); // Allocate Chain Code Work Area (CCWA)
//
ccwa.setParmKeyList(progParms.keySet()); // Set the Keyset for the program paramters
ccwa.setParmKeys(ccwa.getParmKeyList().iterator()); // Get the program parameters keyset iterator
//
while (ccwa.getParmKeys().hasNext()) // Iterate through the program
{ // parameter list
ccwa.setWkKey((String) ccwa.getParmKeys().next()); // Get the paramter name
ccwa.setWkValue((String) progParms.get(ccwa.getWkKey())); // Get the parameter value
logicTrace(1002,"HLWS1 - Exec Parm:" // Program logic trace
+ ccwa.getWkKey() // Display parameter name
+ " Value:" // and
+ ccwa.getWkValue()); // value
} // Continue parameter iteration
//
ccwa.setToday(new Date()); // Get the current date and time
ccwa.setDateUtils(new DateUtils()); // Create the DateUtils Object
ccwa.setReptDate(ccwa.getDateUtils().reptTimeStamp()); // Retrieve the formatted date and time
ccwa.setUserGreeting(ccwa.getDateUtils().getGreeting(ccwa.getToday())); // Retrieve the greeting
logicTrace(1003,"HLWS1 - TimeStamp:" // Program logic trace
+ ccwa.getReptDate() // Display the formatted date and time
+ " Greeting:" // Display the user greeting
+ ccwa.getUserGreeting()); // i.e. Good Afternoon
//
//
addSymbol("&LedgerHeader","Xcelious Programming Facility (XPF)");
addSymbol("&LedgerTitle","HyperLedger Chain Code Workbench");
addSymbol("&LedgerFontColor","blue");
addSymbol("&LedgerNoticeColor","green");
addSymbol("&ProdLogoURL","http://www.scepterx.com/MediaLib/XCCProdIntro.png");
addSymbol("&PageHeader","Xcelious Programming Facility (XPF)");
addSymbol("&PageTitle","HyperLedger Java Chain Code Workbench");
addSymbol("&PageFontColor","navy");
addSymbol("&PageNoticeColor","green");
addSymbol("&DevLogoURL","http://www.scepterx.com/MediaLib/CTOLogo.png");
addSymbol("&DevName","Developer: Dr.Lou.31600");
addSymbol("&ProgMessage1","Installation Verified");
addSymbol("&PageMessage2",ccwa.getReptDate()); // Symbolic substitution for PageMessage1
addSymbol("&PageMessage3",ccwa.getUserGreeting()); // Symbolic substitution for PageMessage2
/******************************************************************************************************
* *
* HLWS *
* *
* Program Return *
* *
******************************************************************************************************/
ccwa = null; // Free the Chain Code Work Area (CCWA)
logicTrace(1004,"HLWS1 - Return"); // Program logic trace
} // Normal end of task
catch (Exception servError) // Catch all JVM Exceptions
{ // Begin program check handler
abend(servError); // Terminate task and report error
} // End program check handler
//
return epilog(); // Chain Code Program Completed
} // End of Chain Code Executor
//
} // End of Java Program Class