org.norther.tammi.spray.template
Class DefaultSkinFilter

java.lang.Object
  extended by org.norther.tammi.core.base.Adaptee
      extended by org.norther.tammi.spray.filter.DefaultFilter
          extended by org.norther.tammi.spray.filter.DefaultKeyFilter
              extended by org.norther.tammi.spray.template.DefaultSkinFilter
All Implemented Interfaces:
Serializable, NotificationBroadcaster, NotificationEmitter, Filter, Manageable, MBeanDelegate, KeyFilter, SkinFilter

public class DefaultSkinFilter
extends DefaultKeyFilter
implements SkinFilter

A default implementation of SkinFilter.

Version:
$Id: DefaultSkinFilter.java,v 1.30 2010-03-30 16:01:26 cvsimp Exp $
Author:
Ilkka Priha
See Also:
Serialized Form

Field Summary
static String SKIN_KEY
          The default key for the skin.
 
Fields inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter
DEFAULT_KEY
 
Fields inherited from class org.norther.tammi.core.base.Adaptee
ADAPTEE_NOTIF_DESCRIPTION, ADAPTEE_NOTIFICATIONS
 
Constructor Summary
DefaultSkinFilter()
          Constructs a new filter.
DefaultSkinFilter(String key)
          Constructs a new filter with a key.
 
