com.xpn.xwiki.render.macro.rss
Class RSSMacroParameters

java.lang.Object
  extended by com.xpn.xwiki.render.macro.rss.RSSMacroParameters

public class RSSMacroParameters
extends java.lang.Object

A simple bean which encapsulates macro parameters and does some logic, like making sure the feed property, a String is a well-formed URL, and evaluating the count property against a proposed number of items, in light of the possibility that count may not have been defined.

Version:
0.2d
Author:
Joe Germuska

Field Summary
private  java.lang.String align
           
private  int count
           
private  boolean css
           
static java.lang.String DEFAULT_ALIGNMENT
           
private  java.lang.String feed
           
private  java.net.URL feedURL
           
private  boolean full
           
private  boolean img
           
private  boolean search
           
static int UNDEFINED
           
 
Constructor Summary
RSSMacroParameters()
           
 
Method Summary
 int evalCount(int proposed)
          Given proposed items and the current value of our count property, how many items should be processed? If count is undefined or greater than proposed, return proposed, otherwise return count.
 java.lang.String getAlign()
           
 int getCount()
           
 java.lang.String getFeed()
           
 java.net.URL getFeedURL()
           
 boolean isCss()
           
 boolean isFull()
           
 boolean isImg()
           
 boolean isSearch()
           
 void setAlign(java.lang.String align)
           
 void setCount(int count)
           
 void setCss(boolean css)
           
 void setFeed(java.lang.String feed)
           
 void setFull(boolean full)
           
 void setImg(boolean img)
           
 void setSearch(boolean search)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT_ALIGNMENT

public static final java.lang.String DEFAULT_ALIGNMENT
See Also:
Constant Field Values

UNDEFINED

public static final int UNDEFINED
See Also:
Constant Field Values

feed

private java.lang.String feed

align

private java.lang.String align

img

private boolean img

css

private boolean css

count

private int count

feedURL

private java.net.URL feedURL

full

private boolean full

search

private boolean search
Constructor Detail

RSSMacroParameters

public RSSMacroParameters()
Method Detail

getFeed

public java.lang.String getFeed()

setFeed

public void setFeed(java.lang.String feed)
             throws java.net.MalformedURLException
Throws:
java.net.MalformedURLException

setAlign

public void setAlign(java.lang.String align)

getAlign

public java.lang.String getAlign()

setImg

public void setImg(boolean img)

isImg

public boolean isImg()

setCss

public void setCss(boolean css)

isCss

public boolean isCss()

setCount

public void setCount(int count)

getCount

public int getCount()

getFeedURL

public java.net.URL getFeedURL()

evalCount

public int evalCount(int proposed)
Given proposed items and the current value of our count property, how many items should be processed? If count is undefined or greater than proposed, return proposed, otherwise return count.

Parameters:
proposed -
Returns:

setFull

public void setFull(boolean full)

isFull

public boolean isFull()

setSearch

public void setSearch(boolean search)

isSearch

public boolean isSearch()


Copyright 2003 Ludovic Dubost