net.sourceforge.openutils.mgnlmedia.media.pages
Class MediaFolderViewPage

java.lang.Object
  extended by info.magnolia.cms.servlets.MVCServletHandlerImpl
      extended by info.magnolia.cms.servlets.CommandBasedMVCServletHandler
          extended by info.magnolia.module.admininterface.PageMVCHandler
              extended by info.magnolia.module.admininterface.TemplatedMVCHandler
                  extended by net.sourceforge.openutils.mgnlmedia.media.pages.MessagesTemplatedMVCHandler
                      extended by net.sourceforge.openutils.mgnlmedia.media.pages.MediaFolderViewPage
All Implemented Interfaces:
info.magnolia.cms.servlets.MVCServletHandler
Direct Known Subclasses:
MediaAdvancedSearchPage

public class MediaFolderViewPage
extends MessagesTemplatedMVCHandler

Page that renders the folder view.

Version:
$Id: MediaFolderViewPage.java 3700 2011-11-20 16:46:36Z fgiust $
Author:
molaschi

Nested Class Summary
 
Nested classes/interfaces inherited from class net.sourceforge.openutils.mgnlmedia.media.pages.MessagesTemplatedMVCHandler
MessagesTemplatedMVCHandler.GetStaticMethodModel
 
Field Summary
protected  String actMediaHandle
           
protected  String bgSelector
           
protected  boolean canPublish
           
protected  String dest
           
protected  boolean develop
           
protected  Iterator<MediaBean> medias
           
protected  String mediaType
           
protected  String node
           
protected  Map<String,Integer> numberOfMedia
           
protected  int page
           
protected  List<it.openutils.mgnlutils.el.MgnlPagingElFunctions.Page> pages
           
protected  String pagesizeSelector
           
protected  String path
           
protected  String search
           
protected  net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult searchResult
           
protected  boolean selectMedia
           
protected  String sorting
           
protected  String type
           
protected  Collection<MediaTypeConfiguration> types
           
protected  boolean writable
           
 
Fields inherited from class net.sourceforge.openutils.mgnlmedia.media.pages.MessagesTemplatedMVCHandler
getStatic, log
 
Fields inherited from class info.magnolia.module.admininterface.PageMVCHandler
COMMAND_PARAMETER_NAME, COMMAND_SHOW, VIEW_SHOW
 
Fields inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl
exception, request, response, VIEW_ERROR, VIEW_SUCCESS
 
Fields inherited from interface info.magnolia.cms.servlets.MVCServletHandler
VIEW_NOTHING
 
Constructor Summary
MediaFolderViewPage(String name, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)
           
 
Method Summary
 String activate()
          Activates single media node
 String copy()
          copy a node
 info.magnolia.cms.core.Content copyMoveNode(String source, String destination, boolean move)
          Copy or move a node (from AdminTreeMVCHandler)
protected  int countMediaItems(MediaTypeConfiguration type)
          Counts media items for the specified type.
 String currentQueryString()
          Obtains the query string to use for reloading the current page.
Unwanted parameters are removed.
 String deactivate()
          Deactivates single media node
 String delete()
          delete a node
 String download()
          Download media
protected  net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult findMediaItems()
          Finds media items to show.
 String getActMediaHandle()
          Returns the actMediaHandle.
 String getBgSelector()
          Returns the bgSelector.
