Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.jasig.portal.channels
Class CNumberGuess

    java.lang.Object
      org.jasig.portal.channels.CNumberGuess

All Implemented Interfaces:
  IChannel

    public class CNumberGuess

extends java.lang.Object
implements IChannel

A number guessing game which asks the user to enter a number within a certain range as determined by this channel's parameters.

Version:
  $Revision: 1.27.4.1 $
Author:
  Ken Weiner, kweiner@unicon.net

Field Summary
`private boolean` | `bFirstTime`
`private static java.lang.String` | `bundleLocation`
`private int` | `iAnswer`
`private int` | `iGuess`
`private int` | `iGuesses`
`private int` | `iMaxNum`
`private int` | `iMinNum`
`private static org.apache.commons.logging.Log` | `log`
`(package private) ChannelRuntimeData` | `runtimeData`
`private static java.lang.String` | `sslLocation`
`(package private) ChannelStaticData` | `staticData`

Constructor Summary
`CNumberGuess()` Constructs a CNumberGuess.

Method Summary
`private int` | `getRandomNumber(int min, int max)`
`ChannelRuntimeProperties` | `getRuntimeProperties()` Returns channel runtime properties
`void` | `receiveEvent(PortalEvent ev)` Processes layout-level events coming from the portal
`void` | `renderXML(org.xml.sax.ContentHandler out)` Output channel content to the portal
`void` | `setRuntimeData(ChannelRuntimeData rd)` Receives channel runtime data from the portal and processes actions passed to it.
`void` | `setStaticData(ChannelStaticData sd)` Receive static channel data from the portal

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### log

    private static final org.apache.commons.logging.Log log

### staticData

    ChannelStaticData staticData

### runtimeData

    ChannelRuntimeData runtimeData

### sslLocation

    private static final java.lang.String sslLocation

See Also:
  Constant Field Values

### bundleLocation

    private static final java.lang.String bundleLocation

See Also:
  Constant Field Values

### iMinNum

    private int iMinNum

### iMaxNum

    private int iMaxNum

### iGuess

    private int iGuess

### iGuesses

    private int iGuesses

### iAnswer

    private int iAnswer

### bFirstTime

    private boolean bFirstTime

Constructor Detail

### CNumberGuess

    public CNumberGuess()

  Constructs a CNumberGuess.

Method Detail

### getRuntimeProperties

    public ChannelRuntimeProperties getRuntimeProperties()

  Returns channel runtime properties

  Specified by:
    `getRuntimeProperties` in interface `IChannel`
  Returns:
    handle to runtime properties
  See Also:
    `ChannelRuntimeProperties`

### receiveEvent

    public void receiveEvent(PortalEvent ev)

  Processes layout-level events coming from the portal

  Specified by:
    `receiveEvent` in interface `IChannel`
  Parameters:
    `ev` - a portal layout event
  See Also:
    `PortalEvent`

### setStaticData

    public void setStaticData(ChannelStaticData sd)

  Receive static channel data from the portal

  Specified by:
    `setStaticData` in interface `IChannel`
  Parameters:
    `sd` - static channel data
  See Also:
    `ChannelStaticData`

### setRuntimeData

    public void setRuntimeData(ChannelRuntimeData rd)

  Receives channel runtime data from the portal and processes actions passed to it. The names of these parameters are entirely up to the channel.

  Specified by:
    `setRuntimeData` in interface `IChannel`
  Parameters:
    `rd` - handle to channel runtime data
  See Also:
    `ChannelRuntimeData`

### renderXML

    public void renderXML(org.xml.sax.ContentHandler out)
                   throws PortalException

  Output channel content to the portal

  Specified by:
    `renderXML` in interface `IChannel`
  Parameters:
    `out` - a sax document handler
  Throws:
    `PortalException`

### getRandomNumber

    private int getRandomNumber(int min,
                                int max)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD