info.magnolia.ui.framework.action
Class AbstractVersionAction<D extends ActionDefinition>

java.lang.Object
  extended by info.magnolia.ui.api.action.AbstractAction<D>
      extended by info.magnolia.ui.framework.action.AbstractVersionAction<D>
Type Parameters:
D - ActionDefinition.
All Implemented Interfaces:
Action
Direct Known Subclasses:
ShowVersionsAction

public abstract class AbstractVersionAction<D extends ActionDefinition>
extends AbstractAction<D>

Abstract version action showing available versions of an item.


Field Summary
protected  FormDialogPresenter formDialogPresenter
           
protected  LocationController locationController
           
 String MESSAGE_FORMAT_VERSION_OPTION_LABEL
          Label format for versions.
 String MESSAGE_FORMAT_VERSION_OPTION_LABEL_NO_COMMENT
           
protected  AbstractJcrNodeAdapter nodeAdapter
           
protected  UiContext uiContext
           
 
Constructor Summary
protected AbstractVersionAction(D definition, LocationController locationController, UiContext uiContext, FormDialogPresenter formDialogPresenter, AbstractJcrNodeAdapter nodeAdapter, info.magnolia.i18nsystem.SimpleTranslator i18n)
           
 
Method Summary
protected abstract  FormDialogDefinition buildNewComponentDialog()
           
 void execute()
          Executes the action.
protected  List<info.magnolia.cms.core.version.VersionInfo> getAvailableVersionInfoList()
           
protected abstract  Class getBeanItemClass()
           
protected  EditorCallback getEditorCallback()
           
protected  com.vaadin.data.util.BeanItem<?> getItem()
           
protected abstract  Location getLocation()
           
protected abstract  javax.jcr.Node getNode()
           
protected  String getVersionLabel(info.magnolia.cms.core.version.VersionInfo versionInfo)
           
 
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
 

Field Detail

MESSAGE_FORMAT_VERSION_OPTION_LABEL

public final String MESSAGE_FORMAT_VERSION_OPTION_LABEL
Label format for versions. Will display: VersionNumber (Date) (Comment), i.e. 1.1 (MM/dd/YYYY HH:mm) (Comment).

See Also:
Constant Field Values

MESSAGE_FORMAT_VERSION_OPTION_LABEL_NO_COMMENT

public final String MESSAGE_FORMAT_VERSION_OPTION_LABEL_NO_COMMENT
See Also:
Constant Field Values

locationController

protected final LocationController locationController

uiContext

protected final UiContext uiContext

formDialogPresenter

protected final FormDialogPresenter formDialogPresenter

nodeAdapter

protected final AbstractJcrNodeAdapter nodeAdapter
Constructor Detail

AbstractVersionAction

protected AbstractVersionAction(D definition,
                                LocationController locationController,
                                UiContext uiContext,
                                FormDialogPresenter formDialogPresenter,
                                AbstractJcrNodeAdapter nodeAdapter,
                                info.magnolia.i18nsystem.SimpleTranslator i18n)
Method Detail

execute

public void execute()
             throws ActionExecutionException
Description copied from interface: Action
Executes the action.

Throws:
ActionExecutionException - if an error occurs performing the action

getEditorCallback

protected EditorCallback getEditorCallback()

getAvailableVersionInfoList

protected List<info.magnolia.cms.core.version.VersionInfo> getAvailableVersionInfoList()
                                                                                throws ActionExecutionException
Throws:
ActionExecutionException

getVersionLabel

protected String getVersionLabel(info.magnolia.cms.core.version.VersionInfo versionInfo)

getItem

protected com.vaadin.data.util.BeanItem<?> getItem()

getBeanItemClass

protected abstract Class getBeanItemClass()

buildNewComponentDialog

protected abstract FormDialogDefinition buildNewComponentDialog()
                                                         throws ActionExecutionException,
                                                                javax.jcr.RepositoryException
Throws:
ActionExecutionException
javax.jcr.RepositoryException

getNode

protected abstract javax.jcr.Node getNode()
                                   throws javax.jcr.RepositoryException
Throws:
javax.jcr.RepositoryException

getLocation

protected abstract Location getLocation()
                                 throws ActionExecutionException
Throws:
ActionExecutionException


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