|
|||||||||
| Home >> All >> com >> RuntimeCollective >> questionnaire >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
com.RuntimeCollective.questionnaire.bean
Class QuestionnaireLink

java.lang.Objectcom.RuntimeCollective.content.bean.SimpleContent
com.RuntimeCollective.content.bean.Link
com.RuntimeCollective.questionnaire.bean.QuestionnaireLink
- All Implemented Interfaces:
- com.RuntimeCollective.content.bean.Content, com.RuntimeCollective.webapps.bean.Duplicable, com.RuntimeCollective.webapps.bean.EntityBean, java.io.Serializable
- public class QuestionnaireLink
- extends com.RuntimeCollective.content.bean.Link
The QuestionnaireLink class implements the abstract Link class, by linking to a Questionnaire.
NB: Saving a QuestionnaireLink doesn't save its Questionnaire, as that could provoke some infinite loop. So take care of saving the destination first.
If you want to be spared the hassle of writing JSPs for the creation of your QuestionnaireLink objects, do have a look at the pages written for the Sussex Enterprise project. You can find them by checking out the relevent project: "cvs co rsework", then look in rsework/web/admin.
The pages are called addQuestionnaireLinkXXX.jsp. They should be pretty self-explanatory. The rsework/struts-config.xml file is also worth checking, for the action mappings etc.
And while you're at it, why not vanilla them and copy them to questionnaire/web/admin ...
You can also check the Sussex Enterprise staging server (ask Fabrice, JoeH or Sophie).
- Version:
- $Id: QuestionnaireLink.java,v 1.11 2003/09/30 15:12:53 joe Exp $
| Field Summary | |
static java.lang.String |
DATABASE_TABLE
The name of the database table for this bean type. |
static java.lang.String |
HTTP
|
static java.lang.String |
PAGEROOT
|
protected int |
QuestionnaireId
Does this QuestionnaireLink link to a Questionnaire, and then which one ? |
static java.lang.String |
VIEWQUESTIONNAIRE
|
static java.lang.String |
VIEWQUESTIONNAIREPATHPARAM
|
| Fields inherited from class com.RuntimeCollective.content.bean.Link |
AHREF, CLOSE_TAG, END_QUOTE, END_TAG, ExplanatoryText, FOLLOW_LINK, 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 | |
QuestionnaireLink()
Construct a new blank QuestionnaireLink, giving it a new unique ID. |
|
QuestionnaireLink(int id)
Get a QuestionnaireLink from the database, given an id. |
|
| Method Summary | |
void |
delete()
Delete this QuestionnaireLink from the database. |
java.lang.String |
getLinkText()
Get the LinkText: for a QuestionnaireLink, this uses the Questionnaire's Name. |
java.net.URL |
getLinkURL()
Get the LinkURL: a link to viewPage or previewPage For plain users, you should check if the link is displayable before calling this. |
boolean |
getOpenInNewWindow()
Get the OpenInNewWindow: always no for QuestionnaireLink. |
Questionnaire |
getQuestionnaire()
Get the Questionnaire |
boolean |
isDisplayable()
Is this link displayable, ie is it valid ? |
void |
save()
Save this QuestionnaireLink to the database. |
void |
setQuestionnaire(Questionnaire questionnaire)
Set the Questionnaire |
| Methods inherited from class com.RuntimeCollective.content.bean.Link |
addHit, getDescription, getExplanatoryText, getIsTrackable, getLinkCloseTag, getLinkOpenTag, getNumberOfHits, 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
HTTP
public static final java.lang.String HTTP
- See Also:
- Constant Field Values
PAGEROOT
public static final java.lang.String PAGEROOT
- See Also:
- Constant Field Values
VIEWQUESTIONNAIRE
public static final java.lang.String VIEWQUESTIONNAIRE
- See Also:
- Constant Field Values
VIEWQUESTIONNAIREPATHPARAM
public static final java.lang.String VIEWQUESTIONNAIREPATHPARAM
- See Also:
- Constant Field Values
QuestionnaireId
protected int QuestionnaireId
- Does this QuestionnaireLink link to a Questionnaire, and then which one ?
| Constructor Detail |
QuestionnaireLink
public QuestionnaireLink()
throws java.sql.SQLException
- Construct a new blank QuestionnaireLink, giving it a new unique ID.
QuestionnaireLink
public QuestionnaireLink(int id)
throws java.sql.SQLException
- Get a QuestionnaireLink from the database, given an id.
| Method Detail |
save
public void save()
- Save this QuestionnaireLink to the database.
delete
public void delete()
- Delete this QuestionnaireLink from the database.
isDisplayable
public boolean isDisplayable()
- Is this link displayable, ie is it valid ?
getLinkURL
public java.net.URL getLinkURL()
- Get the LinkURL: a link to viewPage or previewPage
For plain users, you should check if the link is displayable before calling this.
getLinkText
public java.lang.String getLinkText()
- Get the LinkText: for a QuestionnaireLink, this uses the Questionnaire's Name.
getOpenInNewWindow
public boolean getOpenInNewWindow()
- Get the OpenInNewWindow: always no for QuestionnaireLink.
setQuestionnaire
public void setQuestionnaire(Questionnaire questionnaire)
- Set the Questionnaire
getQuestionnaire
public Questionnaire getQuestionnaire()
- Get the Questionnaire
|
|||||||||
| Home >> All >> com >> RuntimeCollective >> questionnaire >> [ bean overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC