Class CreateAction
- java.lang.Object
-
- com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
-
- com.hybris.cockpitng.actions.create.CreateAction
-
- All Implemented Interfaces:
CockpitAction<java.lang.Object,java.lang.Object>,ComponentWidgetAdapterAware
public class CreateAction extends AbstractComponentWidgetAdapterAware implements CockpitAction<java.lang.Object,java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringPARAM_ACTION_CONTEXTstatic java.lang.StringSETTING_CONTEXT_COMPONENT_NAMEstatic java.lang.StringSETTING_INITIALIZE_ENTITYstatic java.lang.StringSOCKET_INPUT_CREATED_OBJECTstatic java.lang.StringSOCKET_OUTPUT_CREATE_CONTEXTstatic java.lang.StringSOCKET_OUTPUT_CREATED_OBJECTstatic java.lang.StringVALUE_SETTING_TARGET_COMPONENT_CONFIGURABLE_FLOWDeprecated, for removal: This API element is subject to removal in a future version.since 6.6static java.lang.StringVALUE_SETTING_TARGET_COMPONENT_EDITOR_AREADeprecated, for removal: This API element is subject to removal in a future version.since 6.6
-
Constructor Summary
Constructors Constructor Description CreateAction()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected booleancanCreateInstance(DataType type)booleancanPerform(ActionContext<java.lang.Object> ctx)Returns true if the action can be performed for the given context, false otherwise.protected java.lang.StringfindTypeCode(ActionContext<java.lang.Object> ctx)java.lang.StringgetConfirmationMessage(ActionContext<java.lang.Object> ctx)Returns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeCockpitAction.needsConfirmation(ActionContext)).FieldSearchFacadegetFieldSearchFacade()protected NotificationServicegetNotificationService()protected java.lang.StringgetNotificationSource(ActionContext<java.lang.Object> ctx)Deprecated, for removal: This API element is subject to removal in a future version.since 6.7, useNotificationService.getWidgetNotificationSource(ActionContext)instead.ObjectFacadegetObjectFacade()protected PermissionFacadegetPermissionFacade()TypeFacadegetTypeFacade()voidinitializeDefaultEventListeners()Initializes default socket event listeners for the component.protected booleanisAllowed(java.lang.String typeCode)booleanneedsConfirmation(ActionContext<java.lang.Object> ctx)Returns true if the action should be confirmed by user before being performed, false otherwise.ActionResult<java.lang.Object>perform(ActionContext<java.lang.Object> ctx)Performs the action.protected voidsendConfiguredOutput(ActionContext<java.lang.Object> ctx, java.lang.String typeCode)voidsetFieldSearchFacade(FieldSearchFacade fieldSearchFacade)voidsetNotificationService(NotificationService notificationService)voidsetObjectFacade(ObjectFacade objectFacade)voidsetPermissionFacade(PermissionFacade permissionFacade)voidsetTypeFacade(TypeFacade typeFacade)protected booleanshouldInitializeEntity(ActionContext<java.lang.Object> ctx)-
Methods inherited from class com.hybris.cockpitng.engine.impl.AbstractComponentWidgetAdapterAware
addSocketInputEventListener, getComponentID, handleSocketInputEvent, initialize, registerStubInstance, sendOutput, setComponentID, unregisterStubInstance
-
-
-
-
Field Detail
-
SOCKET_OUTPUT_CREATE_CONTEXT
public static final java.lang.String SOCKET_OUTPUT_CREATE_CONTEXT
- See Also:
- Constant Field Values
-
SOCKET_OUTPUT_CREATED_OBJECT
public static final java.lang.String SOCKET_OUTPUT_CREATED_OBJECT
- See Also:
- Constant Field Values
-
SOCKET_INPUT_CREATED_OBJECT
public static final java.lang.String SOCKET_INPUT_CREATED_OBJECT
- See Also:
- Constant Field Values
-
SETTING_INITIALIZE_ENTITY
public static final java.lang.String SETTING_INITIALIZE_ENTITY
- See Also:
- Constant Field Values
-
SETTING_CONTEXT_COMPONENT_NAME
public static final java.lang.String SETTING_CONTEXT_COMPONENT_NAME
- See Also:
- Constant Field Values
-
VALUE_SETTING_TARGET_COMPONENT_CONFIGURABLE_FLOW
@Deprecated(since="6.6", forRemoval=true) public static final java.lang.String VALUE_SETTING_TARGET_COMPONENT_CONFIGURABLE_FLOWDeprecated, for removal: This API element is subject to removal in a future version.since 6.6- See Also:
- Constant Field Values
-
VALUE_SETTING_TARGET_COMPONENT_EDITOR_AREA
@Deprecated(since="6.6", forRemoval=true) public static final java.lang.String VALUE_SETTING_TARGET_COMPONENT_EDITOR_AREADeprecated, for removal: This API element is subject to removal in a future version.since 6.6- See Also:
- Constant Field Values
-
PARAM_ACTION_CONTEXT
public static final java.lang.String PARAM_ACTION_CONTEXT
- See Also:
- Constant Field Values
-
-
Method Detail
-
perform
public ActionResult<java.lang.Object> perform(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionPerforms the action.- Specified by:
performin interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- the action result
-
findTypeCode
protected java.lang.String findTypeCode(ActionContext<java.lang.Object> ctx)
-
getNotificationSource
@Deprecated(since="6.7", forRemoval=true) protected java.lang.String getNotificationSource(ActionContext<java.lang.Object> ctx)Deprecated, for removal: This API element is subject to removal in a future version.since 6.7, useNotificationService.getWidgetNotificationSource(ActionContext)instead.
-
sendConfiguredOutput
protected void sendConfiguredOutput(ActionContext<java.lang.Object> ctx, java.lang.String typeCode) throws ObjectCreationException
- Throws:
ObjectCreationException
-
shouldInitializeEntity
protected boolean shouldInitializeEntity(ActionContext<java.lang.Object> ctx)
-
initializeDefaultEventListeners
public void initializeDefaultEventListeners()
Description copied from interface:ComponentWidgetAdapterAwareInitializes default socket event listeners for the component.- Specified by:
initializeDefaultEventListenersin interfaceComponentWidgetAdapterAware- Overrides:
initializeDefaultEventListenersin classAbstractComponentWidgetAdapterAware
-
canPerform
public boolean canPerform(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionReturns true if the action can be performed for the given context, false otherwise.- Specified by:
canPerformin interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- true if the action can be performed for the given context, false otherwise
-
isAllowed
protected boolean isAllowed(java.lang.String typeCode)
-
canCreateInstance
protected boolean canCreateInstance(DataType type)
-
needsConfirmation
public boolean needsConfirmation(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionReturns true if the action should be confirmed by user before being performed, false otherwise. This is evaluated by the action renderer.- Specified by:
needsConfirmationin interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- true if the action should be confirmed by user before being performed, false otherwise
-
getConfirmationMessage
public java.lang.String getConfirmationMessage(ActionContext<java.lang.Object> ctx)
Description copied from interface:CockpitActionReturns the confirmation message to be shown to the user in the confirmation dialog if confirmation is needed (seeCockpitAction.needsConfirmation(ActionContext)).- Specified by:
getConfirmationMessagein interfaceCockpitAction<java.lang.Object,java.lang.Object>- Parameters:
ctx- context containing the data and other information- Returns:
- the confirmation message to be shown to the user in the confirmation dialog
- See Also:
CockpitAction.needsConfirmation(ActionContext)
-
getPermissionFacade
protected PermissionFacade getPermissionFacade()
-
setPermissionFacade
public void setPermissionFacade(PermissionFacade permissionFacade)
-
getTypeFacade
public TypeFacade getTypeFacade()
-
setTypeFacade
public void setTypeFacade(TypeFacade typeFacade)
-
getObjectFacade
public ObjectFacade getObjectFacade()
-
setObjectFacade
public void setObjectFacade(ObjectFacade objectFacade)
-
getFieldSearchFacade
public FieldSearchFacade getFieldSearchFacade()
-
setFieldSearchFacade
public void setFieldSearchFacade(FieldSearchFacade fieldSearchFacade)
-
getNotificationService
protected NotificationService getNotificationService()
-
setNotificationService
public void setNotificationService(NotificationService notificationService)
-
-