Class FixedStartPageFactory
- java.lang.Object
-
- net.sf.basedb.clients.web.extensions.AbstractJspFactory
-
- net.sf.basedb.clients.web.extensions.AbstractJspActionFactory<StartPageAction>
-
- net.sf.basedb.clients.web.extensions.startpage.FixedStartPageFactory
-
- All Implemented Interfaces:
DynamicActionAttributes
,StartPageAction
,Action
,ActionFactory<StartPageAction>
public class FixedStartPageFactory extends AbstractJspActionFactory<StartPageAction> implements StartPageAction
A simple start page action factory. Use the parameters to set name, description and URL. The ID is autoamtically set to the ID of the extension. ThesetUrl(String)
method supports path variables. SeePathConverter
.- Since:
- 3.8
- Author:
- nicklas
-
-
Field Summary
Fields Modifier and Type Field Description private StartPageAction[]
actions
private String
description
private String
id
private String
name
private String
url
-
Constructor Summary
Constructors Constructor Description FixedStartPageFactory()
Create a new factory instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StartPageAction[]
getActions(InvokationContext<? super StartPageAction> context)
This method may be called one or several times for each request.String
getDescription()
Get an optional description of the start page.String
getId()
Get the ID of the the action.String
getName()
Get the name of the start page.String
getUrl()
Get the URL to the start page.void
setDescription(String description)
void
setName(String name)
void
setUrl(String url)
-
Methods inherited from class net.sf.basedb.clients.web.extensions.AbstractJspActionFactory
prepareContext
-
Methods inherited from class net.sf.basedb.clients.web.extensions.AbstractJspFactory
getDynamicActionAttributes, getParameter, getScripts, getStylesheets, prepareContext, setParameter, setScript, setStylesheet
-
-
-
-
Field Detail
-
actions
private StartPageAction[] actions
-
id
private String id
-
name
private String name
-
description
private String description
-
url
private String url
-
-
Method Detail
-
getActions
public StartPageAction[] getActions(InvokationContext<? super StartPageAction> context)
Description copied from interface:ActionFactory
This method may be called one or several times for each request. This is decided by the extension point. If, for example, the extension point is a pure single-item extension point then this method is probably only called once. If the extension point is a per-item extension point in a list context, then this method may be called once for every item in the list. The context parameter contains all information about the context of the extension point, including the current item, if any.- Specified by:
getActions
in interfaceActionFactory<StartPageAction>
- Parameters:
context
- The current invokation context- Returns:
- Always an array with a single element
-
getId
public String getId()
Description copied from interface:StartPageAction
Get the ID of the the action. This ID is stored as a user setting in BASE and is used to find the correct URL after logging in. It is recommended that an extension use the same ID as the extension itself have.- Specified by:
getId
in interfaceStartPageAction
-
getName
public String getName()
Description copied from interface:StartPageAction
Get the name of the start page.- Specified by:
getName
in interfaceStartPageAction
-
getDescription
public String getDescription()
Description copied from interface:StartPageAction
Get an optional description of the start page.- Specified by:
getDescription
in interfaceStartPageAction
-
getUrl
public String getUrl()
Description copied from interface:StartPageAction
Get the URL to the start page. The URL should be be an absolute URL. Use$SESSION-ID$
as a placeholder for the current session id. Eg.my_alternate_startpage.jsp?ID=$SESSION-ID$
- Specified by:
getUrl
in interfaceStartPageAction
- Returns:
- The URL to the page to load, or null to load the regular start page
-
setName
public void setName(String name)
-
setDescription
public void setDescription(String description)
-
setUrl
@VariableSetter @PathSetter public void setUrl(String url)
-
-