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.store.admin
Class StoreContentEditor

java.lang.Object
  extended by org.torweg.pulse.bundle.Controller
      extended by org.torweg.pulse.site.content.admin.AbstractBasicContentEditor
          extended by org.torweg.pulse.component.store.admin.StoreContentEditor
All Implemented Interfaces:
DeprecatedConfigurable
Direct Known Subclasses:
ShopContentEditor

public class StoreContentEditor
extends AbstractBasicContentEditor
implements DeprecatedConfigurable

the editor for a StoreContent within the administration.

Version:
$Revision: 1914 $
Author:
Daniel Dietz
See Also:
StoreContent, StoreVariant, StoreItem

Nested Class Summary
 
Nested classes/interfaces inherited from class org.torweg.pulse.bundle.Controller
Controller.AlwaysRun
 
Field Summary
 
Fields inherited from class org.torweg.pulse.site.content.admin.AbstractBasicContentEditor
LOGGER
 
Constructor Summary
StoreContentEditor()
           
 
Method Summary
 void copyStoreContent(Bundle bundle, ServiceRequest request)
          creates a copy of a StoreContent specified by parameter "id" in request in a folder specified by parameter "toid" in request using the locale of the folder.
 void createSubVariant(Bundle bundle, ServiceRequest request)
          creates and saves a new sub-StoreVariant for a StoreContent.
 void createVariant(Bundle bundle, ServiceRequest request)
          creates and saves a new StoreVariant for a StoreContent.
 FCKEditorResult initDescriptionEditor(Bundle bundle, ServiceRequest request)
          starts the FCKEditor for the description of the content determined by the request.
 AbstractBasicContentEditorResult initEditor(Bundle bundle, ServiceRequest request)
          returns the initialized StoreContentEditor for a Content which is determined by a given id in the request.
 FCKEditorResult initVariantDescriptionEditor(Bundle bundle, ServiceRequest request)
          starts the FCKEditor for the description of a variant of the content determined by the request.
 AbstractBasicContentEditorResult initVariantEditor(Bundle bundle, ServiceRequest request)
          starts the Editor for a Variant.
 FCKEditorResult initVariantSummaryEditor(Bundle bundle, ServiceRequest request)
          starts the FCKEditor for the summary of the content determined by the request.
 AbstractBasicContentEditorResult loadDescription(Bundle bundle, ServiceRequest request)
           
 AbstractBasicContentEditorResult loadVariantDescription(Bundle bundle, ServiceRequest request)
           
 AbstractBasicContentEditorResult loadVariantOrOrderCode(Bundle bundle, ServiceRequest request)
          used for reloads of the StoreContent-Editor-Part that houses the variants/order-code.
 AbstractBasicContentEditorResult loadVariantOrOrderCodeSubVariant(Bundle bundle, ServiceRequest request)
          used for reloads of the StoreVariant-Editor-Part that houses the variants/order-code.
 AbstractBasicContentEditorResult loadVariantSummary(Bundle bundle, ServiceRequest request)
           
protected  void processVariantChanges(ServiceRequest request, org.hibernate.Session s)
          processes the request for variant changes.
 void removeAllVariants(Bundle bundle, ServiceRequest request)
          removes all variants from a StoreContent.
 void removeSubVariant(Bundle bundle, ServiceRequest request)
          removes all sub-StoreVariant from a StoreVariant.
 void removeVariant(Bundle bundle, ServiceRequest request)
          removes all variants from a StoreContent.
 void saveDescription(Bundle bundle, ServiceRequest request)
           
 void saveEditor(Bundle bundle, ServiceRequest request)
          saves the basic properties of a content (name, suffix, keywords), as well as the page-order.
 void saveVariantDescription(Bundle bundle, ServiceRequest request)
           
 void saveVariantSummary(Bundle bundle, ServiceRequest request)
           
protected  void setOrderCode(ServiceRequest request, StoreContent storeContent)
          sets the new order-code for a StoreContent.
 
Methods inherited from class org.torweg.pulse.site.content.admin.AbstractBasicContentEditor
addAttachmentToContent, addToLocalizationMap, buildDocument, editAttachmentOfContent, findSitemapNodesForContent, getConfig, init, initAttachmentDescriptionEditor, initFileBrowserForAttachmentsForContent, initHibernateSearchFix, initReferenceDurationEditor, initSummaryEditor, loadAttachmentDescription, loadAttachmentsForContent, loadContentLocalizationMap, loadSummary, removeAttachmentFromContent, removeFromLocalizationMap, removeReferenceDuration, saveAttachmentDescription, saveSummary, setBasics
 
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
 
Methods inherited from interface org.torweg.pulse.configuration.DeprecatedConfigurable
init
 

Constructor Detail

StoreContentEditor

public StoreContentEditor()
Method Detail

initEditor

@RequireToken
@Action(value="initEditor")
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public AbstractBasicContentEditorResult initEditor(Bundle bundle, ServiceRequest request)
returns the initialized StoreContentEditor for a Content 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 StoreContentEditor

saveEditor

