org.apache.jetspeed.util.template
Class BaseJetspeedLink

java.lang.Object
  extended byorg.apache.jetspeed.util.template.BaseJetspeedLink
All Implemented Interfaces:
org.apache.turbine.services.pull.ApplicationTool, JetspeedLink

public class BaseJetspeedLink
extends java.lang.Object
implements org.apache.turbine.services.pull.ApplicationTool, JetspeedLink

A customized version of the TemplateLink which can handle portlet references.

It is inserted into the template context by Turbine, via request tools.

Each portlet must call setPortlet(this) on it before entering the template rendering code. This is done currently in VelocityPortlet.

Version:
$Id: BaseJetspeedLink.java,v 1.24 2004/08/18 01:19:21 taylor Exp $
Author:
Paul Spencer

Field Summary
protected  Portlet activePortlet
          The portlet that will be used to build the reference.
protected  JetspeedRunData rundata
          Request to which we refer.
 
Fields inherited from interface org.apache.jetspeed.util.template.JetspeedLink
CURRENT, DEFAULT, GROUP, PANE_ID, PANE_NAME, PORTLET_ID, PORTLET_ID_QUERY, PORTLET_NAME, ROLE, USER
 
Constructor Summary
BaseJetspeedLink()
          Empty constructor.for introspection
BaseJetspeedLink(org.apache.turbine.util.RunData data)
          Constructor required by ApplicationTool interface
 
Method Summary
 org.apache.turbine.util.DynamicURI addPathInfo(java.lang.String name, java.lang.Object value)
          Adds a name=value pair to the path_info string.
 org.apache.turbine.util.DynamicURI addQueryData(java.lang.String name, java.lang.Object value)
          Adds a name=value pair to the query string.
 org.apache.turbine.util.DynamicURI getAction(java.lang.String action)
          Return a link that includes an action
 org.apache.turbine.util.DynamicURI getAction(java.lang.String action, Entry entry)
          Return a link that includes an action to a specific portlet, as defined by an entry
 org.apache.turbine.util.DynamicURI getAction(java.lang.String action, Portlet portlet)
          Return a link that includes an action to a specific portlet
 org.apache.turbine.util.DynamicURI getAction(java.lang.String action, Portlets portlets)
          Return a link that includes an action to a specific portlet, as defined by a portlets
 org.apache.turbine.util.DynamicURI getAction(java.lang.String action, java.lang.String peid)
          Return a link that includes an action to a specific portlet, as defined by a PEID
 java.lang.String getActionKey()
          Return the action key.
 boolean getAnonymous()
          Is the PSML for the anonymous user?
 java.lang.String getCountry()
          Return country of the PSML file
static int getCURRENT()
          The following methods used by Velocity to get value of constants
static java.lang.String getDEFAULT_PAGE()
           
static int getDEFAULT()
           
