如何在Hybris中触发注释@SystemSetup?

时间:2017-02-26 05:53:59

标签: java annotations hybris

如下所示,有一个使用 @SystemSetup 注释的方法,但是如何触发此方法?

@SystemSetup(extension = IwacockpitsConstants.EXTENSIONNAME)
public class IwaCockpitsSystemSetup{
    @SystemSetup(type = SystemSetup.Type.ALL, process = SystemSetup.Process.ALL)
    public void createCsCockpitUsers(){}
}

此外,还有官方评论:

/**
 * This class is called during IwaCockpits system setup, either selecting essential or project data.
 * 
 * The main method of this class ({@link #createCsCockpitUsers()} is responsible for creating all the IWA CSCockpit
 * custom groups and their restrictions.
 */

1 个答案:

答案 0 :(得分:1)

实际上,Hybris将负责在updateinit进程(因为process = Process.ALL)以及创建essential或{{1}时为您触发该方法数据(因为project)这可以从type = Type.ALL或使用HAC完成:

例如,尝试更新流程,并从 HAC 检查创建基本数据,以调用该方法:

enter image description here

以下是根据Ant输入执行方法的不同情况。

@SystemSetup