Method Summary
 void addDefaultBodyScripts(String[] urls)
          Adds more URLs of the default body scripts.
 void addDefaultHeadScripts(String[] urls)
          Adds more URLs of the default head scripts.
 void addDefaultStyleSheets(String[] urls)
          Adds more URLs of the default style sheets.
 void addSkinBodyScripts(String name, String[] urls)
          Adds more URLs of the body scripts of the specified skin.
 void addSkinHeadScripts(String name, String[] urls)
          Adds more URLs of the head scripts of the specified skin.
 boolean addSkinName(String name)
          Adds a named skin if absent.
 void addSkinNames(String[] names)
          Adds named skins if absent.
 void addSkinStyleSheets(String name, String[] urls)
          Adds more URLs of the style sheets of the specified skin.
 void clearDefaultBodyScripts()
          Clears all default body scripts.
 void clearDefaultHeadScripts()
          Clears all default head scripts.
 void clearDefaultStyleSheets()
          Clears all default style sheets.
 void clearSkinBodyScripts(String name)
          Clears all body scripts of the specified skin.
 void clearSkinHeadScripts(String name)
          Clears all head scripts of the specified skin.
 void clearSkins()
          Clears all skins.
 void clearSkinStyleSheets(String name)
          Clears all style sheets of the specified skin.
 boolean containsSkin(String name)
          Checks the named skin.
 void doFilter(ServletRequest request, ServletResponse response, FilterChain chain)
           
 Skin getCurrentSkin(ServletRequest request, ServletResponse response, FilterChain chain)
          Gets the current skin of the specified request.
 Object getDefaultAttribute(String attribute)
          Gets the named default page attribute.
 String getDefaultBaseName()
          Gets the default base name.
 String getDefaultBodyAttribute(String attribute)
          Gets the named default body attribute.
 String[] getDefaultBodyScripts()
          Gets the URLs of the default body scripts.
 String getDefaultDocType()
          Gets the default doctype.
 String getDefaultFormTheme()
          Gets the name of the default form theme.
 String[] getDefaultHeadScripts()
          Gets the URLs of the default head scripts.
 String getDefaultInlineBodyScript()
          Gets the default inline body script.
 String getDefaultInlineStyleSheet()
          Gets the default inline style sheet.
 String getDefaultLabel()
          Gets the default label.
 String getDefaultLink()
          Gets the default link.
 String getDefaultLogo()
          Gets the default logo.
 String getDefaultMetaElement(String attribute)
          Gets the named default meta element.
 Skin.Orientation getDefaultOrientation()
          Gets the default orientation.
 String getDefaultPluginAttribute(String attribute)
          Gets the named default plugin attribute.
 String getDefaultShortcutIcon()
          Gets the URL of the default shortcut icon.
 String getDefaultSkinName()
          Gets the name of the default skin.
 String[] getDefaultStyleSheets()
          Gets the URLs of the default style sheets.
 String getDefaultSubtitle()
          Gets the default subtitle.
 String getDefaultTitle()
          Gets the default title.
 String getDefaultXMLNs()
          Gets the default XML namespace.
 Skin getSkin(String name)
          Gets the named skin.
 Object getSkinAttribute(String name, String attribute)
          Gets the named attribute of the specified skin.
 String getSkinBaseName(String name)
          Gets the base name of the specified skin.
 String getSkinBodyAttribute(String name, String attribute)
          Gets the named body attribute of the specified skin.
 String[] getSkinBodyScripts(String name)
          Gets the URLs of the body scripts of the specified skin.
 String getSkinDefaultName(String name)
          Gets the default skin name of the specified skin.
 String getSkinDocType(String name)
          Gets the doctype of the specified skin.
 String getSkinFormTheme(String name)
          Gets the name of the form theme of the specified skin.
 String[] getSkinHeadScripts(String name)
          Gets the URLs of the head scripts of the specified skin.
 String getSkinInlineBodyScript(String name)
          Gets the inline body script of the specified skin.
 String getSkinInlineStyleSheet(String name)
          Gets the inline style sheet of the specified skin.
 String getSkinLabel(String name)
          Gets the label of the specified skin.
 String getSkinLink(String name)
          Gets the link of the specified skin.
 String getSkinLogo(String name)
          Gets the logo of the specified skin.
 String getSkinMetaElement(String name, String attribute)
          Gets the named meta element of the specified skin.
 Skin.Orientation getSkinOrientation(String name)
          Gets the orientation of the specified skin.
 String getSkinPluginAttribute(String name, String attribute)
          Gets the named plugin attribute of the specified skin.
 String getSkinShortcutIcon(String name)
          Gets the URL of the shortcut icon of the specified skin.
 String[] getSkinStyleSheets(String name)
          Gets the URLs of the style sheets of the specified skin.
 String getSkinSubtitle(String name)
          Gets the subtitle of the specified skin.
 String getSkinTitle(String name)
          Gets the title of the specified skin.
 String getSkinXMLNs(String name)
          Gets the XML namespace of the specified skin.
 boolean isLocalizedSkins()
          Checks whether skins are localized by default.
 boolean isSkinLocalized(String name)
          Checks whether the specified skin is localized.
 void removeSkin(String name)
          Removes the named skin.
 Skin resetCurrentSkin(ServletRequest request, ServletResponse response, FilterChain chain)
          Resets the current skin of the session of the specified request to the default skin.
 Skin resetCurrentSkin(String name, ServletRequest request, ServletResponse response, FilterChain chain)
          Resets the current skin of the session of the specified request to the named skin.
 Skin resolveCurrentSkin(String name, String... extension)
          Resolves the current skin for the given name and extension.
 void setDefaultAttribute(String attribute, Object value)
          Sets the named default page attribute.
 void setDefaultAttributes(Object[] attributes)
          Sets the named default page attributes as consecutive pairs of names and values.
 void setDefaultBaseName(String baseName)
          Sets the default base name.
 void setDefaultBodyAttribute(String attribute, String value)
          Sets the named default body attribute.
 void setDefaultBodyAttributes(String[] attributes)
          Sets the named deafult body attributes as consecutive pairs of names and values.
 void setDefaultBodyScripts(String[] urls)
          Sets the URLs of the default body scripts.
 void setDefaultDocType(String type)
          Sets the default doctype.
 void setDefaultFormTheme(String theme)
          Sets the name of the default form theme.
 void setDefaultHeadScripts(String[] urls)
          Sets the URLs of the default head scripts.
 void setDefaultInlineBodyScript(String script)
          Sets the default inline body script.
 void setDefaultInlineStyleSheet(String sheet)
          Sets the default inline style sheet.
 void setDefaultLabel(String label)
          Sets the default label.
 void setDefaultLink(String url)
          Sets the default link.
 void setDefaultLogo(String path)
          Sets the default logo.
 void setDefaultMetaElement(String attribute, String value)
          Sets the named default meta element.
 void setDefaultMetaElements(String[] attributes)
          Sets the named default meta elements as consecutive pairs of names and values.
 void setDefaultOrientation(Skin.Orientation o)
          Sets the default orientation.
 void setDefaultPluginAttribute(String attribute, String value)
          Sets the named default plugin attribute.
 void setDefaultPluginAttributes(String[] attributes)
          Sets the named default plugin attributes as consecutive pairs of names and values.
 void setDefaultShortcutIcon(String url)
          Sets the URL of the default shortcut icon.
 void setDefaultSkinName(String name)
          Sets the name of the default skin.
 void setDefaultStyleSheets(String[] urls)
          Sets the URLs of the default style sheets.
 void setDefaultSubtitle(String title)
          Sets the defaultsubtitle.
 void setDefaultTitle(String title)
          Sets the default title.
 void setDefaultXMLNs(String ns)
          Sets the default XML namespace.
 void setLocalizedSkins(boolean flag)
          Sets whether skins are localized by default.
 void setSkinAttribute(String name, String attribute, Object value)
          Sets the named attribute of the specified skin.
 void setSkinAttributes(String name, Object[] attributes)
          Sets the named attributes of the specified skin as consecutive pairs of names and values.
 void setSkinBaseName(String name, String baseName)
          Sets the base name of the specified skin.
 void setSkinBodyAttribute(String name, String attribute, String value)
          Sets the named body attribute of the specified skin.
 void setSkinBodyAttributes(String name, String[] attributes)
          Sets the named body attributes of the specified skin as consecutive pairs of names and values.
 void setSkinBodyScripts(String name, String[] urls)
          Sets the URLs of the body scripts of the specified skin.
 void setSkinDefaultName(String name, String dname)
          Sets the default skin name of the specified skin.
 void setSkinDocType(String name, String type)
          Sets the doctype of the specified skin.
 void setSkinFormTheme(String name, String form)
          Sets the name of the form theme of the specified skin.
 void setSkinHeadScripts(String name, String[] urls)
          Sets the URLs of the head scripts of the specified skin.
 void setSkinInlineBodyScript(String name, String script)
          Sets the inline body script of the specified skin.
 void setSkinInlineStyleSheet(String name, String sheet)
          Sets the inline style sheet of the specified skin.
 void setSkinLabel(String name, String label)
          Sets the label of the specified skin.
 void setSkinLink(String name, String url)
          Sets the link of the specified skin.
 void setSkinLocalized(String name, boolean flag)
          Sets whether the specified skin is localized.
 void setSkinLogo(String name, String path)
          Sets the logo of the specified skin.
 void setSkinMetaElement(String name, String attribute, String value)
          Sets the named meta element of the specified skin.
 void setSkinMetaElements(String name, String[] attributes)
          Sets the named meta elements of the specified skin as consecutive pairs of names and values.
 void setSkinName(String name)
          Sets or replaces a named skin.
 void setSkinNames(String[] names)
          Sets or replaces named skins.
 void setSkinOrientation(String name, Skin.Orientation o)
          Sets the orientation of the specified skin.
 void setSkinPluginAttribute(String name, String attribute, String value)
          Sets the named plugin attribute of the specified skin.
 void setSkinPluginAttributes(String name, String[] attributes)
          Sets the named plugin attributes of the specified skin as consecutive pairs of names and values.
 void setSkinShortcutIcon(String name, String url)
          Sets the URL of the shortcut icon of the specified skin.
 void setSkinStyleSheets(String name, String[] urls)
          Sets the URLs of the style sheets of the specified skin.
 void setSkinSubtitle(String name, String title)
          Sets the subtitle of the specified skin.
 void setSkinTitle(String name, String title)
          Sets the title of the specified skin.
 void setSkinXMLNs(String name, String ns)
          Sets the XML namespace of the specified skin.
 Set<String> skinNameSet()
          Returns a read-only set of skin names.
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultKeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from class org.norther.tammi.spray.filter.DefaultFilter
destroy, getFilterConfig, getRequestMap, getSessionMap, init
 
Methods inherited from class org.norther.tammi.core.base.Adaptee
addAdaptee, addNotificationListener, getAttributeSupport, getBroker, getCanonicalName, getDomain, getFactory, getLoader, getLog, getLog, getMBean, getMBeanServer, getNotificationInfo, getObjectName, getRegistrationTime, getSequenceNumber, hasListeners, isRegistered, postmanaged, premanaged, removeNotificationListener, removeNotificationListener, sendNotification, sendNotification, sendNotification, sendNotification, unmanaged, unregister
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.norther.tammi.spray.filter.KeyFilter
getKey, getKeyValue, getKeyValues, isLinkedKey, setKey, setLinkedKey
 
Methods inherited from interface javax.servlet.Filter
destroy, init
 

Field Detail

SKIN_KEY

public static final String SKIN_KEY
The default key for the skin.

See Also:
Constant Field Values
Constructor Detail

DefaultSkinFilter

public DefaultSkinFilter()
Constructs a new filter.


DefaultSkinFilter

public DefaultSkinFilter(String key)
Constructs a new filter with a key.

Parameters:
key - the filter key.
Method Detail

getDefaultSkinName

public String getDefaultSkinName()
Description copied from interface: SkinFilter
Gets the name of the default skin.

Specified by:
getDefaultSkinName in interface SkinFilter
Returns:
the name of the skin or null.

setDefaultSkinName

public void setDefaultSkinName(String name)
Description copied from interface: SkinFilter
Sets the name of the default skin.

Specified by:
setDefaultSkinName in interface SkinFilter
Parameters:
name - the name of the skin.

getDefaultLabel

public String getDefaultLabel()
Description copied from interface: SkinFilter
Gets the default label.

Specified by:
getDefaultLabel in interface SkinFilter
Returns:
the label.

setDefaultLabel

public void setDefaultLabel(String label)
Description copied from interface: SkinFilter
Sets the default label.

Specified by:
setDefaultLabel in interface SkinFilter
Parameters:
label - the label.

getDefaultFormTheme

public String getDefaultFormTheme()
Description copied from interface: SkinFilter
Gets the name of the default form theme.

Specified by:
getDefaultFormTheme in interface SkinFilter
Returns:
the name of the theme or null.

setDefaultFormTheme

public void setDefaultFormTheme(String theme)
Description copied from interface: SkinFilter
Sets the name of the default form theme.

Specified by:
setDefaultFormTheme in interface SkinFilter
Parameters:
theme - the name of the theme.

isLocalizedSkins

public boolean isLocalizedSkins()
Description copied from interface: SkinFilter
Checks whether skins are localized by default.

Specified by:
isLocalizedSkins in interface SkinFilter
Returns:
true if localized, false otherwise.

setLocalizedSkins

public void setLocalizedSkins(boolean flag)
Description copied from interface: SkinFilter
Sets whether skins are localized by default.

Specified by:
setLocalizedSkins in interface SkinFilter
Parameters:
flag - true if localized, false otherwise.

getDefaultBaseName

public String getDefaultBaseName()
Description copied from interface: SkinFilter
Gets the default base name.

Specified by:
getDefaultBaseName in interface SkinFilter
Returns:
the base name of the default bundle or null.

setDefaultBaseName

public void setDefaultBaseName(String baseName)
Description copied from interface: SkinFilter
Sets the default base name.

Specified by:
setDefaultBaseName in interface SkinFilter
Parameters:
baseName - the base name of the default bundle.

getDefaultDocType

public String getDefaultDocType()
Description copied from interface: SkinFilter
Gets the default doctype.

Specified by:
getDefaultDocType in interface SkinFilter
Returns:
the doctype or null.

setDefaultDocType

public void setDefaultDocType(String type)
Description copied from interface: SkinFilter
Sets the default doctype.

Specified by:
setDefaultDocType in interface SkinFilter
Parameters:
type - the doctype.

getDefaultLink

public String getDefaultLink()
Description copied from interface: SkinFilter
Gets the default link.

Specified by:
getDefaultLink in interface SkinFilter
Returns:
the URL of the link or null.

setDefaultLink

public void setDefaultLink(String url)
Description copied from interface: SkinFilter
Sets the default link.

Specified by:
setDefaultLink in interface SkinFilter
Parameters:
url - the URL of the link.

getDefaultLogo

public String getDefaultLogo()
Description copied from interface: SkinFilter
Gets the default logo.

Specified by:
getDefaultLogo in interface SkinFilter
Returns:
the path of the logo or null.

setDefaultLogo

public void setDefaultLogo(String path)
Description copied from interface: SkinFilter
Sets the default logo.

Specified by:
setDefaultLogo in interface SkinFilter
Parameters:
path - the path of the logo.

getDefaultTitle

public String getDefaultTitle()
Description copied from interface: SkinFilter
Gets the default title.

Specified by:
getDefaultTitle in interface SkinFilter
Returns:
the title or null.

setDefaultTitle

public void setDefaultTitle(String title)
Description copied from interface: SkinFilter
Sets the default title.