static int getGROUP()
           
 org.apache.turbine.util.DynamicURI getGroup(java.lang.String group)
          Return a link to a default page for the group
 org.apache.turbine.util.DynamicURI getGroup(java.lang.String group, java.lang.String page)
          Return a link to a desired page for the group
 java.lang.String getGroupName()
          Return Group name of the PSML file
 org.apache.turbine.util.DynamicURI getHomePage()
          Return link to the home page without user, page, group, role, template, action, media type, language, or country in link.
 java.lang.String getLanguage()
          Return Language of the PSML file
 org.apache.turbine.util.DynamicURI getLink(int rootType, java.lang.String rootValue, java.lang.String pageName, int elementType, java.lang.String elementValue)
           
 org.apache.turbine.util.DynamicURI getLink(int rootType, java.lang.String rootValue, java.lang.String pageName, int elementType, java.lang.String elementValue, java.lang.String actionName)
           
 org.apache.turbine.util.DynamicURI getLink(int rootType, java.lang.String rootValue, java.lang.String pageName, int elementType, java.lang.String elementValue, java.lang.String actionName, java.lang.String templateName)
           
 org.apache.turbine.util.DynamicURI getLink(int rootType, java.lang.String rootValue, java.lang.String pageName, int elementType, java.lang.String elementValue, java.lang.String actionName, java.lang.String templateName, java.lang.String mediaType)
           
 org.apache.turbine.util.DynamicURI getLink(int rootType, java.lang.String rootValue, java.lang.String pageName, int elementType, java.lang.String elementValue, java.lang.String actionName, java.lang.String templateName, java.lang.String mediaType, java.lang.String language)
           
 org.apache.turbine.util.DynamicURI getLink(int rootType, java.lang.String rootValue, java.lang.String pageName, int elementType, java.lang.String elementValue, java.lang.String actionName, java.lang.String templateName, java.lang.String mediaType, java.lang.String language, java.lang.String country)
          Return a link to a desired page.
 java.lang.String getMediaType()
          Return Media Type of the PSML file
 org.apache.turbine.util.DynamicURI getPage()
          Return a link to a default page for the current user, group, or role.
 org.apache.turbine.util.DynamicURI getPage(java.lang.String page)
          Return a link to a desired page for the current user, group, or role.
 org.apache.turbine.util.DynamicURI getPage(java.lang.String page, java.lang.String paneName)
          Return a link to a desired page and pane for the current user, group, or role.
 java.lang.String getPageName()
          Return Page name of the PSML file
static int getPANE_ID()
           
static int getPANE_NAME()
           
 org.apache.turbine.util.DynamicURI getPaneById(java.lang.String paneId)
          Return a link to a specific pane using the pane's id
 org.apache.turbine.util.DynamicURI getPaneByName(java.lang.String paneName)
          Return a link to a specific pane using the pane's id
static int getPORTLET_ID()
           
static int getPORTLET_NAME()
           
 org.apache.turbine.util.DynamicURI getPortletById(java.lang.String peid)
          Return an link to a specific portlet using the portet's id
 org.apache.turbine.util.DynamicURI getPortletByName(java.lang.String portletName)
          Add a portlet reference in the link.
static int getROLE()
           
 org.apache.turbine.util.DynamicURI getRole(java.lang.String role)
          Return a link to a default page for the role
 org.apache.turbine.util.DynamicURI getRole(java.lang.String role, java.lang.String page)
          Return a link to a desired page for the role
 java.lang.String getRoleName()
          Return Role name of the PSML file
protected  org.apache.turbine.util.DynamicURI getRoot()
          Return a link to the root portlet or pane
 org.apache.turbine.util.DynamicURI getTemplate()
          Return a link that includes the template from rundata
 org.apache.turbine.util.DynamicURI getTemplate(java.lang.String template)
          Return a link to the template.