@RequireToken
@Action(value="saveStoreContent", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public void saveEditor(Bundle bundle, ServiceRequest request)
saves the basic properties of a content (name, suffix, keywords), as well as the page-order.

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

processVariantChanges

protected void processVariantChanges(ServiceRequest request,
                                     org.hibernate.Session s)
processes the request for variant changes.

Parameters:
request - the current ServiceRequest
s - the current Session

setOrderCode

protected void setOrderCode(ServiceRequest request, StoreContent storeContent)
sets the new order-code for a StoreContent.

Parameters:
request - the current request
storeContent - the current content

copyStoreContent

@RequireToken
@Action(value="copyStoreContent", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final void copyStoreContent(Bundle bundle, ServiceRequest request)
creates a copy of a StoreContent specified by parameter "id" in request in a folder specified by parameter "toid" in request using the locale of the folder.

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

initDescriptionEditor

@RequireToken
@Action(value="initDescriptionEditor", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final FCKEditorResult initDescriptionEditor(Bundle bundle, ServiceRequest request)
starts the FCKEditor for the description of the content determined by the request.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
the initialized description-editor

saveDescription

@RequireToken
@Action(value="saveDescription", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final void saveDescription(Bundle bundle, ServiceRequest request)
Parameters:
bundle - the current Bundle
request - the current ServiceRequest

loadDescription

@RequireToken
@Action(value="loadDescription", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final AbstractBasicContentEditorResult loadDescription(Bundle bundle, ServiceRequest request)
Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
a result representing the description of the current content

createVariant

@RequireToken
@Action(value="createStoreVariant", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public void createVariant(Bundle bundle, ServiceRequest request)
creates and saves a new StoreVariant for a StoreContent.

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

createSubVariant

@RequireToken
@Action(value="createStoreSubVariant", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public void createSubVariant(Bundle bundle, ServiceRequest request)
creates and saves a new sub-StoreVariant for a StoreContent.

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

removeAllVariants

@RequireToken
@Action(value="removeAllVariants", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final void removeAllVariants(Bundle bundle, ServiceRequest request)
removes all variants from a StoreContent.

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

removeVariant

@RequireToken
@Action(value="removeVariant", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final void removeVariant(Bundle bundle, ServiceRequest request)
removes all variants from a StoreContent.

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

removeSubVariant

@RequireToken
@Action(value="removeSubVariant", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final void removeSubVariant(Bundle bundle, ServiceRequest request)
removes all sub-StoreVariant from a StoreVariant.

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

initVariantEditor

@RequireToken
@Action(value="initVariantEditor", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public AbstractBasicContentEditorResult initVariantEditor(Bundle bundle, ServiceRequest request)
starts the Editor for a Variant.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
the initialized variant-editor

loadVariantOrOrderCode

@RequireToken
@Action(value="loadVariantOrOrderCode", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final AbstractBasicContentEditorResult loadVariantOrOrderCode(Bundle bundle, ServiceRequest request)
used for reloads of the StoreContent-Editor-Part that houses the variants/order-code.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
a AJAX-result

loadVariantOrOrderCodeSubVariant

@RequireToken
@Action(value="loadVariantOrOrderCodeSubVariant", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final AbstractBasicContentEditorResult loadVariantOrOrderCodeSubVariant(Bundle bundle, ServiceRequest request)
used for reloads of the StoreVariant-Editor-Part that houses the variants/order-code.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
a AJAX-result

initVariantDescriptionEditor

@RequireToken
@Action(value="initVariantDescriptionEditor", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final FCKEditorResult initVariantDescriptionEditor(Bundle bundle, ServiceRequest request)
starts the FCKEditor for the description of a variant of the content determined by the request.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
the initialized description-editor

saveVariantDescription

@RequireToken
@Action(value="saveVariantDescription", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final void saveVariantDescription(Bundle bundle, ServiceRequest request)
Parameters:
bundle - the current Bundle
request - the current ServiceRequest

loadVariantDescription

@RequireToken
@Action(value="loadVariantDescription", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final AbstractBasicContentEditorResult loadVariantDescription(Bundle bundle, ServiceRequest request)
Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
a result representing the description of the current content

initVariantSummaryEditor

@RequireToken
@Action(value="initVariantSummaryEditor", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final FCKEditorResult initVariantSummaryEditor(Bundle bundle, ServiceRequest request)
starts the FCKEditor for the summary of the content determined by the request.

Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
the initialized summary-editor

saveVariantSummary

@RequireToken
@Action(value="saveVariantSummary", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final void saveVariantSummary(Bundle bundle, ServiceRequest request)
Parameters:
bundle - the current Bundle
request - the current ServiceRequest

loadVariantSummary

@RequireToken
@Action(value="loadVariantSummary", generate=true)
@Permission(value="editStoreContent")
@Groups(values="StoreAdministrator")
public final AbstractBasicContentEditorResult loadVariantSummary(Bundle bundle, ServiceRequest request)
Parameters:
bundle - the current Bundle
request - the current ServiceRequest
Returns:
a result representing the summary of the current content