net.sourceforge.openutils.mgnlmedia.media.dialog
Class DialogSelectMedia

java.lang.Object
  extended by info.magnolia.cms.gui.dialog.DialogControlImpl
      extended by info.magnolia.cms.gui.dialog.DialogBox
          extended by net.sourceforge.openutils.mgnlcontrols.dialog.ConfigurableFreemarkerDialog
              extended by net.sourceforge.openutils.mgnlmedia.media.dialog.DialogSelectMedia
All Implemented Interfaces:
info.magnolia.cms.gui.dialog.DialogControl

public class DialogSelectMedia
extends net.sourceforge.openutils.mgnlcontrols.dialog.ConfigurableFreemarkerDialog

This dialogs draws the control that allows to select a media from repository and store its uuid

Version:
$Id: DialogSelectMedia.java 2364 2010-05-09 11:34:58Z fgiust $
Author:
molaschi

Field Summary
 
Fields inherited from class net.sourceforge.openutils.mgnlcontrols.dialog.ConfigurableFreemarkerDialog
configuration, uuid
 
Fields inherited from class info.magnolia.cms.gui.dialog.DialogBox
BOXTYPE_1COL, BOXTYPE_2COLS
 
Fields inherited from class info.magnolia.cms.gui.dialog.DialogControlImpl
DEFAULT_VALUE_PROPERTY, SESSION_ATTRIBUTENAME_DIALOGOBJECT, SESSION_ATTRIBUTENAME_DIALOGOBJECT_REMOVE, VALIDATION_PATTERN_PROPERTY, value
 
Constructor Summary
DialogSelectMedia()
           
 
Method Summary
protected  void addToParameters(Map<String,Object> parameters)
          
 String getFilename(info.magnolia.cms.core.Content media, info.magnolia.cms.core.NodeData nd)
          Filename
 Long getHeight()
           
protected  info.magnolia.cms.core.Content getMedia()
          return current media content
protected  info.magnolia.cms.i18n.Messages getMessages()
          
protected  String getPath()
           
 String getThumbnailUrl(info.magnolia.cms.core.Content media, info.magnolia.cms.core.NodeData nd)
          get thumbnail url
 String getValue()
          
 Long getWidth()
           
 void init(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, info.magnolia.cms.core.Content websiteNode, info.magnolia.cms.core.Content configNode)
          
protected  List<Object> readValues()
          
 
Methods inherited from class net.sourceforge.openutils.mgnlcontrols.dialog.ConfigurableFreemarkerDialog
drawHtml, getSubNodes
 
Methods inherited from class info.magnolia.cms.gui.dialog.DialogBox
drawHtmlPost, drawHtmlPre, getBoxType, getHtmlDescription, setBoxType
 
Methods inherited from class info.magnolia.cms.gui.dialog.DialogControlImpl
addOption, addSub, clearWebsiteNode, drawHtmlPostSubs, drawHtmlPreSubs, drawSubs, getConfigValue, getConfigValue, getDescription, getId, getLabel, getMessage, getMessage, getName, getOptions, getParent, getRequest, getResponse, getStorageNode, getSub, getSubs, getTopParent, getValidationPattern, getValues, getWebsiteNode, isRequired, readValue, removeSessionAttribute, setConfig, setConfig, setConfig, setDescription, setLabel, setName, setOptions, setRequired, setSaveInfo, setSessionAttribute, setTopParent, setValidationMessage, setValue, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DialogSelectMedia

public DialogSelectMedia()
Method Detail

readValues

protected List<Object> readValues()

Overrides:
readValues in class info.magnolia.cms.gui.dialog.DialogControlImpl

init

public void init(javax.servlet.http.HttpServletRequest request,
                 javax.servlet.http.HttpServletResponse response,
                 info.magnolia.cms.core.Content websiteNode,
                 info.magnolia.cms.core.Content configNode)
          throws javax.jcr.RepositoryException

Specified by:
init in interface info.magnolia.cms.gui.dialog.DialogControl
Overrides:
init in class net.sourceforge.openutils.mgnlcontrols.dialog.ConfigurableFreemarkerDialog
Throws:
javax.jcr.RepositoryException

addToParameters

protected void addToParameters(Map<String,Object> parameters)

Overrides:
addToParameters in class net.sourceforge.openutils.mgnlcontrols.dialog.ConfigurableFreemarkerDialog

getMessages

protected info.magnolia.cms.i18n.Messages getMessages()

Overrides:
getMessages in class info.magnolia.cms.gui.dialog.DialogControlImpl

getPath

protected String getPath()
Specified by:
getPath in class net.sourceforge.openutils.mgnlcontrols.dialog.ConfigurableFreemarkerDialog

getMedia

protected info.magnolia.cms.core.Content getMedia()
                                           throws javax.jcr.RepositoryException
return current media content

Returns:
media content
Throws:
javax.jcr.RepositoryException - exception retrieving media

getThumbnailUrl

public String getThumbnailUrl(info.magnolia.cms.core.Content media,
                              info.magnolia.cms.core.NodeData nd)
get thumbnail url

Parameters:
media -
nd -
Returns:
thumbnail url

getValue

public String getValue()

Overrides:
getValue in class info.magnolia.cms.gui.dialog.DialogControlImpl

getFilename

public String getFilename(info.magnolia.cms.core.Content media,
                          info.magnolia.cms.core.NodeData nd)
Filename

Parameters:
nd -
media2 -
Returns:
filename

getWidth

public Long getWidth()

getHeight

public Long getHeight()


Copyright © 2008-2010 Openmind. All Rights Reserved.