org.dspace.app.webui.util
Class CollectionStyleSelection

java.lang.Object
  extended by org.dspace.app.webui.util.AKeyBasedStyleSelection
      extended by org.dspace.app.webui.util.CollectionStyleSelection
All Implemented Interfaces:
StyleSelection

public class CollectionStyleSelection
extends AKeyBasedStyleSelection

This is the standard (until 1.4.x) configuration mode based on owning collection handle Style name is case insensitive.

Version:
$Revision$
Author:
Andrea Bollini

Constructor Summary
CollectionStyleSelection()
           
 
Method Summary
 String getFromMap(String handle)
          Get the style associated with the handle from the in-memory map.
 String getStyleForItem(Item item)
          Get the style using the owning collection handle
 
Methods inherited from class org.dspace.app.webui.util.AKeyBasedStyleSelection
getConfigurationForStyle, isConfigurationDefinedForStyle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CollectionStyleSelection

public CollectionStyleSelection()
Method Detail

getStyleForItem

public String getStyleForItem(Item item)
                       throws SQLException
Get the style using the owning collection handle

Returns:
the style name to use for display simple metadata of the item
Throws:
SQLException

getFromMap

public String getFromMap(String handle)
Get the style associated with the handle from the in-memory map. If the map is not already initialized read it from dspace.cfg Check for the style configuration: return the default style if no configuration has found.

Parameters:
handle -
Returns:
the specific style or the default if not properly defined


Copyright © 2013 DuraSpace. All Rights Reserved.