com.arsdigita.portalserver
Class Theme

java.lang.Object
  extended bycom.arsdigita.domain.DomainObject
      extended bycom.arsdigita.domain.ObservableDomainObject
          extended bycom.arsdigita.kernel.ACSObject
              extended bycom.arsdigita.portalserver.Theme
All Implemented Interfaces:
Themes

public class Theme
extends com.arsdigita.kernel.ACSObject
implements Themes

A theme. - A theme is a collection of color choices and (possibly) images that style a Portal. A theme is inherently tied to to the underlying design of the portal page; for example, a theme that stores and sets a color for a context bar is only useful if the design of the Portal that uses such a theme has, in fact, a context bar.

A particular portal design/layout is made up of components such as context bar, colored horizontal rules, tabbed panes...etc. which we refer to as a skin. A skin can have a theme applied to it, which renders components with desired colors, fonts, and background images. This Theme class is for enhancing the default skin that ships with Portal Server.

If a developer desires to create their own Portal design or skin, then the following files would be need to be implemented:

This class provides setters and getters for all of the elements in the default Portal Server skin, plus a method that builds a block of CSS tags that are inserted into the output stream and used to override default choices for the default skin.

Author:
Jim Parsons

Field Summary
static String BASE_DATA_OBJECT_TYPE
          The type of the DataObject that stands behind this DomainObject.
 
Fields inherited from class com.arsdigita.kernel.ACSObject
CONTAINER, DEFAULT_DOMAIN_CLASS, DISPLAY_NAME, ID, OBJECT_TYPE, versionId
 
Constructor Summary
Theme(com.arsdigita.persistence.DataObject dataObject)
           
Theme(String name)
           
 
Method Summary
protected  void afterSave()
           
 StringBuffer buildStyleBlock()
          Generates a stringbuffer describing the parameters for the implementing Theme Object.
 String getActiveTabColor()
           
 String getActiveTabTextColor()
           
protected  String getBaseDataObjectType()
           
 String getBodyTextColor()
           
 String getBottomRuleColor()
           
 String getContextBarColor()
           
 String getContextBarTextColor()
           
 String getDescription()
          Get the Description of this Theme.
 String getInactiveTabColor()
           
 String getInactiveTabTextColor()
           
 String getName()
          Get the title of this Theme.
 String getNarrowBGColor()
           
 String getPageBGColor()
           
 String getPageBGImage()
           
 String getPortletBorderColor()
           
 String getPortletBorderStyle()
           
 String getPortletHeaderColor()
           
 String getPortletHeaderTextColor()
           
 String getPortletIconColor()
           
 String getTopRuleColor()
           
static ThemeCollection retrieveAllThemes()
           
static Theme retrieveTheme(BigDecimal themeID)
          Retrieve an existing Theme based on an ID.
static Theme retrieveTheme(com.arsdigita.persistence.DataObject dataObject)
          Retrieve an existing Theme based on a data object.
static Theme retrieveTheme(com.arsdigita.persistence.OID oid)
          Retrieve an existing Theme based on an OID.
 void setActiveTabColor(String color)
           
 void setActiveTabTextColor(String color)
           
 void setBodyTextColor(String color)
           
 void setBottomRuleColor(String color)
           
 void setContextBarColor(String color)
           
 void setContextBarTextColor(String color)
           
 void setDescription(String desc)
          Set the description for this Theme.
 void setInactiveTabColor(String color)
           
 void setInactiveTabTextColor(String color)
           
 void setName(String name)
          Set the title of this Theme.
 void setNarrowBGColor(String color)
           
 void setPageBGColor(String color)
           
 void setPageBGImage(String url)
           
 void setPortletBorderColor(String color)
           
 void setPortletBorderStyle(String style)
           
 void setPortletHeaderColor(String color)
           
 void setPortletHeaderTextColor(String color)
           
 void setPortletIconColor(String color)
           
 void setTopRuleColor(String color)
           
 
Methods inherited from class com.arsdigita.kernel.ACSObject
assertPrivilege, beforeSave, checkPrivilege, doCreateCheck, doWriteCheck, getContainer, getDefaultDomainClass, getDisplayName, getID, getSpecificObjectType, getSpecificOID, gimmeContainer, initialize, isContainerModified, setID, setID
 
Methods inherited from class com.arsdigita.domain.ObservableDomainObject
addObserver, getObservers
 
