org.exoplatform.forum.common.webui.cssfile
Class CssClassManager

java.lang.Object
  extended by org.exoplatform.forum.common.webui.cssfile.CssClassManager
All Implemented Interfaces:
org.picocontainer.Startable

public class CssClassManager
extends Object
implements org.picocontainer.Startable


Nested Class Summary
static class CssClassManager.ICON_SIZE
           
 
Field Summary
static String DEFAULT_CSS_ICON_FILE
           
 
Constructor Summary
CssClassManager(org.exoplatform.container.xml.InitParams params)
           
 
Method Summary
 String getCSSClassByFileName(String fileName, CssClassManager.ICON_SIZE size)
          Returns the icon CSS class name of file.
 String getCSSClassByFileType(String fileType, CssClassManager.ICON_SIZE size)
          Returns the icon CSS class name of file.
 void initCssClassIconFile()
          Initialize icon CSS class of files by ComponentPlugin.
 void registerCssClassPlugin(CssClassPlugin classPlugin)
          Register ComponentPlugin for initialize icon CSS class of files.
 void start()
           
 void stop()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_CSS_ICON_FILE

public static final String DEFAULT_CSS_ICON_FILE
See Also:
Constant Field Values
Constructor Detail

CssClassManager

public CssClassManager(org.exoplatform.container.xml.InitParams params)
Method Detail

start

public void start()
Specified by:
start in interface org.picocontainer.Startable

stop

public void stop()
Specified by:
stop in interface org.picocontainer.Startable

registerCssClassPlugin

public void registerCssClassPlugin(CssClassPlugin classPlugin)
Register ComponentPlugin for initialize icon CSS class of files.

Parameters:
classPlugin -
Since:
4.0.1

initCssClassIconFile

public void initCssClassIconFile()
Initialize icon CSS class of files by ComponentPlugin.

Since:
4.0.1

getCSSClassByFileType

public String getCSSClassByFileType(String fileType,
                                    CssClassManager.ICON_SIZE size)
Returns the icon CSS class name of file.

Parameters:
fileType - - The file's type
size - - The size of icon, if it is null, the value default is 16x16
Returns:
Since:
4.0.1

getCSSClassByFileName

public String getCSSClassByFileName(String fileName,
                                    CssClassManager.ICON_SIZE size)
Returns the icon CSS class name of file.

Parameters:
fileName - - The name of file contain file extension
size - - The size of icon, if it is null, the value default is 16x16
Returns:
Since:
4.0.1


Copyright © 2003-2013 eXo Platform SAS. All Rights Reserved.