Specified by:
setDefaultTitle in interface SkinFilter
Parameters:
title - the title.

getDefaultSubtitle

public String getDefaultSubtitle()
Description copied from interface: SkinFilter
Gets the default subtitle.

Specified by:
getDefaultSubtitle in interface SkinFilter
Returns:
the subtitle or null.

setDefaultSubtitle

public void setDefaultSubtitle(String title)
Description copied from interface: SkinFilter
Sets the defaultsubtitle.

Specified by:
setDefaultSubtitle in interface SkinFilter
Parameters:
title - the subtitle.

getDefaultOrientation

public Skin.Orientation getDefaultOrientation()
Description copied from interface: SkinFilter
Gets the default orientation.

Specified by:
getDefaultOrientation in interface SkinFilter
Returns:
the orientation.

setDefaultOrientation

public void setDefaultOrientation(Skin.Orientation o)
Description copied from interface: SkinFilter
Sets the default orientation.

Specified by:
setDefaultOrientation in interface SkinFilter
Parameters:
o - the orientation.

getDefaultHeadScripts

public String[] getDefaultHeadScripts()
Description copied from interface: SkinFilter
Gets the URLs of the default head scripts.

Specified by:
getDefaultHeadScripts in interface SkinFilter
Returns:
the URLs of the head scripts or null.

setDefaultHeadScripts

public void setDefaultHeadScripts(String[] urls)
Description copied from interface: SkinFilter
Sets the URLs of the default head scripts. New scripts replace existing ones.

Specified by:
setDefaultHeadScripts in interface SkinFilter
Parameters:
urls - the URLs of the head scripts.

addDefaultHeadScripts

public void addDefaultHeadScripts(String[] urls)
Description copied from interface: SkinFilter
Adds more URLs of the default head scripts. New scripts are added to existing ones.

Specified by:
addDefaultHeadScripts in interface SkinFilter
Parameters:
urls - the URLs of the head scripts.

clearDefaultHeadScripts

public void clearDefaultHeadScripts()
Description copied from interface: SkinFilter
Clears all default head scripts.

Specified by:
clearDefaultHeadScripts in interface SkinFilter

getDefaultBodyScripts

public String[] getDefaultBodyScripts()
Description copied from interface: SkinFilter
Gets the URLs of the default body scripts.

Specified by:
getDefaultBodyScripts in interface SkinFilter
Returns:
the URLs of the body scripts or null.

setDefaultBodyScripts

public void setDefaultBodyScripts(String[] urls)
Description copied from interface: SkinFilter
Sets the URLs of the default body scripts. New scripts replace existing ones.

Specified by:
setDefaultBodyScripts in interface SkinFilter
Parameters:
urls - the URLs of the body scripts.

addDefaultBodyScripts

public void addDefaultBodyScripts(String[] urls)
Description copied from interface: SkinFilter
Adds more URLs of the default body scripts. New scripts are added to existing ones.

Specified by:
addDefaultBodyScripts in interface SkinFilter
Parameters:
urls - the URLs of the body scripts.

clearDefaultBodyScripts

public void clearDefaultBodyScripts()
Description copied from interface: SkinFilter
Clears all default body scripts.

Specified by:
clearDefaultBodyScripts in interface SkinFilter

getDefaultInlineBodyScript

public String getDefaultInlineBodyScript()
Description copied from interface: SkinFilter
Gets the default inline body script.

Specified by:
getDefaultInlineBodyScript in interface SkinFilter
Returns:
the inline body script or null.

setDefaultInlineBodyScript

public void setDefaultInlineBodyScript(String script)
Description copied from interface: SkinFilter
Sets the default inline body script.

Specified by:
setDefaultInlineBodyScript in interface SkinFilter
Parameters:
script - the inline body script.

getDefaultStyleSheets

public String[] getDefaultStyleSheets()
Description copied from interface: SkinFilter
Gets the URLs of the default style sheets.

Specified by:
getDefaultStyleSheets in interface SkinFilter
Returns:
the URLs of the style sheets or null.

setDefaultStyleSheets

public void setDefaultStyleSheets(String[] urls)
Description copied from interface: SkinFilter
Sets the URLs of the default style sheets. New styles replace existing ones.

Specified by:
setDefaultStyleSheets in interface SkinFilter
Parameters:
urls - the URLs of the style sheets.

addDefaultStyleSheets

public void addDefaultStyleSheets(String[] urls)
Description copied from interface: SkinFilter
Adds more URLs of the default style sheets. New styles are added to existing ones.

Specified by:
addDefaultStyleSheets in interface SkinFilter
Parameters:
urls - the URLs of the style sheets.

clearDefaultStyleSheets

public void clearDefaultStyleSheets()
Description copied from interface: SkinFilter
Clears all default style sheets.

Specified by:
clearDefaultStyleSheets in interface SkinFilter

getDefaultInlineStyleSheet

public String getDefaultInlineStyleSheet()
Description copied from interface: SkinFilter
Gets the default inline style sheet.

Specified by:
getDefaultInlineStyleSheet in interface SkinFilter
Returns:
the inline style sheet or null.

setDefaultInlineStyleSheet

public void setDefaultInlineStyleSheet(String sheet)
Description copied from interface: SkinFilter
Sets the default inline style sheet.

Specified by:
setDefaultInlineStyleSheet in interface SkinFilter
Parameters:
sheet - the inline style sheet.

getDefaultShortcutIcon

public String getDefaultShortcutIcon()
Description copied from interface: SkinFilter
Gets the URL of the default shortcut icon.

Specified by:
getDefaultShortcutIcon in interface SkinFilter
Returns:
the URL of the shortcut icon or null.

setDefaultShortcutIcon

public void setDefaultShortcutIcon(String url)
Description copied from interface: SkinFilter
Sets the URL of the default shortcut icon.

