`

task command sample code

IBM 
阅读更多

Task command接口:

public interface CreateAccountCmd extends com.ibm.commerce.command.TaskCommand {
        /**
         * The IBM copyright notice field.
         */
        public static final String COPYRIGHT = com.ibm.commerce.copyright.IBMCopyright.SHORT_COPYRIGHT;
       
        /**
         * The name of this interface.
         */
        public final static String NAME = "com.ibm.commerce.account.commands.CreateAccountCmd";

        /**
         * The name of  the default implementation class.
         */
        public final static String defaultCommandClassName = "com.ibm.commerce.account.commands.CreateAccountCmdImpl";

...

}


Task command实现类:

public class CreateAccountCmdImpl extends com.ibm.commerce.command.TaskCommandImpl implements CreateAccountCmd {
        /**
         * The IBM copyright notice field.
         */
        public static final String COPYRIGHT = com.ibm.commerce.copyright.IBMCopyright.SHORT_COPYRIGHT;
        /**
         * The name of the default implementation.
         */
        public final static String CLASSNAME = "com.ibm.commerce.account.commands.CreateAccountCmdImpl";

...

public void performExecute() throws ECException {
        final String methodName = "performExecute";
       
        ECTrace.entry(ECTraceIdentifiers.COMPONENT_CONTRACT, this.getClass().getName(), methodName);
        super.performExecute();
}

...

}


task command被别的代码调用时:

                                CreateAccountCmd task =
                                        (CreateAccountCmd) CommandFactory.createCommand(
                                        CreateAccountCmd.class.getName(),
                                        storeId);
                                task.setCommandContext(getCommandContext());
                                task.setAccountElement(accountElement);
                                task.execute();
                                inAccountId = task.getAccountId();

分享到:
评论

相关推荐

    Reengineering.NET.0321821459.epub

    Through real-world case studies and extensive downloadable sample code, Irby shows how to carefully plan a .NET reengineering project, understand the true current state of your code, introduce unit ...

    MFC+Windows程序设计

    Each set of source code files is accompanied by a release-build EXE as well as a Visual C++ workspace (DSW) file that you can open with Visual C++'s Open Workspace command. From Me to You (and You ...

    VC技术内幕第五版.chm

    Each set of source code files is accompanied by a release-build EXE as well as a Visual C++ workspace (DSW) file that you can open with Visual C++'s Open Workspace command. From Me to You (and You ...

    VB编程资源大全(英文源码 其它)

    This sample code does just that. If you do any kind <END><br>55,splitfile.zip This project contains several useful and interesting bits of code, but the best thing is a function/routine to split a...

    LCTF软件备份VariSpec™ Liquid Crystal Tunable Filters

    b) added command VsEnableImplicitPalette() to code and documentation added command VsConnect() to code and documentation added command VsClose() to code and documentation added local variable to ...

    开放式人工智能挑战赛,第 3 天:掌握代码生成.docx

    codeFile = System.IO.File.ReadAllText($@"{AppDomain.CurrentDomain.BaseDirectory}sample-code\function.cs"); // 其他代码处理逻辑 } while (true); ``` 通过以上步骤,参与者不仅可以学习到如何利用GPT ...

    VB编程资源大全(英文源码 网络)

    So 下载 the code and get involved with the News Group, help us to help you.<END><br>4 , urllink.zip User control to launch web browser and jump to URL.<END><br>5 , vbftp.zip Sample application ...

    UE(官方下载)

    Create a custom user tool to compile Java code, using the command line, from within UltraEdit Configure UltraEdit with javascript lint How to check your JavaScript source code for common mistakes ...

    外文翻译 stus MVC

    The tag feature promotes reusable code and abstracts Java code from the JSP file. This feature allows nice integration into JSP-based development tools that allow authoring with tags. • Tag library ...

    hash table spell checking

    This function already contains code that reads a file line by line. It also extracts each word from a line using an instance of class stringstream. Your task is to check the spelling of each word. ...

    数据结构作业Hash表

    This function already contains code that reads a file line by line. It also extracts each word from a line using an instance of class stringstream. Your task is to check the spelling of each word. ...

    VB编程资源大全(英文源码 API)

    ctaskmanager.zip This application contains the same basic functionality as the task manager in Windows. It allows you to see the loaded windows on your system as well as the class, position and ...

    i-vector的工具箱

    Assuming that the MCR is installed, a Matlab code can be compiled from either the command window or a DOS/bash terminal as: mcc -m -R -singleCompThread -R -nodisplay -R -nojvm foo.m -I libs/ -o foo ...

    微软内部资料-SQL性能优化2

    The user address space is where application code, global variables, per-thread stacks, and DLL code would reside. The system address space is where the kernel, executive, HAL, boot drivers, page ...

    Visual C++ 编程资源大全(英文源码 表单)

    UPDATE_COMMAND_UI with dialogs 在对话框中使用ON_UPDATE_COMMAND_UI(13KB)<END><br>13,13.zip Using ON_UPDATE_COMMAND_UI with dialogs (2) 使用ON_UPDATE_COMMAND_UI(11KB)<END><br>14,14.zip ...

    hadoop_the_definitive_guide_3nd_edition

    The Command-Line Interface 51 Basic Filesystem Operations 52 Hadoop Filesystems 54 Interfaces 55 The Java Interface 57 Reading Data from a Hadoop URL 57 Reading Data Using the FileSystem API 59 ...

    au3反编译源码

    au3反编译源码 ...SourceCode\src\ VB6 source code !SourceCode\Au3-Extracter Script 0.2\ AutoIT Script to decompile a *.au3-exe or *.a3x !SourceCode\SRC RanRot_MT.dll - Mersenne Twister & RanRot\ ...

    eac3to V3.17

    * fixed: error code not set for "source file format could not be detected" * fixed: audio resampling from/to 24.975 didn't work properly * fixed: WAV files beginning with lots of zeroes were sometimes...

Global site tag (gtag.js) - Google Analytics