org.weda.tapestry.component
Class FileEditor

java.lang.Object
  extended by org.apache.hivemind.impl.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.BaseComponent
              extended by org.weda.tapestry.component.EditorGroupComponent
                  extended by org.weda.tapestry.component.AbstractEditor
                      extended by org.weda.tapestry.component.FileEditor
All Implemented Interfaces:
org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, org.apache.tapestry.IComponent, org.apache.tapestry.IRender, org.apache.tapestry.ITemplateComponent, ActionContainer, ActionContainerProvider, ActionListener, StateableObject

@ComponentClass(allowBody=false)
public abstract class FileEditor
extends AbstractEditor
implements ActionContainer, ActionContainerProvider, ActionListener

Author:
Mikhail Titov

Constructor Summary
FileEditor()
           
 
Method Summary
 void afterExecute(ActionEvent event)
           
 void beforeExecute(ActionEvent event)
           
 ExecutedActionInfo executeAction(ActionExecutionContext context)
          Метод выполненяет действие
 java.lang.String getActionContainerName()
          Метод возвращает уникальное имя контейнера.
 java.util.List<ActionContainer> getActionContainers()
           
abstract  ActionRegistry getActionRegistry()
           
 java.util.List<ActionState> getActionsStates()
          Метод возвращает текущее состояние действий доступных для данного контейнера.
 java.util.Set<java.lang.Class> getDisabledActions()
          Метод возвращает множество классов действий (action class) которые необходимо запретить для выполнения в данном контейнере.
 java.lang.String getEditorClass()
           
abstract  org.apache.tapestry.request.IUploadFile getFile()
           
 boolean hasRegisteredActions()
          Метод вернет TRUE если есть действия зарегистрированные для данного контейнера.
 void makeUpdate()
          Данный метод должен производить изменения в модели данных и вернуть NULL если изменения прошли успешно или сообщение указывающее на то почему изменения провести не удалось.
protected  void prepareForRender(org.apache.tapestry.IRequestCycle cycle)
           
 
Methods inherited from class org.weda.tapestry.component.AbstractEditor
getConverterService, getModelValue
 
Methods inherited from class org.weda.tapestry.component.EditorGroupComponent
getBindingFactory, getEditorGroup, getModel, getModelName, getState, getStyle, resetState, restoreState, setModelName
 
Methods inherited from class org.apache.tapestry.BaseComponent
addOuter, finishLoad, renderComponent
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, finishLoad, format, format, format, format, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isInActiveState, isParameterBound, isRendering, pageEndRender, render, renderBody, renderInformalParameters, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty, toString
 
Methods inherited from class org.apache.hivemind.impl.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.weda.action.ActionListener
getFilter, setFilter
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, enterActiveState, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, isRendering, renderBody, setBinding, setContainedComponent, setContainer, setId, setNamespace, setPage, setProperty
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Constructor Detail

FileEditor

public FileEditor()
Method Detail

getActionRegistry

@InjectObject(value="service:org.weda.action.ActionRegistry")
public abstract ActionRegistry getActionRegistry()

getFile

public abstract org.apache.tapestry.request.IUploadFile getFile()

getEditorClass

public java.lang.String getEditorClass()

makeUpdate

public void makeUpdate()
                throws java.lang.Exception
Description copied from class: AbstractEditor
Данный метод должен производить изменения в модели данных и вернуть NULL если изменения прошли успешно или сообщение указывающее на то почему изменения провести не удалось.

Specified by:
makeUpdate in class AbstractEditor
Throws:
java.lang.Exception

executeAction

public ExecutedActionInfo executeAction(ActionExecutionContext context)
                                 throws ActionRegistryException
Description copied from interface: ActionContainer
Метод выполненяет действие

Specified by:
executeAction in interface ActionContainer
Throws:
ActionRegistryException

hasRegisteredActions

public boolean hasRegisteredActions()
Description copied from interface: ActionContainer
Метод вернет TRUE если есть действия зарегистрированные для данного контейнера. Если контейнер реализует интерфейс GlobalActionsProvider тогда метод вернет TRUE если в реестре действий есть хотя бы одно глобальное действие.

Specified by:
hasRegisteredActions in interface ActionContainer
See Also:
ActionRegistry#hasRegisteredActions(Class)

getDisabledActions

public java.util.Set<java.lang.Class> getDisabledActions()
Description copied from interface: ActionContainer
Метод возвращает множество классов действий (action class) которые необходимо запретить для выполнения в данном контейнере.

Specified by:
getDisabledActions in interface ActionContainer

getActionsStates

public java.util.List<ActionState> getActionsStates()
                                             throws ActionRegistryException
Description copied from interface: ActionContainer
Метод возвращает текущее состояние действий доступных для данного контейнера. Т.е. значение свойства ActionState.isAvailable() true. Состояния глобальных действий будут присутствовать в списке в том и только том случае если данный контейнер реализует интерфейс GlobalActionsProvider.

Specified by:
getActionsStates in interface ActionContainer
Throws:
ActionRegistryException
See Also:
ActionRegistry#getActionsStates(ActionContainer)

getActionContainerName

public java.lang.String getActionContainerName()
Description copied from interface: ActionContainer
Метод возвращает уникальное имя контейнера.

Specified by:
getActionContainerName in interface ActionContainer

getActionContainers

public java.util.List<ActionContainer> getActionContainers()
                                                    throws java.lang.Exception
Specified by:
getActionContainers in interface ActionContainerProvider
Throws:
java.lang.Exception

beforeExecute

public void beforeExecute(ActionEvent event)
                   throws java.lang.Exception
Specified by:
beforeExecute in interface ActionListener
Throws:
java.lang.Exception

afterExecute

public void afterExecute(ActionEvent event)
                  throws java.lang.Exception
Specified by:
afterExecute in interface ActionListener
Throws:
java.lang.Exception

prepareForRender

protected void prepareForRender(org.apache.tapestry.IRequestCycle cycle)
Overrides:
prepareForRender in class EditorGroupComponent


Copyright © 2005-2006 . All Rights Reserved.