Specified by:
setDefaultShortcutIcon in interface SkinFilter
Parameters:
url - the URL of the shortcut icon.

getDefaultMetaElement

public String getDefaultMetaElement(String attribute)
Description copied from interface: SkinFilter
Gets the named default meta element.

Specified by:
getDefaultMetaElement in interface SkinFilter
Parameters:
attribute - the name of the attribute.
Returns:
the value of the attribute or null.

setDefaultMetaElement

public void setDefaultMetaElement(String attribute,
                                  String value)
Description copied from interface: SkinFilter
Sets the named default meta element.

Specified by:
setDefaultMetaElement in interface SkinFilter
Parameters:
attribute - the name of the attribute.
value - the value of the attribute.

setDefaultMetaElements

public void setDefaultMetaElements(String[] attributes)
Description copied from interface: SkinFilter
Sets the named default meta elements as consecutive pairs of names and values.

Specified by:
setDefaultMetaElements in interface SkinFilter
Parameters:
attributes - the names values of the attributes.

getDefaultBodyAttribute

public String getDefaultBodyAttribute(String attribute)
Description copied from interface: SkinFilter
Gets the named default body attribute.

Specified by:
getDefaultBodyAttribute in interface SkinFilter
Parameters:
attribute - the name of the attribute.
Returns:
the value of the attribute or null.

setDefaultBodyAttribute

public void setDefaultBodyAttribute(String attribute,
                                    String value)
Description copied from interface: SkinFilter
Sets the named default body attribute.

Specified by:
setDefaultBodyAttribute in interface SkinFilter
Parameters:
attribute - the name of the attribute.
value - the value of the attribute.

setDefaultBodyAttributes

public void setDefaultBodyAttributes(String[] attributes)
Description copied from interface: SkinFilter
Sets the named deafult body attributes as consecutive pairs of names and values.

Specified by:
setDefaultBodyAttributes in interface SkinFilter
Parameters:
attributes - the names values of the attributes.

getDefaultPluginAttribute

public String getDefaultPluginAttribute(String attribute)
Description copied from interface: SkinFilter
Gets the named default plugin attribute.

Specified by:
getDefaultPluginAttribute in interface SkinFilter
Parameters:
attribute - the name of the attribute.
Returns:
the value of the attribute or null.

setDefaultPluginAttribute

public void setDefaultPluginAttribute(String attribute,
                                      String value)
Description copied from interface: SkinFilter
Sets the named default plugin attribute.

Specified by:
setDefaultPluginAttribute in interface SkinFilter
Parameters:
attribute - the name of the attribute.
value - the value of the attribute.

setDefaultPluginAttributes

public void setDefaultPluginAttributes(String[] attributes)
Description copied from interface: SkinFilter
Sets the named default plugin attributes as consecutive pairs of names and values.

Specified by:
setDefaultPluginAttributes in interface SkinFilter
Parameters:
attributes - the names and values of the attributes.

getDefaultAttribute

public Object getDefaultAttribute(String attribute)
Description copied from interface: SkinFilter
Gets the named default page attribute.

Specified by:
getDefaultAttribute in interface SkinFilter
Parameters:
attribute - the name of the attribute.
Returns:
the value of the attribute or null.

setDefaultAttribute

public void setDefaultAttribute(String attribute,
                                Object value)
Description copied from interface: SkinFilter
Sets the named default page attribute.

Specified by:
setDefaultAttribute in interface SkinFilter
Parameters:
attribute - the name of the attribute.
value - the value of the attribute.

setDefaultAttributes

public void setDefaultAttributes(Object[] attributes)
Description copied from interface: SkinFilter
Sets the named default page attributes as consecutive pairs of names and values.

Specified by:
setDefaultAttributes in interface SkinFilter
Parameters:
attributes - the names and values of the attributes.

getDefaultXMLNs

public String getDefaultXMLNs()
Description copied from interface: SkinFilter
Gets the default XML namespace.

Specified by:
getDefaultXMLNs in interface SkinFilter
Returns:
the namespace or null.

setDefaultXMLNs

public void setDefaultXMLNs(String ns)
Description copied from interface: SkinFilter
Sets the default XML namespace.

Specified by:
setDefaultXMLNs in interface SkinFilter
Parameters:
ns - the namespace.

setSkinName

public void setSkinName(String name)
Description copied from interface: SkinFilter
Sets or replaces a named skin.

Specified by:
setSkinName in interface SkinFilter
Parameters:
name - the name of the skin.

addSkinName

public boolean addSkinName(String name)
Description copied from interface: SkinFilter
Adds a named skin if absent.

Specified by:
addSkinName in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
true id added, false otherwise.

setSkinNames

public void setSkinNames(String[] names)
Description copied from interface: SkinFilter
Sets or replaces named skins.

Specified by:
setSkinNames in interface SkinFilter
Parameters:
names - the names of the skins.

addSkinNames

public void addSkinNames(String[] names)
Description copied from interface: SkinFilter
Adds named skins if absent.

Specified by:
addSkinNames in interface SkinFilter
Parameters:
names - the names of the skins.

skinNameSet

public Set<String> skinNameSet()
Description copied from interface: SkinFilter
Returns a read-only set of skin names.

Specified by:
skinNameSet in interface SkinFilter
Returns:
a set of skin names.

removeSkin

public void removeSkin(String name)
Description copied from interface: SkinFilter
Removes the named skin.

Specified by:
removeSkin in interface SkinFilter
Parameters:
name - the name of the skin.

clearSkins

public void clearSkins()
Description copied from interface: SkinFilter
Clears all skins.

Specified by:
clearSkins in interface SkinFilter

getSkinLabel

public String getSkinLabel(String name)
Description copied from interface: SkinFilter
Gets the label of the specified skin.

