info.magnolia.module.shop.dialog.action
Class ShopSaveAndGenerateStructureAction

java.lang.Object
  extended by info.magnolia.ui.api.action.AbstractAction<T>
      extended by info.magnolia.ui.admincentral.dialog.action.SaveDialogAction
          extended by info.magnolia.module.shop.dialog.action.ShopSaveAndGenerateStructureAction
All Implemented Interfaces:
info.magnolia.ui.api.action.Action

public class ShopSaveAndGenerateStructureAction
extends info.magnolia.ui.admincentral.dialog.action.SaveDialogAction

Save action that generates whole shop structure when new shop is saved.


Field Summary
 
Fields inherited from class info.magnolia.ui.admincentral.dialog.action.SaveDialogAction
callback, item, validator
 
Constructor Summary
ShopSaveAndGenerateStructureAction(info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition definition, com.vaadin.data.Item item, info.magnolia.ui.form.EditorValidator validator, info.magnolia.ui.form.EditorCallback callback)
           
 
Method Summary
protected  void createFolderInWorkspace(String workspace, String folderName)
          Creates folder (if it does not exist) with specified name under root node.
protected  void createShopApps(javax.jcr.Node node)
          Create shop apps for new shop.
protected  void createShopEntryInAppLauncher(javax.jcr.Node node)
          Registers shop apps into appLauncher.
protected  void createShopStructure(javax.jcr.Node node)
          Create structure of shop.
 void execute()
           
 
Methods inherited from class info.magnolia.ui.admincentral.dialog.action.SaveDialogAction
setNodeName
 
Methods inherited from class info.magnolia.ui.api.action.AbstractAction
getDefinition
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShopSaveAndGenerateStructureAction

public ShopSaveAndGenerateStructureAction(info.magnolia.ui.admincentral.dialog.action.SaveDialogActionDefinition definition,
                                          com.vaadin.data.Item item,
                                          info.magnolia.ui.form.EditorValidator validator,
                                          info.magnolia.ui.form.EditorCallback callback)
Method Detail

execute

public void execute()
             throws info.magnolia.ui.api.action.ActionExecutionException
Specified by:
execute in interface info.magnolia.ui.api.action.Action
Overrides:
execute in class info.magnolia.ui.admincentral.dialog.action.SaveDialogAction
Throws:
info.magnolia.ui.api.action.ActionExecutionException

createShopStructure

protected void createShopStructure(javax.jcr.Node node)
                            throws javax.jcr.RepositoryException
Create structure of shop. This includes creation of price, tax and currency categories nodes under shop configuration.

Parameters:
node - shop node
Throws:
javax.jcr.RepositoryException

createFolderInWorkspace

protected void createFolderInWorkspace(String workspace,
                                       String folderName)
                                throws javax.jcr.RepositoryException
Creates folder (if it does not exist) with specified name under root node.

Throws:
javax.jcr.RepositoryException

createShopApps

protected void createShopApps(javax.jcr.Node node)
                       throws javax.jcr.RepositoryException
Create shop apps for new shop.

Parameters:
node - shop node
Throws:
javax.jcr.RepositoryException

createShopEntryInAppLauncher

protected void createShopEntryInAppLauncher(javax.jcr.Node node)
                                     throws javax.jcr.RepositoryException
Registers shop apps into appLauncher.

Parameters:
node - shop node
Throws:
javax.jcr.RepositoryException


Copyright © 2014 Magnolia International Ltd.. All Rights Reserved.