org.jasig.portal.properties
Class CMissingProperties

java.lang.Object
  extended by org.jasig.portal.channels.CAbstractXslt
      extended by org.jasig.portal.properties.CMissingProperties
All Implemented Interfaces:
IChannel

public class CMissingProperties
extends CAbstractXslt

An IChannel for viewing the missing properties.

Since:
uPortal 2.5
Version:
$Revision: 1.1 $ $Date: 2005/04/30 20:08:13 $

Field Summary
static java.lang.String DEFAULT_XSL_URI
          By default, we use the XSLT 'MissingProperties.xsl' which will be found in the stylesheets subdirectory corresponding to the package of this CMissingProperties channel.
static java.lang.String XSL_PARAM_KEY
          "xslUri" is the name of the ChannelStaticData attribute that we will read and, if set to a non-null value, we will use its value as our XSLT URI.
 
Fields inherited from class org.jasig.portal.channels.CAbstractXslt
log
 
Constructor Summary
CMissingProperties()
           
 
Method Summary
protected  java.util.Map getStylesheetParams()
          This implementation returns null because we have no stylesheet parameters.
protected  org.w3c.dom.Document getXml()
          Get the Document we should feed to our XSLT.
protected  java.lang.String getXsltUri()
          This implementation reads and returns the ChannelStaticData attribute 'xsltUri'; if that attribute is not set we return the default value 'MissingProperties.xsl'.
 void receiveEvent(PortalEvent ev)
          Passes an outside event to a channel.
 
Methods inherited from class org.jasig.portal.channels.CAbstractXslt
getRuntimeData, getRuntimeProperties, getStaticData, renderXML, setRuntimeData, setStaticData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

XSL_PARAM_KEY

public static final java.lang.String XSL_PARAM_KEY
"xslUri" is the name of the ChannelStaticData attribute that we will read and, if set to a non-null value, we will use its value as our XSLT URI. If this ChannelStaticData attribute is not set, we will fall back on our default.

See Also:
Constant Field Values

DEFAULT_XSL_URI

public static final java.lang.String DEFAULT_XSL_URI
By default, we use the XSLT 'MissingProperties.xsl' which will be found in the stylesheets subdirectory corresponding to the package of this CMissingProperties channel.

See Also:
Constant Field Values
Constructor Detail

CMissingProperties

public CMissingProperties()
Method Detail

getXml

protected org.w3c.dom.Document getXml()
                               throws java.lang.Exception
Description copied from class: CAbstractXslt
Get the Document we should feed to our XSLT. This method is declared to throw Exception for maximum convenience of the developer extending this class. Such developers should catch or declare exceptions as appropriate to your needs. Just because you can throw Exception here doesn't mean you shouldn't, for example, fallback to a default XSLT URL when your cannot programmatically determine the URL of your XSLT. On the other hand, there's no reason for you to wrap SqlExceptions if you're not going to do anything other than what this abstract class does with them (logs them and wraps them in PortalExceptions). The method invoking this template method, renderXML(), is declared to throw PortalException by the IChannel API. Any PortalException or RuntimeException thrown by getXsltUri() will be thrown all the way out of the abstract class's renderXML() method. This approach ensures that developers extending this class retain control over what exceptions their implementions throw. Note that you can map particular exceptions to particular XML representations and thus particular CError displays as of uPortal 2.5. Exceptions that are neither RuntimeExceptions nor PortalExceptions thrown by this method will be logged and wrapped in PortalExceptions so that this channel will conform to the IChannel API. Implementations of this method should not return null. When this method returns null, renderXML() throws an IllegalStateException.

Specified by:
getXml in class CAbstractXslt
Returns:
the Document we should feed to our XSLT.
Throws:
java.lang.Exception - including PortalException or any RuntimeException on failure

getXsltUri

protected java.lang.String getXsltUri()
This implementation reads and returns the ChannelStaticData attribute 'xsltUri'; if that attribute is not set we return the default value 'MissingProperties.xsl'.

Specified by:
getXsltUri in class CAbstractXslt
Returns:
the ChannelStaticData attribute 'xsltUri' or 'MissingProperties.xsl' if the attribute was null.

getStylesheetParams

protected java.util.Map getStylesheetParams()
This implementation returns null because we have no stylesheet parameters.

Specified by:
getStylesheetParams in class CAbstractXslt
Returns:
null

receiveEvent

public void receiveEvent(PortalEvent ev)
Description copied from interface: IChannel
Passes an outside event to a channel. Events should normally come from the LayoutBean.

Parameters:
ev - PortalEvent object
See Also:
PortalEvent