Specified by:
getSkinLabel in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the label of the skin or null.

setSkinLabel

public void setSkinLabel(String name,
                         String label)
Description copied from interface: SkinFilter
Sets the label of the specified skin.

Specified by:
setSkinLabel in interface SkinFilter
Parameters:
name - the name of the skin.
label - the label of the skin.

getSkinDefaultName

public String getSkinDefaultName(String name)
Description copied from interface: SkinFilter
Gets the default skin name of the specified skin.

Specified by:
getSkinDefaultName in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the default skin name.

setSkinDefaultName

public void setSkinDefaultName(String name,
                               String dname)
Description copied from interface: SkinFilter
Sets the default skin name of the specified skin.

Specified by:
setSkinDefaultName in interface SkinFilter
Parameters:
name - the name of the skin.
dname - the default skin name.

getSkinFormTheme

public String getSkinFormTheme(String name)
Description copied from interface: SkinFilter
Gets the name of the form theme of the specified skin.

Specified by:
getSkinFormTheme in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the name of the theme or null.

setSkinFormTheme

public void setSkinFormTheme(String name,
                             String form)
Description copied from interface: SkinFilter
Sets the name of the form theme of the specified skin.

Specified by:
setSkinFormTheme in interface SkinFilter
Parameters:
name - the name of the skin.
form - the name of the theme.

isSkinLocalized

public boolean isSkinLocalized(String name)
Description copied from interface: SkinFilter
Checks whether the specified skin is localized.

Specified by:
isSkinLocalized in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the true if localized, false otherwise.

setSkinLocalized

public void setSkinLocalized(String name,
                             boolean flag)
Description copied from interface: SkinFilter
Sets whether the specified skin is localized.

Specified by:
setSkinLocalized in interface SkinFilter
Parameters:
name - the name of the skin.
flag - the true if localized, false otherwise.

getSkinBaseName

public String getSkinBaseName(String name)
Description copied from interface: SkinFilter
Gets the base name of the specified skin.

Specified by:
getSkinBaseName in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the base name or null.

setSkinBaseName

public void setSkinBaseName(String name,
                            String baseName)
Description copied from interface: SkinFilter
Sets the base name of the specified skin.

Specified by:
setSkinBaseName in interface SkinFilter
Parameters:
name - the name of the skin.
baseName - the base name.

getSkinDocType

public String getSkinDocType(String name)
Description copied from interface: SkinFilter
Gets the doctype of the specified skin.

Specified by:
getSkinDocType in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the doctype or null.

setSkinDocType

public void setSkinDocType(String name,
                           String type)
Description copied from interface: SkinFilter
Sets the doctype of the specified skin.

Specified by:
setSkinDocType in interface SkinFilter
Parameters:
name - the name of the skin.
type - the doctype.

getSkinLink

public String getSkinLink(String name)
Description copied from interface: SkinFilter
Gets the link of the specified skin.

Specified by:
getSkinLink in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the URL of the link or null.

setSkinLink

public void setSkinLink(String name,
                        String url)
Description copied from interface: SkinFilter
Sets the link of the specified skin.

Specified by:
setSkinLink in interface SkinFilter
Parameters:
name - the name of the skin.
url - the URL of the link.

getSkinLogo

public String getSkinLogo(String name)
Description copied from interface: SkinFilter
Gets the logo of the specified skin.

Specified by:
getSkinLogo in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the path ot the logo or null.

setSkinLogo

public void setSkinLogo(String name,
                        String path)
Description copied from interface: SkinFilter
Sets the logo of the specified skin.

Specified by:
setSkinLogo in interface SkinFilter
Parameters:
name - the name of the skin.
path - the path of the logo.

getSkinTitle

public String getSkinTitle(String name)
Description copied from interface: SkinFilter
Gets the title of the specified skin.

Specified by:
getSkinTitle in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the title or null.

setSkinTitle

public void setSkinTitle(String name,
                         String title)
Description copied from interface: SkinFilter
Sets the title of the specified skin.

Specified by:
setSkinTitle in interface SkinFilter
Parameters:
name - the name of the skin.
title - the title.

getSkinSubtitle

public String getSkinSubtitle(String name)
Description copied from interface: SkinFilter
Gets the subtitle of the specified skin.

Specified by:
getSkinSubtitle in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the subtitle or null.

setSkinSubtitle

public void setSkinSubtitle(String name,
                            String title)
Description copied from interface: SkinFilter
Sets the subtitle of the specified skin.

Specified by:
setSkinSubtitle in interface SkinFilter
Parameters:
name - the name of the skin.
title - the subtitle.

getSkinOrientation

public Skin.Orientation getSkinOrientation(String name)
Description copied from interface: SkinFilter
Gets the orientation of the specified skin.

Specified by:
getSkinOrientation in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the orientation.

setSkinOrientation

public void setSkinOrientation(String name,
                               Skin.Orientation o)
Description copied from interface: SkinFilter
Sets the orientation of the specified skin.

Specified by:
setSkinOrientation in interface SkinFilter
Parameters:
name - the name of the skin.
o - the orientation.

getSkinHeadScripts

public String[] getSkinHeadScripts(String name)
Description copied from interface: SkinFilter
Gets the URLs of the head scripts of the specified skin.

Specified by:
getSkinHeadScripts in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the URLs of the head scripts or null.

setSkinHeadScripts

public void setSkinHeadScripts(String name,
                               String[] urls)
Description copied from interface: SkinFilter
Sets the URLs of the head scripts of the specified skin.

Specified by:
setSkinHeadScripts in interface SkinFilter
Parameters:
name - the name of the skin.
urls - the URLs of the head scripts.

addSkinHeadScripts

public void addSkinHeadScripts(String name,
                               String[] urls)
