|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.iplanet.portalserver.providers.ProviderAdapter
This class provides default implementations for the Provider API. Note that in most cases, the action taken or value returned from these methods is meaningless. In most cases the methods provided here should always be overriden.
Developers who wish to implement a provider should extend this class.
Alternatively, developers who wish to author providers that use the
iPS profile service should extend ProfileProviderAdapter.
The advantage of extending this class versus implementing the
Provider interface directly
is that you will maintain forward
compatability as additions are made to the Provider API. Existing
code will by default call the methods in this class. Eventually,
code should be written to implement all of the methods in the
Provider interface.
For method details, see the descriptions in the Provider
interface.
ProfileProviderAdapter,
Provider| Fields inherited from interface com.iplanet.portalserver.providers.Provider |
EDIT_COMPLETE,
EDIT_SUBSET,
WIDTH_FULL_BOTTOM,
WIDTH_FULL_TOP,
WIDTH_THICK,
WIDTH_THIN |
| Constructor Summary | |
ProviderAdapter()
|
|
| Method Summary | |
java.lang.String |
getBackgroundColor()
Get the background color for this provider. |
int |
getColumn()
Get the column in which this provider should be displayed in. |
java.lang.StringBuffer |
getContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Call getContent(Map) with the request parameters. |
java.lang.StringBuffer |
getContent(java.util.Map m)
This method has no effect. |
java.lang.String |
getDescription()
Get the description of this provider. |
java.lang.StringBuffer |
getEdit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Call getEdit(Map) with the request parameters. |
java.lang.StringBuffer |
getEdit(java.util.Map m)
This method has no effect. |
int |
getEditType()
Get the edit form type of the provider. |
java.net.URL |
getHelp()
Get the help link for this provider. |
java.lang.String |
getName()
Get the name of this provider. |
long |
getRefreshTime()
Get the refresh time for this provider, in seconds. |
int |
getRow()
Get the row in which this provider should be displayed in. |
Session |
getSession()
Get the session object for this provider. |
java.lang.String |
getTitle()
Get the title of this provider. |
int |
getWidth()
Get the width of this provider. |
boolean |
hasBorder()
Should this provider have a border drawn around it? The desktop calls this method when the front page is drawn. |
boolean |
hasFrame()
Should this provider have a window frame around it? A frame is defined as the "window" frame containing a title and channel controls that surround provider content. |
boolean |
hasHelp()
Determine if the provider has a help page associated with it. |
void |
init(java.lang.String n,
Session s)
Initializes the provider. |
boolean |
isDetachable()
Determine if the provider can be detached from the Desktop. |
boolean |
isDetached()
Determine if the provider is detached from the Desktop. |
boolean |
isEditable()
Determine if the provider has an edit page. |
boolean |
isMinimizable()
Determine if the provider can be minimized on the Desktop. |
boolean |
isMinimized()
Determine if the provider is minimized on the Desktop. |
boolean |
isMovable()
Determine if the user can move this channel around on the desktop This method is called by the desktop when the user attempts to change the layout to see if they are allowed to move said channels. |
boolean |
isPresentable()
Dictates whether the provider is presentable. |
boolean |
isRemovable()
Determine if the user can remove this provider from the desktop This method is called by the desktop when it draws the front page. |
void |
load()
This method has no effect. |
java.net.URL |
processEdit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
Call processEdit(Map) with the request parameters. |
java.net.URL |
processEdit(java.util.Map m)
This method has no effect. |
int |
setColumn(int column)
This method has no effect. |
boolean |
setDetached(boolean detached)
This method has no effect. |
boolean |
setMinimized(boolean minimized)
This method has no effect. |
int |
setRow(int row)
This method has no effect. |
void |
store()
This method has no effect. |
| Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Constructor Detail |
public ProviderAdapter()
| Method Detail |
public void init(java.lang.String n,
Session s)
throws ProviderException
session - The Session object corresponding to the request
received by the desktop. This object allows the provider to query
the webtop profile service for information about itself
or the user who initiated the request. This parameter can be
ignored if your provider does not query the profile service.name - Unique name identifying this provider. This value
should always be returned from getName().Provider.getName()
public java.lang.StringBuffer getContent(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws ProviderException
request - An HttpServletRequest that contains information related to this
request for content.response - An HttpServletResponse that allows the provider to influence the
overall response for the desktop page (besides generating the content).ProviderExceptionpublic Session getSession()
Session
public java.lang.StringBuffer getContent(java.util.Map m)
throws ProviderException
public java.lang.StringBuffer getEdit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws ProviderException
request - An HttpServletRequest that contains information related to this
request for content.response - An HttpServletResponse that allows the provider to influence the
overall response for the desktop page (besides generating the content).Provider.getContent(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse),
Provider.isEditable(),
Provider.processEdit(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse),
Provider.getEditType(),
DesktopURL,
ProviderException
public java.lang.StringBuffer getEdit(java.util.Map m)
throws ProviderException
public int getEditType()
throws UnknownEditTypeException
.getEdit().Provider.EDIT_SUBSET, always.
public java.net.URL processEdit(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response)
throws ProviderException
request - An HttpServletRequest that contains information related to this
request for content.response - An HttpServletResponse that allows the provider to influence the
overall response for the desktop page (besides generating the content).InvalidEditFormData causes the
desktop to re-display the provider's edit page, otherwise,
the front page is returned.Provider.getEdit(javax.servlet.http.HttpServletRequest, javax.servlet.http.HttpServletResponse),
Provider.isEditable(),
com.iplanet.portalserver.providers.InvalidEditFormData,
DesktopURL
public java.net.URL processEdit(java.util.Map m)
throws ProviderException
public boolean isEditable()
false, always.public boolean isPresentable()
Dictates whether the provider is presentable.
Searches for the key genericHTML with the value
true on the client data for the session's client
type and returns true.
If there is no such key, method will return true if
the session's client type is named genericHTML.
In both cases, the content-type for the session's client type must
equal text/html in order for the method to return true.
Provider.isPresentable()public boolean hasHelp()
false, always.public boolean isDetachable()
false, always.public boolean isMinimizable()
true from this method, then it must
persistently store the detached state.
This method is called by the desktop when it draws the front page.false, always.public boolean isRemovable()
true, always.public boolean isMovable()
true, always.public boolean setDetached(boolean detached)
false, always.public boolean isDetached()
true from the isDetachable()
method, then is must then persistently store the detached
state.
The desktop calls this method when the front page is drawn.
false, always.public boolean isMinimized()
true from isMinimizable(), it must then
persistently store the minimized state.
The desktop calls this method when the front page is drawn.false, always.public java.lang.String getTitle()
getName(), always.public java.lang.String getName()
public java.lang.String getDescription()
getName(), always.public java.lang.String getBackgroundColor()
public boolean hasBorder()
true, always.public boolean hasFrame()
true, always.public int getWidth()
WIDTH_THIN, always.Provider.WIDTH_THINpublic int getColumn()
public int getRow()
public java.net.URL getHelp()
public boolean setMinimized(boolean minimized)
false, always.public int setColumn(int column)
public int setRow(int row)
public void load()
throws ProviderException
public void store()
throws ProviderException
public long getRefreshTime()
If provider content is expected to change very infrequently, this method can return some value so that the provider's content is not fetched every time the front page is drawn, thereby saving significant processing time.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||