protected  SortMode getDefaultSorting()
           
 String getDest()
          Returns the dest.
 Iterator<MediaBean> getMedias()
          Returns the medias.
 String getMediaType()
          Returns the mediaType.
 String getMessage(String key, String param)
           
 String getModuleVersion()
          Returns the installed media module version.
 String getNode()
          Returns the node.
 Map<String,Integer> getNumberOfMedia()
          Returns the numberOfMedia.
 int getPage()
          Returns the page.
 List<it.openutils.mgnlutils.el.MgnlPagingElFunctions.Page> getPages()
          Returns the pages.
 String getPagesizeSelector()
          Returns the pagesizeSelector.
 String getPath()
          Returns the path.
 String getSearch()
          Returns the search.
 net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult getSearchResult()
          Returns the searchResult.
 String getSorting()
          Returns the sorting.
 String getType()
          Returns the type.
 Collection<MediaTypeConfiguration> getTypes()
          Returns the types.
 void init()
          
 boolean isCanPublish()
          Returns the canPublish.
 boolean isDevelop()
          Returns the develop.
 boolean isSelectMedia()
          Returns the selectMedia.
 boolean isSingleInstance()
           
 boolean isWritable()
          Returns the writable.
 String mediatabLink(MediaTypeConfiguration type)
          Builds the href for the media type link in the navigation bar.
 String move()
          moves a node
 void setActMediaHandle(String actMediaHandle)
          Sets the actMediaHandle.
 void setCanPublish(boolean canPublish)
          Sets the canPublish.
 void setDest(String dest)
          Sets the dest.
 void setDevelop(boolean develop)
          Sets the develop.
 void setMediaType(String mediaType)
          Sets the mediaType.
 void setNode(String node)
          Sets the node.
 void setNumberOfMedia(Map<String,Integer> numberOfMedia)
          Sets the numberOfMedia.
 void setPage(int page)
          Sets the page.
 void setPath(String path)
          Sets the path.
 void setSearch(String search)
          Sets the search.
 void setSelectMedia(boolean selectMedia)
          Sets the selectMedia.
 void setType(String type)
          Sets the type.
 void setTypes(Collection<MediaTypeConfiguration> types)
          Sets the types.
 void setWritable(boolean writable)
          Sets the writable.
 String show()
          
 
Methods inherited from class net.sourceforge.openutils.mgnlmedia.media.pages.MessagesTemplatedMVCHandler
getGetStatic, getMsgs, populateFromRequest
 
Methods inherited from class info.magnolia.module.admininterface.TemplatedMVCHandler
getTemplateName, renderHtml
 
Methods inherited from class info.magnolia.module.admininterface.PageMVCHandler
getForm, getI18nBasename, getParams, setForm, setI18nBasename, setMsgs, setParams
 
Methods inherited from class info.magnolia.cms.servlets.CommandBasedMVCServletHandler
execute, findCommand, getCatalogueName, getCommandContext, getViewNameAfterExecution, setCatalogueName
 
Methods inherited from class info.magnolia.cms.servlets.MVCServletHandlerImpl
getCommand, getException, getExceptionStackTrace, getName, getRequest, getResponse, setCommand, setRequest, setResponse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

path

protected String path

node

protected String node

dest

protected String dest

type

protected String type

bgSelector

protected String bgSelector

pagesizeSelector

protected String pagesizeSelector

sorting

protected String sorting

selectMedia

protected boolean selectMedia

actMediaHandle

protected String actMediaHandle

mediaType

protected String mediaType

medias

protected Iterator<MediaBean> medias

types

protected Collection<MediaTypeConfiguration> types

numberOfMedia

protected Map<String,Integer> numberOfMedia

writable

protected boolean writable

canPublish

protected boolean canPublish

develop

protected boolean develop

search

protected String search

pages

protected List<it.openutils.mgnlutils.el.MgnlPagingElFunctions.Page> pages

page

protected int page

searchResult

protected net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult searchResult
Constructor Detail

MediaFolderViewPage

public MediaFolderViewPage(String name,
                           javax.servlet.http.HttpServletRequest request,
                           javax.servlet.http.HttpServletResponse response)
Parameters:
name -
request -
response -
Method Detail

init

public void init()

Specified by:
init in interface info.magnolia.cms.servlets.MVCServletHandler
Overrides:
init in class info.magnolia.module.admininterface.PageMVCHandler

countMediaItems

protected int countMediaItems(MediaTypeConfiguration type)
Counts media items for the specified type.

Parameters:
type -
Returns:

findMediaItems

protected net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult findMediaItems()
Finds media items to show.

Returns:

show

public String show()

Overrides:
show in class info.magnolia.module.admininterface.PageMVCHandler

delete

public String delete()
delete a node

Returns:
view

move

public String move()
moves a node

Returns:
view

copy

public String copy()
copy a node

Returns:
view

copyMoveNode

public info.magnolia.cms.core.Content copyMoveNode(String source,
                                                   String destination,
                                                   boolean move)
                                            throws info.magnolia.cms.exchange.ExchangeException,
                                                   javax.jcr.RepositoryException
Copy or move a node (from AdminTreeMVCHandler)

Parameters:
source - source node
destination - destination folder
move - move or copy?
Returns:
new content
Throws:
info.magnolia.cms.exchange.ExchangeException - publication problem
javax.jcr.RepositoryException - repository exception

activate

public String activate()
Activates single media node

Returns:
view

deactivate

