org.riotfamily.components.editor
Class ComponentEditorImpl

java.lang.Object
  extended by org.riotfamily.components.editor.ComponentEditorImpl
All Implemented Interfaces:
ComponentEditor, MessageSourceAware, ServletContextAware

@Transactional
public class ComponentEditorImpl
extends Object
implements ComponentEditor, MessageSourceAware, ServletContextAware

Service bean to edit ComponentLists and ComponentVersions.


Constructor Summary
ComponentEditorImpl(ComponentDao componentDao, CacheService cacheService, ComponentRenderer renderer, ContentFormRepository formRepository)
           
 
Method Summary
 void deleteComponent(Long componentId)
           
 void discard(Long[] containerIds)
           
 String[] getComponentLabels(String[] types, HttpServletRequest request)
           
 String getText(Long contentId, String property)
          Returns the value of the given property.
 Map<String,Map<String,Object>> getTinyMCEProfiles()
           
 String insertComponent(Long listId, int position, String type, String properties)
          Creates a new Component and inserts it in the list identified by the given id.
 void logout()
          Performs a logout.
 void markAsDirty(Long containerId)
           
 void moveComponent(Long componentId, Long nextComponentId)
           
 void publish(Long[] containerIds)
           
 String renderComponent(Long componentId)
           
 void setMessageSource(MessageSource messageSource)
           
 void setServletContext(ServletContext servletContext)
           
 void setTinyMCEProfiles(Map<String,Map<String,Object>> tinyMCEProfiles)
           
 String setType(Long componentId, String type, String properties)
           
 void updateText(Long contentId, String property, String text)
          Sets the given property to a new value.
 String[] updateTextChunks(Long componentId, String property, String[] chunks)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ComponentEditorImpl

public ComponentEditorImpl(ComponentDao componentDao,
                           CacheService cacheService,
                           ComponentRenderer renderer,
                           ContentFormRepository formRepository)
Method Detail

setMessageSource

public void setMessageSource(MessageSource messageSource)
Specified by:
setMessageSource in interface MessageSourceAware

setServletContext

public void setServletContext(ServletContext servletContext)
Specified by:
setServletContext in interface ServletContextAware

getTinyMCEProfiles

public Map<String,Map<String,Object>> getTinyMCEProfiles()
Specified by:
getTinyMCEProfiles in interface ComponentEditor

setTinyMCEProfiles

public void setTinyMCEProfiles(Map<String,Map<String,Object>> tinyMCEProfiles)

getText

public String getText(Long contentId,
                      String property)
Returns the value of the given property.

Specified by:
getText in interface ComponentEditor

updateText

public void updateText(Long contentId,
                       String property,
                       String text)
Sets the given property to a new value.

Specified by:
updateText in interface ComponentEditor

updateTextChunks

public String[] updateTextChunks(Long componentId,
                                 String property,
                                 String[] chunks)
Specified by:
updateTextChunks in interface ComponentEditor

getComponentLabels

public String[] getComponentLabels(String[] types,
                                   HttpServletRequest request)
Specified by:
getComponentLabels in interface ComponentEditor

insertComponent

public String insertComponent(Long listId,
                              int position,
                              String type,
                              String properties)
Creates a new Component and inserts it in the list identified by the given id.

Specified by:
insertComponent in interface ComponentEditor

setType

public String setType(Long componentId,
                      String type,
                      String properties)
Specified by:
setType in interface ComponentEditor

renderComponent

public String renderComponent(Long componentId)
Specified by:
renderComponent in interface ComponentEditor

moveComponent

public void moveComponent(Long componentId,
                          Long nextComponentId)
Specified by:
moveComponent in interface ComponentEditor

deleteComponent

public void deleteComponent(Long componentId)
Specified by:
deleteComponent in interface ComponentEditor

markAsDirty

public void markAsDirty(Long containerId)
Specified by:
markAsDirty in interface ComponentEditor

publish

public void publish(Long[] containerIds)
Specified by:
publish in interface ComponentEditor

discard

public void discard(Long[] containerIds)
Specified by:
discard in interface ComponentEditor

logout

public void logout()
Performs a logout.

Specified by:
logout in interface ComponentEditor