Description copied from interface: SkinFilter
Adds more URLs of the head scripts of the specified skin.

Specified by:
addSkinHeadScripts in interface SkinFilter
Parameters:
name - the name of the skin.
urls - the URLs of the head scripts.

clearSkinHeadScripts

public void clearSkinHeadScripts(String name)
Description copied from interface: SkinFilter
Clears all head scripts of the specified skin.

Specified by:
clearSkinHeadScripts in interface SkinFilter
Parameters:
name - the name of the skin.

getSkinBodyScripts

public String[] getSkinBodyScripts(String name)
Description copied from interface: SkinFilter
Gets the URLs of the body scripts of the specified skin.

Specified by:
getSkinBodyScripts in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the URLs of the body scripts or null.

setSkinBodyScripts

public void setSkinBodyScripts(String name,
                               String[] urls)
Description copied from interface: SkinFilter
Sets the URLs of the body scripts of the specified skin.

Specified by:
setSkinBodyScripts in interface SkinFilter
Parameters:
name - the name of the skin.
urls - the URLs of the body scripts.

addSkinBodyScripts

public void addSkinBodyScripts(String name,
                               String[] urls)
Description copied from interface: SkinFilter
Adds more URLs of the body scripts of the specified skin.

Specified by:
addSkinBodyScripts in interface SkinFilter
Parameters:
name - the name of the skin.
urls - the URLs of the body scripts.

clearSkinBodyScripts

public void clearSkinBodyScripts(String name)
Description copied from interface: SkinFilter
Clears all body scripts of the specified skin.

Specified by:
clearSkinBodyScripts in interface SkinFilter
Parameters:
name - the name of the skin.

getSkinInlineBodyScript

public String getSkinInlineBodyScript(String name)
Description copied from interface: SkinFilter
Gets the inline body script of the specified skin.

Specified by:
getSkinInlineBodyScript in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the inline body script or null.

setSkinInlineBodyScript

public void setSkinInlineBodyScript(String name,
                                    String script)
Description copied from interface: SkinFilter
Sets the inline body script of the specified skin.

Specified by:
setSkinInlineBodyScript in interface SkinFilter
Parameters:
name - the name of the skin.
script - the inline body script.

getSkinStyleSheets

public String[] getSkinStyleSheets(String name)
Description copied from interface: SkinFilter
Gets the URLs of the style sheets of the specified skin.

Specified by:
getSkinStyleSheets in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the URLs of the style sheets or null.

setSkinStyleSheets

public void setSkinStyleSheets(String name,
                               String[] urls)
Description copied from interface: SkinFilter
Sets the URLs of the style sheets of the specified skin.

Specified by:
setSkinStyleSheets in interface SkinFilter
Parameters:
name - the name of the skin.
urls - the URLs of the style sheets.

addSkinStyleSheets

public void addSkinStyleSheets(String name,
                               String[] urls)
Description copied from interface: SkinFilter
Adds more URLs of the style sheets of the specified skin.

Specified by:
addSkinStyleSheets in interface SkinFilter
Parameters:
name - the name of the skin.
urls - the URLs of the style sheets.

clearSkinStyleSheets

public void clearSkinStyleSheets(String name)
Description copied from interface: SkinFilter
Clears all style sheets of the specified skin.

Specified by:
clearSkinStyleSheets in interface SkinFilter
Parameters:
name - the name of the skin.

getSkinInlineStyleSheet

public String getSkinInlineStyleSheet(String name)
Description copied from interface: SkinFilter
Gets the inline style sheet of the specified skin.

Specified by:
getSkinInlineStyleSheet in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the inline style sheet or null.

setSkinInlineStyleSheet

public void setSkinInlineStyleSheet(String name,
                                    String sheet)
Description copied from interface: SkinFilter
Sets the inline style sheet of the specified skin.

Specified by:
setSkinInlineStyleSheet in interface SkinFilter
Parameters:
name - the name of the skin.
sheet - the inline style sheet.

getSkinShortcutIcon

public String getSkinShortcutIcon(String name)
Description copied from interface: SkinFilter
Gets the URL of the shortcut icon of the specified skin.

Specified by:
getSkinShortcutIcon in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the URL of the shortcut icon or null.

setSkinShortcutIcon

public void setSkinShortcutIcon(String name,
                                String url)
Description copied from interface: SkinFilter
Sets the URL of the shortcut icon of the specified skin.

Specified by:
setSkinShortcutIcon in interface SkinFilter
Parameters:
name - the name of the skin.
url - the URL of the shortcut icon.

getSkinMetaElement

public String getSkinMetaElement(String name,
                                 String attribute)
Description copied from interface: SkinFilter
Gets the named meta element of the specified skin.

Specified by:
getSkinMetaElement in interface SkinFilter
Parameters:
name - the name of the skin.
attribute - the name of the attribute.
Returns:
the value of the attribute or null.

setSkinMetaElement

public void setSkinMetaElement(String name,
                               String attribute,
                               String value)
Description copied from interface: SkinFilter
Sets the named meta element of the specified skin.

Specified by:
setSkinMetaElement in interface SkinFilter
Parameters:
name - the name of the skin.
attribute - the name of the attribute.
value - the value of the attribute.

setSkinMetaElements

public void setSkinMetaElements(String name,
                                String[] attributes)
Description copied from interface: SkinFilter
Sets the named meta elements of the specified skin as consecutive pairs of names and values.

Specified by:
setSkinMetaElements in interface SkinFilter
Parameters:
name - the name of the skin.
attributes - the names values of the attributes.

getSkinBodyAttribute

public String getSkinBodyAttribute(String name,
                                   String attribute)
Description copied from interface: SkinFilter
Gets the named body attribute of the specified skin.

