com.silverpeas.look
Class SilverpeasLook

java.lang.Object
  extended by com.silverpeas.look.SilverpeasLook

public class SilverpeasLook
extends Object

It is a singleton that represents the current look of the running Silverpeas. Its single object provides an access to the different look of the widgets that compound Silverpeas.


Field Summary
static String DEFAULT_WALLPAPER_PROPERTY
          The property in which is defined the URL of the default wallpaper for the Silverpeas application.
static String SPACE_CSS
           
 
Method Summary
 String getCSSOfSpace(String spaceId)
          return the CSS URL of space with a specific CSS.
 String getCSSOfSpaceLook(String spaceId)
           
static SilverpeasLook getSilverpeasLook()
          Gets the look of Silverpeas.
 String getSpaceBasePath(String spaceId)
           
 String getSpaceLook(String spaceId)
           
 String getSpaceWithCSS(String spaceId)
          return the first space id with a specific CSS in path of given space This space can be the given space itself or one of its parents
 String getWallpaperOfSpace(String spaceId)
          Gets the wallpaper of the specified space.
 String getWallpaperOfSpaceOrDefaultOne(String spaceId)
          Gets the wallpaper of the specified space.
 boolean hasSpaceWallpaper(String spaceId)
          Is the specified space has a specific wallpaper?
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_WALLPAPER_PROPERTY

public static final String DEFAULT_WALLPAPER_PROPERTY
The property in which is defined the URL of the default wallpaper for the Silverpeas application. If this property is not set, then the SILVERPEAS_CONTEXT/admin/jsp/icons/silverpeasV5/bandeauTop.jpg is taken as the URL of the default wallpaper, with SILVERPEAS_CONTEXT the web context at which Silverpeas is deployed.

See Also:
Constant Field Values

SPACE_CSS

public static final String SPACE_CSS
See Also:
Constant Field Values
Method Detail

getSilverpeasLook

public static SilverpeasLook getSilverpeasLook()
Gets the look of Silverpeas.

Returns:
an instance representing the current look of the Silverpeas application.

hasSpaceWallpaper

public boolean hasSpaceWallpaper(String spaceId)
Is the specified space has a specific wallpaper?

Parameters:
spaceId - the unique identifier of the space. It shouldn't be null.
Returns:
true if a wallpaper is set specifically for the space, false otherwise.

getWallpaperOfSpace

public String getWallpaperOfSpace(String spaceId)
Gets the wallpaper of the specified space. The wallpaper of a space is either the path of an image specifically set for itself or, in the case it has no specific wallpaper set, the one of its closest parent space.

Parameters:
spaceId - the unique identifier of the space. The spaceId shouldn't be null.
Returns:
the URL of the wallpaper image or null if both no wallpaper is set for the specified space and for any of its parent spaces.

getWallpaperOfSpaceOrDefaultOne

public String getWallpaperOfSpaceOrDefaultOne(String spaceId)
Gets the wallpaper of the specified space. If the space or one of its parent have no specific wallpaper set, then returns the default one.

Parameters:
spaceId - the identifier of the space.
Returns:
the URL of the wallpaper image or the default one if the space or its parents have no wallpaper.
See Also:
getWallpaperOfSpace(java.lang.String)

getSpaceWithCSS

public String getSpaceWithCSS(String spaceId)
return the first space id with a specific CSS in path of given space This space can be the given space itself or one of its parents

Parameters:
spaceId -
Returns:
the first space id (from given space to root) with a specific CSS. If no space in path have got specific CSS, returns null.

getCSSOfSpace

public String getCSSOfSpace(String spaceId)
return the CSS URL of space with a specific CSS. This space can be the given space itself or one of its parents. It is this URL which must be applied to given space.

Parameters:
spaceId -
Returns:
the CSS URL of first space (from given space to root) with a specific CSS. If no space in path have got specific CSS, returns null.

getCSSOfSpaceLook

public String getCSSOfSpaceLook(String spaceId)

getSpaceLook

public String getSpaceLook(String spaceId)

getSpaceBasePath

public String getSpaceBasePath(String spaceId)


Copyright © 2016 Silverpeas. All Rights Reserved.