static int getUSER()
           
 org.apache.turbine.util.DynamicURI getUser(java.lang.String user)
          Return a link to a default page for the user
 org.apache.turbine.util.DynamicURI getUser(java.lang.String user, java.lang.String page)
          Return a link to a desired page for the user
 java.lang.String getUserName()
          Return User name of the PSML file
 void init(java.lang.Object data)
          This will initialise a JetspeedLink object that was constructed with the default constructor (ApplicationTool method).
 void init(org.apache.turbine.util.RunData rundata)
          This will initialise a JetspeedLink object that was constructed with the default constructor
 void refresh()
          Refresh method - does nothing
 org.apache.turbine.util.DynamicURI setAction(java.lang.String action)
          Deprecated. Use getAction()
 org.apache.turbine.util.DynamicURI setAction(java.lang.String action, Entry entry)
          Deprecated. Use getAction()
 org.apache.turbine.util.DynamicURI setAction(java.lang.String action, Portlet portlet)
          Deprecated. Use getAction()
 org.apache.turbine.util.DynamicURI setAction(java.lang.String action, Portlets portlets)
          Deprecated. Use getAction()
 org.apache.turbine.util.DynamicURI setAction(java.lang.String action, java.lang.String peid)
          Deprecated. Use getAction()
 org.apache.turbine.util.DynamicURI setGroup(java.lang.String group)
          Deprecated. Use getGroup()
 org.apache.turbine.util.DynamicURI setGroup(java.lang.String group, java.lang.String page)
          Deprecated. Use getGroup()
 org.apache.turbine.util.DynamicURI setMediaType(java.lang.String mediaType)
           
 org.apache.turbine.util.DynamicURI setPage()
          Deprecated. Use getPage()
 org.apache.turbine.util.DynamicURI setPage(java.lang.String page)
          Deprecated. Use getPage()
 org.apache.turbine.util.DynamicURI setPage(java.lang.String page, java.lang.String paneName)
          Deprecated. Use getPage()
 org.apache.turbine.util.DynamicURI setPaneById(java.lang.String paneId)
          Deprecated. Use getPaneById()
 org.apache.turbine.util.DynamicURI setPaneByName(java.lang.String paneName)
          Deprecated. Use getPaneByName()
 org.apache.turbine.util.DynamicURI setPortalElement(java.lang.String peid)
          Deprecated. Use getPortletById() or getPaneById()
 void setPortlet(Portlet portlet)
          Deprecated. the name is confusing. Use @see(#forPaneById()) instead.
 org.apache.turbine.util.DynamicURI setPortletById(java.lang.String peid)
          Deprecated. Use getPortletById()
 org.apache.turbine.util.DynamicURI setPortletByName(java.lang.String portletName)
          Add a portlet reference in the link.
 org.apache.turbine.util.DynamicURI setRole(java.lang.String role)
          Deprecated. use getRole()
 org.apache.turbine.util.DynamicURI setRole(java.lang.String role, java.lang.String page)
          Deprecated. use getRole()
 org.apache.turbine.util.DynamicURI setTemplate(java.lang.String template)
          Deprecated. Use getTemplate()
 org.apache.turbine.util.DynamicURI setUser(java.lang.String user)
          Deprecated. Use getUser()
 org.apache.turbine.util.DynamicURI setUser(java.lang.String user, java.lang.String page)
          Deprecated. Use getUser()
 java.lang.String toString()
          Return a URL, as a string, the the root page or pane.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

rundata

protected JetspeedRunData rundata

Request to which we refer.


activePortlet

protected Portlet activePortlet

The portlet that will be used to build the reference.

Constructor Detail

BaseJetspeedLink

public BaseJetspeedLink()
Empty constructor.for introspection


BaseJetspeedLink

public BaseJetspeedLink(org.apache.turbine.util.RunData data)
Constructor required by ApplicationTool interface

Parameters:
data - A Jetspeed RunData object.
Method Detail

init

public void init(org.apache.turbine.util.RunData rundata)
This will initialise a JetspeedLink object that was constructed with the default constructor

Specified by:
init in interface JetspeedLink
Parameters:
rundata - to be a RunData object

addQueryData

public org.apache.turbine.util.DynamicURI addQueryData(java.lang.String name,
                                                       java.lang.Object value)
Adds a name=value pair to the query string.

Specified by:
addQueryData in interface JetspeedLink
Parameters:
name - A String with the name to add.
value - An Object with the value to add.
Returns:
DynamicURI that to the desired page

addPathInfo

public org.apache.turbine.util.DynamicURI addPathInfo(java.lang.String name,
                                                      java.lang.Object value)
Adds a name=value pair to the path_info string.

Specified by:
addPathInfo in interface JetspeedLink
Parameters:
name - A String with the name to add.
value - An Object with the value to add.
Returns:
DynamicURI that to the desired page

setPortalElement

public org.apache.turbine.util.DynamicURI setPortalElement(java.lang.String peid)
Deprecated. Use getPortletById() or getPaneById()

Return an link to a specific portal element

Specified by:
setPortalElement in interface JetspeedLink
Parameters:
peid - of the portal element
Returns:
DynamicURI to specific portal element

setPortletById

public org.apache.turbine.util.DynamicURI setPortletById(java.lang.String peid)
Deprecated. Use getPortletById()

Return an link to a specific portlet using the portet's id

Specified by:
setPortletById in interface JetspeedLink
Parameters:
peid - of the portlet
Returns:
DynamicURI to specific portlet

getHomePage

public org.apache.turbine.util.DynamicURI getHomePage()
Return link to the home page without user, page, group, role, template, action, media type, language, or country in link.

Specified by:
getHomePage in interface JetspeedLink
Returns:
DynamicURI to the home page

getTemplate

public org.apache.turbine.util.DynamicURI getTemplate()
Return a link that includes the template from rundata

Specified by:
getTemplate in interface JetspeedLink
Returns:
DynamicURI to template

setTemplate

public org.apache.turbine.util.DynamicURI setTemplate(java.lang.String template)
Deprecated. Use getTemplate()

Return a link to the template.

Specified by:
setTemplate in interface JetspeedLink
Parameters:
template - to add to link
Returns:
DynamicURI to specific portlet

setAction

public org.apache.turbine.util.DynamicURI setAction(java.lang.String action)
Deprecated. Use getAction()

Return a link that includes an action

Specified by:
setAction in interface JetspeedLink
Parameters:
action - Desired action
Returns:
DynamicURI that includes the desire action

setAction

public org.apache.turbine.util.DynamicURI setAction(java.lang.String action,
                                                    Portlets portlets)
Deprecated. Use getAction()

Return a link that includes an action to a specific portlet, as defined by a portlets

Specified by:
setAction in interface JetspeedLink
Parameters:
action - Desired action
portlets - to receive the action
Returns:
DynamicURI that includes the desire action

setAction

public org.apache.turbine.util.DynamicURI setAction(java.lang.String action,
                                                    Portlet portlet)
Deprecated. Use getAction()

Return a link that includes an action to a specific portlet

Specified by:
setAction in interface JetspeedLink
Parameters:
action - Desired action
portlet - to receive the action
Returns:
DynamicURI that includes the desire action

setAction

public org.apache.turbine.util.DynamicURI setAction(java.lang.String action,
                                                    Entry entry)
Deprecated. Use getAction()

Return a link that includes an action to a specific portlet, as defined by an entry

Specified by:
setAction in interface JetspeedLink
Parameters:
action - Desired action
entry - to receive the action
Returns:
DynamicURI that includes the desire action

setAction

public org.apache.turbine.util.DynamicURI setAction(java.lang.String action,
                                                    java.lang.String peid)
Deprecated. Use getAction()

Return a link that includes an action to a specific portlet, as defined by a PEID

Parameters:
action - Desired action
peid - Id of portlet to receive the action
Returns:
DynamicURI that includes the desire action

setGroup

public org.apache.turbine.util.DynamicURI setGroup(java.lang.String group)
Deprecated. Use getGroup()

Return a link to a default page for the group

Specified by:
setGroup in interface JetspeedLink
Parameters:
group - Desired group
Returns:
DynamicURI that to the desired page

setGroup

public org.apache.turbine.util.DynamicURI setGroup(java.lang.String group,
                                                   java.lang.String page)
Deprecated. Use getGroup()

Return a link to a desired page for the group

Specified by:
setGroup in interface JetspeedLink
Parameters:
page - Desired page
group - Desired group
Returns:
DynamicURI that to the desired page

setPage

public org.apache.turbine.util.DynamicURI setPage()
Deprecated. Use getPage()

Return a link to a default page for the current user, group, or role.

Specified by:
setPage in interface JetspeedLink
Returns:
DynamicURI that to the desired page

setPage

public org.apache.turbine.util.DynamicURI setPage(java.lang.String page)
Deprecated. Use getPage()

Return a link to a desired page for the current user, group, or role.

Specified by:
setPage in interface JetspeedLink
Parameters:
page - Desired page
Returns:
DynamicURI that to the desired page

setPage

public org.apache.turbine.util.DynamicURI setPage(java.lang.String page,
                                                  java.lang.String paneName)
Deprecated. Use getPage()

Return a link to a desired page and pane for the current user, group, or role.

Specified by:
setPage in interface JetspeedLink
Parameters:
page - Desired page
paneName - Desired pane name
Returns:
DynamicURI that to the desired page

setRole

public org.apache.turbine.util.DynamicURI setRole(java.lang.String role)
Deprecated. use getRole()

Return a link to a default page for the role

Specified by:
setRole in interface JetspeedLink
Parameters:
role - Desired role
Returns:
DynamicURI that to the desired page

setRole

public org.apache.turbine.util.DynamicURI setRole(java.lang.String role,
                                                  java.lang.String page)
Deprecated. use getRole()

Return a link to a desired page for the role

Specified by:
setRole in interface JetspeedLink
Parameters:
role - Desired role
page - Desired page
Returns:
DynamicURI that to the desired page

setUser

public org.apache.turbine.util.DynamicURI setUser(java.lang.String user)
Deprecated. Use getUser()

Return a link to a default page for the user

Specified by:
setUser in interface JetspeedLink
Parameters:
user - Desired user
Returns:
DynamicURI that to the desired page

setUser

public org.apache.turbine.util.DynamicURI setUser(java.lang.String user,
                                                  java.lang.String page)
Deprecated. Use getUser()

Return a link to a desired page for the user

Specified by:
setUser in interface JetspeedLink
Parameters:
page - Desired page
user - Desired user
Returns:
DynamicURI that to the desired page

setPaneById

public org.apache.turbine.util.DynamicURI setPaneById(java.lang.String paneId)
Deprecated. Use getPaneById()

Return a link to a specific pane using the pane's id

Specified by:
setPaneById in interface JetspeedLink
Parameters:
paneId - of the Pane
Returns:
URI to specific portlet

setPaneByName

public org.apache.turbine.util.DynamicURI setPaneByName(java.lang.String paneName)
Deprecated. Use getPaneByName()

Return a link to a specific pane using the pane's id

Parameters:
paneName - Name of the Pane
Returns:
URI to specific portlet

getLink

public org.apache.turbine.util.DynamicURI getLink(int rootType,
                                                  java.lang.String rootValue,
                                                  java.lang.String pageName,
                                                  int elementType,
                                                  java.lang.String elementValue,
                                                  java.lang.String actionName,
                                                  java.lang.String templateName,
                                                  java.lang.String mediaType,
                                                  java.lang.String language,
                                                  java.lang.String country)
Return a link to a desired page. This is allows the inclusion of a Group/Role/User, page, template, action, media type, language, and country.

Specified by:
getLink in interface JetspeedLink
Parameters:
rootType - Type of root PSML docuument. The should be one of the following:
JetspeedLink.CURRENT
The link will retain the current Group/Role/User referance. rootValue is not used
JetspeedLink.DEFAULT
Default Group, Role, or User. rootValue is not used
JetspeedLink.GROUP
Link will be to a Group PSML. rootValue is a Group Name
JetspeedLink.ROLE
Link will be to a Role PSML. rootValue is a Role Name
JetspeedLink.USER
Link will be to a User PSML. rootValue is a User Name
rootValue - See description of rootType
pageName - Name of page. null = default page
elementType -
JetspeedLink.CURRENT
The link will retain the current Pane/Portlet referance. elementValue is not used
JetspeedLink.DEFAULT
The link will NOT referance a pane or portlet. elementValue is not used
JetspeedLink.PANE_ID
Link will be to a Pane using it's ID. elementValue is a Pane's ID
JetspeedLink.PANE_NAME
Link will be to a Pane using it's Name. elementValue is a Pane's Name
JetspeedLink.PORTLET_ID
Link will be to a Portlet using it's ID. elementValue is a Portlet's ID
JetspeedLink.PORTLET_NAME
Link will be to a Portlet using it's Name. elementValue is a Portlet's Name
JetspeedLink.PORTLET_ID_QUERY
Link will be to a Portlet using it's ID based on portlet name provided. elementValue is a Portlet's name. ID is for the first portlet with matching name
elementValue - See description of elementType
actionName - Name of action. If no action is desired use JetspeedLink.NO_ACTION.
templateName - Name of template. If no template is desired use JetspeedLink.NO_TEMPLATE.
mediaType - Desired media type. null = default media type
language - Desired language. null = default language
country - Desired country. null = default language
Returns:
URI to specific portlet

getLink

public org.apache.turbine.util.DynamicURI getLink(int rootType,
                                                  java.lang.String rootValue,
                                                  java.lang.String pageName,
                                                  int elementType,
                                                  java.lang.String elementValue,
                                                  java.lang.String actionName,
                                                  java.lang.String templateName,
                                                  java.lang.String mediaType,
                                                  java.lang.String language)
Specified by:
getLink in interface JetspeedLink
See Also:
org.apache.jetspeed.util.template.JetspeedLink.getLink( int, String, String, int, String, String, String, String, String, String

getLink

public org.apache.turbine.util.DynamicURI getLink(int rootType,
                                                  java.lang.String rootValue,
                                                  java.lang.String pageName,
                                                  int elementType,
                                                  java.lang.String elementValue,
                                                  java.lang.String actionName,
                                                  java.lang.String templateName,
                                                  java.lang.String mediaType)
Specified by:
getLink in interface JetspeedLink

getLink

public org.apache.turbine.util.DynamicURI getLink(int rootType,
                                                  java.lang.String rootValue,
                                                  java.lang.String pageName,
                                                  int elementType,
                                                  java.lang.String elementValue,
                                                  java.lang.String actionName,
                                                  java.lang.String templateName)
Specified by:
getLink in interface JetspeedLink

getLink

public org.apache.turbine.util.DynamicURI getLink(int rootType,
                                                  java.lang.String rootValue,
                                                  java.lang.String pageName,
                                                  int elementType,
                                                  java.lang.String elementValue,
                                                  java.lang.String actionName)
Specified by:
getLink in interface JetspeedLink

getLink

public org.apache.turbine.util.DynamicURI getLink(int rootType,
                                                  java.lang.String rootValue,
                                                  java.lang.String pageName,
                                                  int elementType,
                                                  java.lang.String elementValue)
Specified by:
getLink in interface JetspeedLink

getAction

public org.apache.turbine.util.DynamicURI getAction(java.lang.String action)
Return a link that includes an action

Specified by:
getAction in interface JetspeedLink
Parameters:
action - action
Returns:
DynamicURI that includes the desire action

getAction

public org.apache.turbine.util.DynamicURI getAction(java.lang.String action,
                                                    Entry entry)
Return a link that includes an action to a specific portlet, as defined by an entry

Specified by:
getAction in interface JetspeedLink
Parameters:
action - Desired action
entry - to receive the action
Returns:
DynamicURI that includes the desire action

getAction

public org.apache.turbine.util.DynamicURI getAction(java.lang.String action,
                                                    Portlet portlet)
Return a link that includes an action to a specific portlet

Specified by:
getAction in interface JetspeedLink
Parameters:
action - Desired action
portlet - to receive the action
Returns:
DynamicURI that includes the desire action

getAction

public org.apache.turbine.util.DynamicURI getAction(java.lang.String action,
                                                    Portlets portlets)
Return a link that includes an action to a specific portlet, as defined by a portlets

Specified by:
getAction in interface JetspeedLink
Parameters:
action - Desired action
portlets - to receive the action
Returns:
DynamicURI that includes the desire action

getAction

public org.apache.turbine.util.DynamicURI getAction(java.lang.String action,
                                                    java.lang.String peid)
Return a link that includes an action to a specific portlet, as defined by a PEID

Specified by:
getAction in interface JetspeedLink
Parameters:
action - Desired action
peid - Id of the portlet to receive the action
Returns:
DynamicURI that includes the desire action

getGroup

public org.apache.turbine.util.DynamicURI getGroup(java.lang.String group)
Return a link to a default page for the group

Specified by:
getGroup in interface JetspeedLink
Parameters:
group - Desired group
Returns:
DynamicURI that to the default page for the group

getGroup

public org.apache.turbine.util.DynamicURI getGroup(java.lang.String group,
                                                   java.lang.String page)
Return a link to a desired page for the group

Specified by:
getGroup in interface JetspeedLink
Parameters:
page - Desired page
group - Desired group
Returns:
DynamicURI that to the desired group and page

getPage

public org.apache.turbine.util.DynamicURI getPage()
Return a link to a default page for the current user, group, or role.

Specified by:
getPage in interface JetspeedLink
Returns:
DynamicURI that to the default page

getPage

public org.apache.turbine.util.DynamicURI getPage(java.lang.String page)
Return a link to a desired page for the current user, group, or role.

Specified by:
getPage in interface JetspeedLink
Parameters:
page - Desired page
Returns:
DynamicURI that to the desired page

getPage

public org.apache.turbine.util.DynamicURI getPage(java.lang.String page,
                                                  java.lang.String paneName)
Return a link to a desired page and pane for the current user, group, or role.

Specified by:
getPage in interface JetspeedLink
Parameters:
page - Desired page
paneName - Name of the desired pane
Returns:
DynamicURI that to the desired page

getPaneById

public org.apache.turbine.util.DynamicURI getPaneById(java.lang.String paneId)
Return a link to a specific pane using the pane's id

Specified by:
getPaneById in interface JetspeedLink
Parameters:
paneId - of the Pane
Returns:
URI to specific portlet

getPaneByName

public org.apache.turbine.util.DynamicURI getPaneByName(java.lang.String paneName)
Return a link to a specific pane using the pane's id

Specified by:
getPaneByName in interface JetspeedLink
Parameters:
paneName - Name of the Pane
Returns:
URI to specific portlet

getPortletById

public org.apache.turbine.util.DynamicURI getPortletById(java.lang.String peid)
Return an link to a specific portlet using the portet's id

Specified by:
getPortletById in interface JetspeedLink
Parameters:
peid - of the portlet
Returns:
DynamicURI to specific portlet

getPortletByName

public org.apache.turbine.util.DynamicURI getPortletByName(java.lang.String portletName)
Add a portlet reference in the link. Note: This must be used with caution, since a portlet may exist may times in a PSML. setPortletById() is the perfered method.

Specified by:
getPortletByName in interface JetspeedLink
Parameters:
portletName - the name of the portlet to link to
Returns:
a DynamicURI referencing the named portlet

getRole

public org.apache.turbine.util.DynamicURI getRole(java.lang.String role)
Return a link to a default page for the role

Specified by:
getRole in interface JetspeedLink
Parameters:
role - Desired role
Returns:
DynamicURI that to the desired page

getRole

public org.apache.turbine.util.DynamicURI getRole(java.lang.String role,
                                                  java.lang.String page)
Return a link to a desired page for the role

Specified by:
getRole in interface JetspeedLink
Parameters:
role - Desired role
page - Desired page
Returns:
DynamicURI that to the desired page

getTemplate

public org.apache.turbine.util.DynamicURI getTemplate(java.lang.String template)
Return a link to the template.

Specified by:
getTemplate in interface JetspeedLink
Parameters:
template - to add to link
Returns:
DynamicURI to specific portlet

getUser

public org.apache.turbine.util.DynamicURI getUser(java.lang.String user)
Return a link to a default page for the user

Specified by:
getUser in interface JetspeedLink
Parameters:
user - Desired user
Returns:
DynamicURI that to the desired page

getUser

public org.apache.turbine.util.DynamicURI getUser(java.lang.String user,
                                                  java.lang.String page)
Return a link to a desired page for the user

Specified by:
getUser in interface JetspeedLink
Parameters:
page - Desired page
user - Desired user
Returns:
DynamicURI that to the desired page

getRoot

protected org.apache.turbine.util.DynamicURI getRoot()
                                              throws ProfileException
Return a link to the root portlet or pane

Returns:
URI to the root portlet/pane
Throws:
ProfileException - if the profile detects an error

toString

public java.lang.String toString()
Return a URL, as a string, the the root page or pane.

Specified by:
toString in interface JetspeedLink
Returns:
a URL, as a string, the the root page or pane.

getActionKey

public java.lang.String getActionKey()
Return the action key. Used by velocity templates, i.e. $jlink.ActionKey

Specified by:
getActionKey in interface JetspeedLink
Returns:
the action parameter name

getAnonymous

public boolean getAnonymous()
Is the PSML for the anonymous user?

Specified by:
getAnonymous in interface JetspeedLink
Returns:
True = PSML is for the anonymous user

getCountry

public java.lang.String getCountry()
Return country of the PSML file

Specified by:
getCountry in interface JetspeedLink
Returns:
Country of PSML, or null if no country

getGroupName

public java.lang.String getGroupName()
Return Group name of the PSML file

Specified by:
getGroupName in interface JetspeedLink
Returns:
Group name of PSML, or null if no Group name

getLanguage

public java.lang.String getLanguage()
Return Language of the PSML file

Specified by:
getLanguage in interface JetspeedLink
Returns:
Language of PSML, or null if no Language

getMediaType

public java.lang.String getMediaType()
Return Media Type of the PSML file

Specified by:
getMediaType in interface JetspeedLink
Returns:
Media Type of PSML, or null if no Media Type

getPageName

public java.lang.String getPageName()
Return Page name of the PSML file

Specified by:
getPageName in interface JetspeedLink
Returns:
Page name of PSML, or null if no Page name

getRoleName

public java.lang.String getRoleName()
Return Role name of the PSML file

Specified by:
getRoleName in interface JetspeedLink
Returns:
Role name of PSML, or null if no Role name

getUserName

public java.lang.String getUserName()
Return User name of the PSML file

Specified by:
getUserName in interface JetspeedLink
Returns:
User name of PSML, or null if no User name

getCURRENT

public static int getCURRENT()
The following methods used by Velocity to get value of constants


getDEFAULT

public static int getDEFAULT()

getGROUP

public static int getGROUP()

getPANE_ID

public static int getPANE_ID()

getPANE_NAME

public static int getPANE_NAME()

getPORTLET_ID

public static int getPORTLET_ID()

getPORTLET_NAME

public static int getPORTLET_NAME()

getROLE

public static int getROLE()

getUSER

public static int getUSER()

getDEFAULT_PAGE

public static java.lang.String getDEFAULT_PAGE()

setPortlet

public void setPortlet(Portlet portlet)
Deprecated. the name is confusing. Use @see(#forPaneById()) instead.

Set the portlet giving context to this Link object.

This method is from JetspeedTemplateLink and is only here for backward compatibility. This it should not be used for any new development. Also any problems with this method will not be fixed

Specified by:
setPortlet in interface JetspeedLink
Parameters:
portlet - the name of the active portlet

setPortletByName

public org.apache.turbine.util.DynamicURI setPortletByName(java.lang.String portletName)
Add a portlet reference in the link. Note: This must be used with caution, since a portlet may exist may times in a PSML. setPortletById() is the perfered method.

Specified by:
setPortletByName in interface JetspeedLink
Parameters:
portletName - the name of the portlet to link to
Returns:
a DynamicURI referencing the named portlet for easy link construction in template

init

public void init(java.lang.Object data)
This will initialise a JetspeedLink object that was constructed with the default constructor (ApplicationTool method).

Specified by:
init in interface org.apache.turbine.services.pull.ApplicationTool
Parameters:
data - assumed to be a RunData object

refresh

public void refresh()
Refresh method - does nothing

Specified by:
refresh in interface org.apache.turbine.services.pull.ApplicationTool

setMediaType

public org.apache.turbine.util.DynamicURI setMediaType(java.lang.String mediaType)
Specified by:
setMediaType in interface JetspeedLink


Copyright © 2000-2005 Apache Software Foundation. All Rights Reserved.