|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.jetspeed.util.template.BaseJetspeedLink
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.
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 |
protected JetspeedRunData rundata
Request to which we refer.
protected Portlet activePortlet
The portlet that will be used to build the reference.
Constructor Detail |
public BaseJetspeedLink()
public BaseJetspeedLink(org.apache.turbine.util.RunData data)
data
- A Jetspeed RunData object.Method Detail |
public void init(org.apache.turbine.util.RunData rundata)
init
in interface JetspeedLink
rundata
- to be a RunData objectpublic org.apache.turbine.util.DynamicURI addQueryData(java.lang.String name, java.lang.Object value)
addQueryData
in interface JetspeedLink
name
- A String with the name to add.value
- An Object with the value to add.
public org.apache.turbine.util.DynamicURI addPathInfo(java.lang.String name, java.lang.Object value)
addPathInfo
in interface JetspeedLink
name
- A String with the name to add.value
- An Object with the value to add.
public org.apache.turbine.util.DynamicURI setPortalElement(java.lang.String peid)
setPortalElement
in interface JetspeedLink
peid
- of the portal element
public org.apache.turbine.util.DynamicURI setPortletById(java.lang.String peid)
setPortletById
in interface JetspeedLink
peid
- of the portlet
public org.apache.turbine.util.DynamicURI getHomePage()
getHomePage
in interface JetspeedLink
public org.apache.turbine.util.DynamicURI getTemplate()
getTemplate
in interface JetspeedLink
public org.apache.turbine.util.DynamicURI setTemplate(java.lang.String template)
setTemplate
in interface JetspeedLink
template
- to add to link
public org.apache.turbine.util.DynamicURI setAction(java.lang.String action)
setAction
in interface JetspeedLink
action
- Desired action
public org.apache.turbine.util.DynamicURI setAction(java.lang.String action, Portlets portlets)
setAction
in interface JetspeedLink
action
- Desired actionportlets
- to receive the action
public org.apache.turbine.util.DynamicURI setAction(java.lang.String action, Portlet portlet)
setAction
in interface JetspeedLink
action
- Desired actionportlet
- to receive the action
public org.apache.turbine.util.DynamicURI setAction(java.lang.String action, Entry entry)
setAction
in interface JetspeedLink
action
- Desired actionentry
- to receive the action
public org.apache.turbine.util.DynamicURI setAction(java.lang.String action, java.lang.String peid)
action
- Desired actionpeid
- Id of portlet to receive the action
public org.apache.turbine.util.DynamicURI setGroup(java.lang.String group)
setGroup
in interface JetspeedLink
group
- Desired group
public org.apache.turbine.util.DynamicURI setGroup(java.lang.String group, java.lang.String page)
setGroup
in interface JetspeedLink
page
- Desired pagegroup
- Desired group
public org.apache.turbine.util.DynamicURI setPage()
setPage
in interface JetspeedLink
public org.apache.turbine.util.DynamicURI setPage(java.lang.String page)
setPage
in interface JetspeedLink
page
- Desired page
public org.apache.turbine.util.DynamicURI setPage(java.lang.String page, java.lang.String paneName)
setPage
in interface JetspeedLink
page
- Desired pagepaneName
- Desired pane name
public org.apache.turbine.util.DynamicURI setRole(java.lang.String role)
setRole
in interface JetspeedLink
role
- Desired role
public org.apache.turbine.util.DynamicURI setRole(java.lang.String role, java.lang.String page)
setRole
in interface JetspeedLink
role
- Desired rolepage
- Desired page
public org.apache.turbine.util.DynamicURI setUser(java.lang.String user)
setUser
in interface JetspeedLink
user
- Desired user
public org.apache.turbine.util.DynamicURI setUser(java.lang.String user, java.lang.String page)
setUser
in interface JetspeedLink
page
- Desired pageuser
- Desired user
public org.apache.turbine.util.DynamicURI setPaneById(java.lang.String paneId)
setPaneById
in interface JetspeedLink
paneId
- of the Pane
public org.apache.turbine.util.DynamicURI setPaneByName(java.lang.String paneName)
paneName
- Name of the Pane
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)
getLink
in interface JetspeedLink
rootType
- Type of root PSML docuument. The should be one of the following:
rootValue
- See description of rootTypepageName
- Name of page. null = default pageelementType
- elementValue
- See description of elementTypeactionName
- 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 typelanguage
- Desired language. null = default languagecountry
- Desired country. null = default language
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)
getLink
in interface JetspeedLink
org.apache.jetspeed.util.template.JetspeedLink.getLink( int, String, String, int, String, String, String, String, String, String
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)
getLink
in interface JetspeedLink
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)
getLink
in interface JetspeedLink
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)
getLink
in interface JetspeedLink
public org.apache.turbine.util.DynamicURI getLink(int rootType, java.lang.String rootValue, java.lang.String pageName, int elementType, java.lang.String elementValue)
getLink
in interface JetspeedLink
public org.apache.turbine.util.DynamicURI getAction(java.lang.String action)
getAction
in interface JetspeedLink
action
- action
public org.apache.turbine.util.DynamicURI getAction(java.lang.String action, Entry entry)
getAction
in interface JetspeedLink
action
- Desired actionentry
- to receive the action
public org.apache.turbine.util.DynamicURI getAction(java.lang.String action, Portlet portlet)
getAction
in interface JetspeedLink
action
- Desired actionportlet
- to receive the action
public org.apache.turbine.util.DynamicURI getAction(java.lang.String action, Portlets portlets)
getAction
in interface JetspeedLink
action
- Desired actionportlets
- to receive the action
public org.apache.turbine.util.DynamicURI getAction(java.lang.String action, java.lang.String peid)
getAction
in interface JetspeedLink
action
- Desired actionpeid
- Id of the portlet to receive the action
public org.apache.turbine.util.DynamicURI getGroup(java.lang.String group)
getGroup
in interface JetspeedLink
group
- Desired group
public org.apache.turbine.util.DynamicURI getGroup(java.lang.String group, java.lang.String page)
getGroup
in interface JetspeedLink
page
- Desired pagegroup
- Desired group
public org.apache.turbine.util.DynamicURI getPage()
getPage
in interface JetspeedLink
public org.apache.turbine.util.DynamicURI getPage(java.lang.String page)
getPage
in interface JetspeedLink
page
- Desired page
public org.apache.turbine.util.DynamicURI getPage(java.lang.String page, java.lang.String paneName)
getPage
in interface JetspeedLink
page
- Desired pagepaneName
- Name of the desired pane
public org.apache.turbine.util.DynamicURI getPaneById(java.lang.String paneId)
getPaneById
in interface JetspeedLink
paneId
- of the Pane
public org.apache.turbine.util.DynamicURI getPaneByName(java.lang.String paneName)
getPaneByName
in interface JetspeedLink
paneName
- Name of the Pane
public org.apache.turbine.util.DynamicURI getPortletById(java.lang.String peid)
getPortletById
in interface JetspeedLink
peid
- of the portlet
public org.apache.turbine.util.DynamicURI getPortletByName(java.lang.String portletName)
getPortletByName
in interface JetspeedLink
portletName
- the name of the portlet to link to
public org.apache.turbine.util.DynamicURI getRole(java.lang.String role)
getRole
in interface JetspeedLink
role
- Desired role
public org.apache.turbine.util.DynamicURI getRole(java.lang.String role, java.lang.String page)
getRole
in interface JetspeedLink
role
- Desired rolepage
- Desired page
public org.apache.turbine.util.DynamicURI getTemplate(java.lang.String template)
getTemplate
in interface JetspeedLink
template
- to add to link
public org.apache.turbine.util.DynamicURI getUser(java.lang.String user)
getUser
in interface JetspeedLink
user
- Desired user
public org.apache.turbine.util.DynamicURI getUser(java.lang.String user, java.lang.String page)
getUser
in interface JetspeedLink
page
- Desired pageuser
- Desired user
protected org.apache.turbine.util.DynamicURI getRoot() throws ProfileException
ProfileException
- if the profile detects an errorpublic java.lang.String toString()
toString
in interface JetspeedLink
public java.lang.String getActionKey()
getActionKey
in interface JetspeedLink
public boolean getAnonymous()
getAnonymous
in interface JetspeedLink
public java.lang.String getCountry()
getCountry
in interface JetspeedLink
public java.lang.String getGroupName()
getGroupName
in interface JetspeedLink
public java.lang.String getLanguage()
getLanguage
in interface JetspeedLink
public java.lang.String getMediaType()
getMediaType
in interface JetspeedLink
public java.lang.String getPageName()
getPageName
in interface JetspeedLink
public java.lang.String getRoleName()
getRoleName
in interface JetspeedLink
public java.lang.String getUserName()
getUserName
in interface JetspeedLink
public static int getCURRENT()
public static int getDEFAULT()
public static int getGROUP()
public static int getPANE_ID()
public static int getPANE_NAME()
public static int getPORTLET_ID()
public static int getPORTLET_NAME()
public static int getROLE()
public static int getUSER()
public static java.lang.String getDEFAULT_PAGE()
public void setPortlet(Portlet portlet)
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
setPortlet
in interface JetspeedLink
portlet
- the name of the active portletpublic org.apache.turbine.util.DynamicURI setPortletByName(java.lang.String portletName)
setPortletByName
in interface JetspeedLink
portletName
- the name of the portlet to link to
public void init(java.lang.Object data)
init
in interface org.apache.turbine.services.pull.ApplicationTool
data
- assumed to be a RunData objectpublic void refresh()
refresh
in interface org.apache.turbine.services.pull.ApplicationTool
public org.apache.turbine.util.DynamicURI setMediaType(java.lang.String mediaType)
setMediaType
in interface JetspeedLink
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |