Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.content.bean
Class ForwardLink  view ForwardLink download ForwardLink.java

java.lang.Object
  extended bycom.RuntimeCollective.content.bean.SimpleContent
      extended bycom.RuntimeCollective.content.bean.Link
          extended bycom.RuntimeCollective.content.bean.ForwardLink
All Implemented Interfaces:
Content, com.RuntimeCollective.webapps.bean.Duplicable, com.RuntimeCollective.webapps.bean.EntityBean, java.io.Serializable

public class ForwardLink
extends Link

The ForwardLink class implements the Link abstract class, using a URL.

For now, we cannot directly access the forwards defined in struts-config.xml. So all forwards used for ForwardLinks have to be copied into web.xml, as a param.FORWARDforwardname parameter. Sorry for the inconvenience.

HOW TO : add a new Static Link
------------------------------

Step 1 - creating in the database a new ForwardLink. See /se/datamodel/mssqlserver/Content-sedata-load.sql for examples. Just copy an example, and change the name of the struts Forward you will be using, and its display name.

Step 2 - in struts-config.xml, define the struts Forward used by the ForwardLink. There you'll specify the path to go to (eg: /admin/myStaticPage.jsp).

Step 3 - in web.xml (and web.xml.staging, web.xml.live), add a new parameter for this struts Forward, eg:

<init-param>
<param-name>param.FORWARDnavViewBoards</param-name>
<param-value>/viewBoards.jsp</param-value>
</init-param>

Version:
$Id: ForwardLink.java,v 1.11 2003/09/30 15:12:46 joe Exp $

Field Summary
static java.lang.String DATABASE_TABLE
          The name of the database table for this bean type.
protected  java.lang.String ForwardName
          The ForwardName
 
Fields inherited from class com.RuntimeCollective.content.bean.Link
AHREF, CLOSE_TAG, END_QUOTE, END_TAG, ExplanatoryText, FOLLOW_LINK, HTTP, IsTrackable, LinkText, NEW_TARGET, NumberOfHits, OpenInNewWindow, PAGE_ROOT
 
Fields inherited from class com.RuntimeCollective.content.bean.SimpleContent
Author_id, CreationDate, id, LastModifiedDate, LastModifierUser_id
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
INTERFACE_BEAN, NULL_ID
 
Constructor Summary
ForwardLink()
          Construct a new blank ForwardLink, giving it a new unique ID.
ForwardLink(int id)
          Get a ForwardLink from the database, given an id.
 
Method Summary
 void delete()
          Delete this ForwardLink from the database.
 java.lang.String getForwardName()
          Get the ForwardName
 java.net.URL getLinkURL()
          Get the LinkURL
 boolean isDisplayable()
          Is this link displayable, ie is it valid ?
 void save()
          Save this ForwardLink to the database.
 void setForwardName(java.lang.String forwardName)
          Set the ForwardName
 
Methods inherited from class com.RuntimeCollective.content.bean.Link
addHit, getDescription, getExplanatoryText, getIsTrackable, getLinkCloseTag, getLinkOpenTag, getLinkText, getNumberOfHits, getOpenInNewWindow, getTitle, isTrackable, setExplanatoryText, setIsTrackable, setLinkText, setNumberOfHits, setOpenInNewWindow, viewFormat
 
Methods inherited from class com.RuntimeCollective.content.bean.SimpleContent
customiseDuplicate, getAuthor, getCreationDate, getId, getLastModifiedDate, getLastModifierUser, makeDuplicate, makeDuplicate, setAuthor, setCreationDate, setDescription, setId, setLastModifiedDate, setLastModifierUser, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DATABASE_TABLE

public static final java.lang.String DATABASE_TABLE
The name of the database table for this bean type.

See Also:
Constant Field Values

ForwardName

protected java.lang.String ForwardName
The ForwardName

Constructor Detail

ForwardLink

public ForwardLink()
            throws java.sql.SQLException
Construct a new blank ForwardLink, giving it a new unique ID.


ForwardLink

public ForwardLink(int id)
            throws java.sql.SQLException
Get a ForwardLink from the database, given an id.

Method Detail

save

public void save()
          throws java.sql.SQLException
Save this ForwardLink to the database.

Specified by:
save in interface com.RuntimeCollective.webapps.bean.EntityBean
Overrides:
save in class Link

delete

public void delete()
            throws java.sql.SQLException
Delete this ForwardLink from the database.

Specified by:
delete in interface com.RuntimeCollective.webapps.bean.EntityBean
Overrides:
delete in class Link

isDisplayable

public boolean isDisplayable()
Is this link displayable, ie is it valid ?

Specified by:
isDisplayable in class Link

getLinkURL

public java.net.URL getLinkURL()
Get the LinkURL

Specified by:
getLinkURL in class Link

setForwardName

public void setForwardName(java.lang.String forwardName)
Set the ForwardName


getForwardName

public java.lang.String getForwardName()
Get the ForwardName