org.milyn.css
Class CSSAccessor

java.lang.Object
  extended by org.milyn.css.CSSAccessor

public class CSSAccessor
extends Object

Page CSS accessor class.

Transformation Units use this class to access CSS information for the current page. The CSS info is "pre-gathered" by the CSSStyleScraper Assembly Unit, if configured for the requesting device.

This class is instanciated via the getInstance(ExecutionContext) factory method.

Author:
tfennelly

Method Summary
static CSSAccessor getInstance(ExecutionContext request)
          CSSAccessor Factory method.
 CSSProperty getProperty(Element domElement, String propertyName)
          Get the named CSS property for the supplied DOM element, if one exists.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CSSAccessor getInstance(ExecutionContext request)
CSSAccessor Factory method.

Parameters:
request - The container request associated with the current page being delivered.
Returns:
The CSSAccessor associated with the supplied request.

getProperty

public CSSProperty getProperty(Element domElement,
                               String propertyName)
Get the named CSS property for the supplied DOM element, if one exists.

Cross references the rules media list (if specified) against the requesting browser/device name and profile.

Parameters:
domElement - The DOM element.
propertyName - The required CSS property.
Returns:
The CSSProperty associated with the named CSS property for the supplied element, if a value for this property is defined for this element, otherwise null.


Copyright © 2008. All Rights Reserved.