pulse - the web application framework Get pulse at SourceForge.net. Fast, secure and Free Open Source software downloads Ohloh project report for pulse-java

org.torweg.pulse.component.shop.admin
Class ShopSettingsEditor

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.component.shop.admin.ShopSettingsEditor
All Implemented Interfaces:
Configurable<ShopSettingsEditorConfiguration>

public class ShopSettingsEditor
extends Controller
implements Configurable<ShopSettingsEditorConfiguration>

The editor of the ShopSettings as used by the pulse web-site-administration.

Version:
$Revision: 1914 $
Author:
Daniel Dietz
See Also:
ShopSettings

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Constructor Summary
ShopSettingsEditor()
           
 
Method Summary
 void createShopSettings(Bundle bundle, ServiceRequest request)
          Creates new ShopSettings for the given bundle and locale with the default Currency for the given locale and persists the settings.
 void deleteTaxgroupsEditor(Bundle bundle, ServiceRequest request)
          Deletes a TaxGroup, if the TaxGroup is not associated with any Prices.
 ShopSettingsEditorResult editShopSettings(Bundle bundle, ServiceRequest request)
          Returns the JAXB-able ShopSettings to initialise the editor with.
 void initialize(ShopSettingsEditorConfiguration conf)
          Initialises the ShopSettingsEditor with the given Configuration.
 ShopSettingsEditorResult initShopSettingsWestPanel(Bundle bundle, ServiceRequest request)
          Initialises the west-panel of the pulse website-administration for the ShopSettingsEditor.
 java.lang.Object initShopSettingsWestTree(Bundle bundle, ServiceRequest request)
          Loads the tree-nodes for the west-panel-tree/s.
 ShopSettingsEditorResult initTaxgroupsEditor(Bundle bundle, ServiceRequest request)
          Returns the TaxGroups-editor(-grid) for a ShopSettings which is determined by a given id in the request.
 void loadTaxgroupsEditor(Bundle bundle, ServiceRequest request)
          Returns a JSON-response: the TaxGroups for a ShopSettings -id which is determined by a given id in the request.
 void saveShopSettings(Bundle bundle, ServiceRequest request)
          Saves the ShopSettings.
 
Methods inherited from class org.torweg.pulse.bundle.Controller
getAlwaysRun, isAlwaysRun, setAlwaysRun
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShopSettingsEditor

public ShopSettingsEditor()
Method Detail

initShopSettingsWestPanel

@RequireToken
@Action(value="initShopSettingsWestPanel", generate=true)
@Permission(value="editShopSettings")
@Groups(values="ShopAdministrator")
public final ShopSettingsEditorResult initShopSettingsWestPanel(Bundle bundle, ServiceRequest request)
Initialises the west-panel of the pulse website-administration for the ShopSettingsEditor.

Parameters:
bundle - the Bundle
request - the ServiceRequest
Returns:
a JAXB-able result-Object

initShopSettingsWestTree

@RequireToken
@Action(value="initShopSettingsWestTree", generate=true)
@Permission(value="editShopSettings")
@Groups(values="ShopAdministrator")
public final java.lang.Object initShopSettingsWestTree(Bundle bundle, ServiceRequest request)
Loads the tree-nodes for the west-panel-tree/s.

Parameters:
bundle - the Bundle
request - the ServiceRequest
Returns:
null

createShopSettings

@RequireToken
@Action(value="createShopSettings", generate=true)
@Permission(value="editShopSettings")
@Groups(values="ShopAdministrator")
public final void createShopSettings(Bundle bundle, ServiceRequest request)
Creates new ShopSettings for the given bundle and locale with the default Currency for the given locale and persists the settings.

Parameters:
bundle - the Bundle
request - the ServiceRequest

editShopSettings

@RequireToken
@Action(value="editShopSettings", generate=true)
@Permission(value="editShopSettings")
@Groups(values="ShopAdministrator")
public final ShopSettingsEditorResult editShopSettings(Bundle bundle, ServiceRequest request)
Returns the JAXB-able ShopSettings to initialise the editor with.

Parameters:
bundle - the Bundle
request - the ServiceRequest
Returns:
the JAXB-able ShopSettings to initialise the editor with

initTaxgroupsEditor

@RequireToken
@Action(value="initTaxgroupsEditor", generate=true)
@Permission(value="editShopSettings")
@Groups(values="ShopAdministrator")
public final ShopSettingsEditorResult initTaxgroupsEditor(Bundle bundle, ServiceRequest request)
Returns the TaxGroups-editor(-grid) for a ShopSettings which is determined by a given id in the request.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
an AJAX-result: the initialized TaxGroup s-editor(-grid) for a ShopSettings

loadTaxgroupsEditor

@RequireToken
@Action(value="loadTaxgroupsEditor", generate=true)
@Permission(value="editShopSettings")
@Groups(values="ShopAdministrator")
public final void loadTaxgroupsEditor(Bundle bundle, ServiceRequest request)
Returns a JSON-response: the TaxGroups for a ShopSettings -id which is determined by a given id in the request.

Send a JSON-response: the TaxGroups for a ShopSettings-id

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

deleteTaxgroupsEditor

@RequireToken
@Action(value="deleteTaxgroupsEditor", generate=true)
@Permission(value="editShopSettings")
@Groups(values="ShopAdministrator")
public final void deleteTaxgroupsEditor(Bundle bundle, ServiceRequest request)
Deletes a TaxGroup, if the TaxGroup is not associated with any Prices.

Sends a JSON-response: trueif deletion has succeeded, false otherwise.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

saveShopSettings

@RequireToken
@Action(value="saveShopSettings", generate=true)
@Permission(value="editShopSettings")
@Groups(values="ShopAdministrator")
public final void saveShopSettings(Bundle bundle, ServiceRequest request)
Saves the ShopSettings.

Sends a JSON-response: indicating whether the save of the ShopSettings has been successful.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest

initialize

public final void initialize(ShopSettingsEditorConfiguration conf)
Initialises the ShopSettingsEditor with the given Configuration.

Specified by:
initialize in interface Configurable<ShopSettingsEditorConfiguration>
Parameters:
conf - the Configuration