Methods inherited from class com.arsdigita.domain.DomainObject
add, add, addToAssociation, afterDelete, beforeDelete, clear, delete, disconnect, equals, get, getObjectType, getOID, getSession, hashCode, isDeleted, isDisconnected, isModified, isNew, isPropertyModified, isValid, remove, remove, remove, removeFromAssociation, save, set, setAssociation, setAssociation, specializeDataObject, specializeDataObject, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

BASE_DATA_OBJECT_TYPE

public static final String BASE_DATA_OBJECT_TYPE
The type of the DataObject that stands behind this DomainObject.

See Also:
Constant Field Values
Constructor Detail

Theme

public Theme(com.arsdigita.persistence.DataObject dataObject)

Theme

public Theme(String name)
Method Detail

getBaseDataObjectType

protected String getBaseDataObjectType()

retrieveTheme

public static Theme retrieveTheme(BigDecimal themeID)
Retrieve an existing Theme based on an ID.


retrieveTheme

public static Theme retrieveTheme(com.arsdigita.persistence.DataObject dataObject)
Retrieve an existing Theme based on a data object.

Parameters:
dataObject - the data object of the Theme to retrieve.
Returns:
an existing Theme. Note that the return value may be null if no Theme data object for this ID exists.

retrieveTheme

public static Theme retrieveTheme(com.arsdigita.persistence.OID oid)
Retrieve an existing Theme based on an OID.

Parameters:
oid - the OID of the Theme to retrieve.

retrieveAllThemes

public static ThemeCollection retrieveAllThemes()

getName

public String getName()
Get the title of this Theme.

Returns:
this Themes title.

setName

public void setName(String name)
Set the title of this Theme.


getDescription

public String getDescription()
Get the Description of this Theme.


setDescription

public void setDescription(String desc)
Set the description for this Theme.


setContextBarColor

public void setContextBarColor(String color)

getContextBarColor

public String getContextBarColor()

setContextBarTextColor

public void setContextBarTextColor(String color)

getContextBarTextColor

public String getContextBarTextColor()

setActiveTabColor

public void setActiveTabColor(String color)

getActiveTabColor

public String getActiveTabColor()

setInactiveTabColor

public void setInactiveTabColor(String color)

getInactiveTabColor

public String getInactiveTabColor()

setActiveTabTextColor

public void setActiveTabTextColor(String color)

getActiveTabTextColor

public String getActiveTabTextColor()

setInactiveTabTextColor

public void setInactiveTabTextColor(String color)

getInactiveTabTextColor

public String getInactiveTabTextColor()

setTopRuleColor

public void setTopRuleColor(String color)

getTopRuleColor

public String getTopRuleColor()

setBottomRuleColor

public void setBottomRuleColor(String color)

getBottomRuleColor

public String getBottomRuleColor()

setPortletHeaderColor

public void setPortletHeaderColor(String color)

getPortletHeaderColor

public String getPortletHeaderColor()

setPortletIconColor

public void setPortletIconColor(String color)

getPortletIconColor

public String getPortletIconColor()

setPortletBorderColor

public void setPortletBorderColor(String color)

getPortletBorderColor

public String getPortletBorderColor()

setPortletBorderStyle

public void setPortletBorderStyle(String style)

getPortletBorderStyle

public String getPortletBorderStyle()

setPortletHeaderTextColor

public void setPortletHeaderTextColor(String color)

getPortletHeaderTextColor

public String getPortletHeaderTextColor()

setPageBGColor

public void setPageBGColor(String color)

getPageBGColor

public String getPageBGColor()

setPageBGImage

public void setPageBGImage(String url)

getPageBGImage

public String getPageBGImage()

setNarrowBGColor

public void setNarrowBGColor(String color)

getNarrowBGColor

public String getNarrowBGColor()

setBodyTextColor

public void setBodyTextColor(String color)

getBodyTextColor

public String getBodyTextColor()

afterSave

protected void afterSave()

buildStyleBlock

public StringBuffer buildStyleBlock()
Description copied from interface: Themes
Generates a stringbuffer describing the parameters for the implementing Theme Object. See the documentation at Theme for an explanation of building and using Themes.

Specified by:
buildStyleBlock in interface Themes


Copyright (c) 2004 Red Hat, Inc. Corporation. All Rights Reserved. Generated at July 19 2004:2343 UTC