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

## net.sourceforge.pebble.logging
Class CountedUrl

    java.lang.Object
      net.sourceforge.pebble.logging.CountedUrl

Direct Known Subclasses:
  Referer, Request

    public abstract class CountedUrl

extends java.lang.Object

Represents a visited or referer URL along with a count of how many times that URL has been accessed/referred from.

Author:
  Simon Brown

Field Summary
`protected Blog` | `blog`
`static int` | `NAME_LENGTH_LIMIT` the maximum length of the name

Constructor Summary
`CountedUrl(java.lang.String url)` Creates a new CountedUrl representing the specified url.
`CountedUrl(java.lang.String url, Blog blog)` Creates a new CountedUrl representing the specified url.

Method Summary
`void` | `addLogEntry(LogEntry logEntry)` Adds a LogEntry.
`boolean` | `equals(java.lang.Object o)` Determines whether this object is equal to another.
`int` | `getCount()` Gets the count associated with this url.
`java.util.List<LogEntry>` | `getLogEntries()` Gets the list of log entries associated with this URL
`java.lang.String` | `getName()` Gets a name representation of the url.
`java.lang.String` | `getTruncatedName()` Gets a name representation of the url.
`java.lang.String` | `getUrl()` Gets the underlying url.
`int` | `hashCode()` Implementation of the hashCode() method.
`boolean` | `isFileDownload()`
`boolean` | `isNewsFeed()`
`boolean` | `isPageView()`
`void` | `setFileDownload(boolean fileDownload)`
`protected void` | `setName(java.lang.String name)` Sets the name.
`void` | `setNewsFeed(boolean newsFeed)`
`void` | `setPageView(boolean pageView)`
`protected void` | `setUrl(java.lang.String url)` Sets the underlying url.

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

Field Detail

### NAME_LENGTH_LIMIT

    public static final int NAME_LENGTH_LIMIT

  the maximum length of the name

  See Also:
    Constant Field Values

### blog

    protected Blog blog

Constructor Detail

### CountedUrl

    public CountedUrl(java.lang.String url)

  Creates a new CountedUrl representing the specified url.

  Parameters:
    `url` - the url as a String

### CountedUrl

    public CountedUrl(java.lang.String url,
                      Blog blog)

  Creates a new CountedUrl representing the specified url.

  Parameters:
    `url` - the url as a String

Method Detail

### getUrl

    public java.lang.String getUrl()

  Gets the underlying url.

  Returns:
    the url as a String

### setUrl

    protected void setUrl(java.lang.String url)

  Sets the underlying url.

  Parameters:
    `url` - the url as a String

### getName

    public java.lang.String getName()

  Gets a name representation of the url. This is just the url, but truncated to a maximum number of characters.

  Returns:
    a String

### setName

    protected void setName(java.lang.String name)

  Sets the name.

  Parameters:
    `name` - the name as a String

### getTruncatedName

    public java.lang.String getTruncatedName()

  Gets a name representation of the url. This is just the url, but truncated to a maximum number of characters.

  Returns:
    a String

### addLogEntry

    public void addLogEntry(LogEntry logEntry)

  Adds a LogEntry.

  Parameters:
    `logEntry` - a LogEntry instance

### getLogEntries

    public java.util.List<LogEntry> getLogEntries()

  Gets the list of log entries associated with this URL

  Returns:
    a List of LogEntry instances

### getCount

    public int getCount()

  Gets the count associated with this url.

  Returns:
    the count as an int

### hashCode

    public int hashCode()

  Implementation of the hashCode() method.

  Overrides:
    `hashCode` in class `java.lang.Object`
  Returns:
    the hashcode of the underlying url

### equals

    public boolean equals(java.lang.Object o)

  Determines whether this object is equal to another.

  Overrides:
    `equals` in class `java.lang.Object`
  Parameters:
    `o` - the object to test against
  Returns:
    true if the specified object is the same as this one (i.e. the underlying urls match, false otherwise

### isNewsFeed

    public boolean isNewsFeed()

### setNewsFeed

    public void setNewsFeed(boolean newsFeed)

### isPageView

    public boolean isPageView()

### setPageView

    public void setPageView(boolean pageView)

### isFileDownload

    public boolean isFileDownload()

### setFileDownload

    public void setFileDownload(boolean fileDownload)

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

Copyright © 2003-2006, Simon Brown. All Rights Reserved.