public String deactivate()
Deactivates single media node

Returns:
view

download

public String download()
Download media

Returns:
nothing, but attach downloadable file to response

getPath

public String getPath()
Returns the path.

Returns:
the path

getMedias

public Iterator<MediaBean> getMedias()
Returns the medias.

Returns:
the medias

setPath

public void setPath(String path)
Sets the path.

Parameters:
path - the path to set

getTypes

public Collection<MediaTypeConfiguration> getTypes()
Returns the types.

Returns:
the types

setTypes

public void setTypes(Collection<MediaTypeConfiguration> types)
Sets the types.

Parameters:
types - the types to set

getType

public String getType()
Returns the type.

Returns:
the type

setType

public void setType(String type)
Sets the type.

Parameters:
type - the type to set

getBgSelector

public String getBgSelector()
Returns the bgSelector.

Returns:
the bgSelector

getPagesizeSelector

public String getPagesizeSelector()
Returns the pagesizeSelector.

Returns:
the pagesizeSelector

getSorting

public String getSorting()
Returns the sorting.

Returns:
the sorting

isWritable

public boolean isWritable()
Returns the writable.

Returns:
the writable

setWritable

public void setWritable(boolean writable)
Sets the writable.

Parameters:
writable - the writable to set

isCanPublish

public boolean isCanPublish()
Returns the canPublish.

Returns:
the canPublish

setCanPublish

public void setCanPublish(boolean canPublish)
Sets the canPublish.

Parameters:
canPublish - the canPublish to set

getNode

public String getNode()
Returns the node.

Returns:
the node

setNode

public void setNode(String node)
Sets the node.

Parameters:
node - the node to set

getDest

public String getDest()
Returns the dest.

Returns:
the dest

setDest

public void setDest(String dest)
Sets the dest.

Parameters:
dest - the dest to set

isSelectMedia

public boolean isSelectMedia()
Returns the selectMedia.

Returns:
the selectMedia

setSelectMedia

public void setSelectMedia(boolean selectMedia)
Sets the selectMedia.

Parameters:
selectMedia - the selectMedia to set

getActMediaHandle

public String getActMediaHandle()
Returns the actMediaHandle.

Returns:
the actMediaHandle

setActMediaHandle

public void setActMediaHandle(String actMediaHandle)
Sets the actMediaHandle.

Parameters:
actMediaHandle - the actMediaHandle to set

getMediaType

public String getMediaType()
Returns the mediaType.

Returns:
the mediaType

setMediaType

public void setMediaType(String mediaType)
Sets the mediaType.

Parameters:
mediaType - the mediaType to set

getNumberOfMedia

public Map<String,Integer> getNumberOfMedia()
Returns the numberOfMedia.

Returns:
the numberOfMedia

setNumberOfMedia

public void setNumberOfMedia(Map<String,Integer> numberOfMedia)
Sets the numberOfMedia.

Parameters:
numberOfMedia - the numberOfMedia to set

isDevelop

public boolean isDevelop()
Returns the develop.

Returns:
the develop

setDevelop

public void setDevelop(boolean develop)
Sets the develop.

Parameters:
develop - the develop to set

getSearch

public String getSearch()
Returns the search.

Returns:
the search

setSearch

public void setSearch(String search)
Sets the search.

Parameters:
search - the search to set

getPages

public List<it.openutils.mgnlutils.el.MgnlPagingElFunctions.Page> getPages()
Returns the pages.

Returns:
the pages

getPage

public int getPage()
Returns the page.

Returns:
the page

setPage

public void setPage(int page)
Sets the page.

Parameters:
page - the page to set

getSearchResult

public net.sourceforge.openutils.mgnlcriteria.jcr.query.AdvancedResult getSearchResult()
Returns the searchResult.

Returns:
the searchResult

isSingleInstance

public boolean isSingleInstance()

getMessage

public String getMessage(String key,
                         String param)

currentQueryString

public String currentQueryString()
Obtains the query string to use for reloading the current page.
Unwanted parameters are removed.

Returns:

mediatabLink

public String mediatabLink(MediaTypeConfiguration type)
Builds the href for the media type link in the navigation bar.

Parameters:
type -
Returns:

getDefaultSorting

protected SortMode getDefaultSorting()

getModuleVersion

public String getModuleVersion()
Returns the installed media module version.

Returns:
version as string.


Copyright © 2008-2011 Openmind. All Rights Reserved.