Specified by:
getSkinBodyAttribute in interface SkinFilter
Parameters:
name - the name of the skin.
attribute - the name of the attribute.
Returns:
the value of the attribute or null.

setSkinBodyAttribute

public void setSkinBodyAttribute(String name,
                                 String attribute,
                                 String value)
Description copied from interface: SkinFilter
Sets the named body attribute of the specified skin.

Specified by:
setSkinBodyAttribute in interface SkinFilter
Parameters:
name - the name of the skin.
attribute - the name of the attribute.
value - the value of the attribute.

setSkinBodyAttributes

public void setSkinBodyAttributes(String name,
                                  String[] attributes)
Description copied from interface: SkinFilter
Sets the named body attributes of the specified skin as consecutive pairs of names and values.

Specified by:
setSkinBodyAttributes in interface SkinFilter
Parameters:
name - the name of the skin.
attributes - the names values of the attributes.

getSkinPluginAttribute

public String getSkinPluginAttribute(String name,
                                     String attribute)
Description copied from interface: SkinFilter
Gets the named plugin attribute of the specified skin.

Specified by:
getSkinPluginAttribute in interface SkinFilter
Parameters:
name - the name of the skin.
attribute - the name of the attribute.
Returns:
the value of the attribute or null.

setSkinPluginAttribute

public void setSkinPluginAttribute(String name,
                                   String attribute,
                                   String value)
Description copied from interface: SkinFilter
Sets the named plugin attribute of the specified skin.

Specified by:
setSkinPluginAttribute in interface SkinFilter
Parameters:
name - the name of the skin.
attribute - the name of the attribute.
value - the value of the attribute.

setSkinPluginAttributes

public void setSkinPluginAttributes(String name,
                                    String[] attributes)
Description copied from interface: SkinFilter
Sets the named plugin attributes of the specified skin as consecutive pairs of names and values.

Specified by:
setSkinPluginAttributes in interface SkinFilter
Parameters:
name - the name of the skin.
attributes - the names values of the attributes.

getSkinAttribute

public Object getSkinAttribute(String name,
                               String attribute)
Description copied from interface: SkinFilter
Gets the named attribute of the specified skin.

Specified by:
getSkinAttribute in interface SkinFilter
Parameters:
name - the name of the skin.
attribute - the name of the attribute.
Returns:
the value of the attribute or null.

setSkinAttribute

public void setSkinAttribute(String name,
                             String attribute,
                             Object value)
Description copied from interface: SkinFilter
Sets the named attribute of the specified skin.

Specified by:
setSkinAttribute in interface SkinFilter
Parameters:
name - the name of the skin.
attribute - the name of the attribute.
value - the value of the attribute.

setSkinAttributes

public void setSkinAttributes(String name,
                              Object[] attributes)
Description copied from interface: SkinFilter
Sets the named attributes of the specified skin as consecutive pairs of names and values.

Specified by:
setSkinAttributes in interface SkinFilter
Parameters:
name - the name of the skin.
attributes - the names values of the attributes.

getSkinXMLNs

public String getSkinXMLNs(String name)
Description copied from interface: SkinFilter
Gets the XML namespace of the specified skin.

Specified by:
getSkinXMLNs in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
the namespace or null.

setSkinXMLNs

public void setSkinXMLNs(String name,
                         String ns)
Description copied from interface: SkinFilter
Sets the XML namespace of the specified skin.

Specified by:
setSkinXMLNs in interface SkinFilter
Parameters:
name - the name of the skin.
ns - the namespace.

getSkin

public Skin getSkin(String name)
Description copied from interface: SkinFilter
Gets the named skin.

Specified by:
getSkin in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
a clone of the named skin or null.

containsSkin

public boolean containsSkin(String name)
Description copied from interface: SkinFilter
Checks the named skin.

Specified by:
containsSkin in interface SkinFilter
Parameters:
name - the name of the skin.
Returns:
true if the skin exists, false otherwise.

resolveCurrentSkin

public Skin resolveCurrentSkin(String name,
                               String... extension)
Description copied from interface: SkinFilter
Resolves the current skin for the given name and extension.

Specified by:
resolveCurrentSkin in interface SkinFilter
Parameters:
name - the name of the skin.
extension - the extension of the skin.
Returns:
the current skin or null if named skin is not defined.

getCurrentSkin

public Skin getCurrentSkin(ServletRequest request,
                           ServletResponse response,
                           FilterChain chain)
Description copied from interface: SkinFilter
Gets the current skin of the specified request.

Specified by:
getCurrentSkin in interface SkinFilter
Parameters:
request - the servlet request.
response - the servlet response.
chain - the filter chain
Returns:
the current skin.

resetCurrentSkin

public Skin resetCurrentSkin(ServletRequest request,
                             ServletResponse response,
                             FilterChain chain)
Description copied from interface: SkinFilter
Resets the current skin of the session of the specified request to the default skin.

Specified by:
resetCurrentSkin in interface SkinFilter
Parameters:
request - the servlet request.
response - the servlet response.
chain - the filter chain
Returns:
the reset skin.

resetCurrentSkin

public Skin resetCurrentSkin(String name,
                             ServletRequest request,
                             ServletResponse response,
                             FilterChain chain)
Description copied from interface: SkinFilter
Resets the current skin of the session of the specified request to the named skin.

Specified by:
resetCurrentSkin in interface SkinFilter
Parameters:
name - the name of the skin.
request - the servlet request.
response - the servlet response.
chain - the filter chain
Returns:
the reset skin.

doFilter

public void doFilter(ServletRequest request,
                     ServletResponse response,
                     FilterChain chain)
              throws ServletException,
                     IOException
Specified by:
doFilter in interface Filter
Overrides:
doFilter in class DefaultFilter
Throws:
ServletException
IOException


Copyright © 2004 The Norther Organization. All rights reserved.