| java.lang.Object es.udc.mypersonalizer.portal.view.mainpage.ServiceView
ServiceView | public class ServiceView (Code) | | This bean contains information about a service being displayed in a user's
main page and provides the mechanism to call a service and receive its
reply. Its contents vary depending on its reply being cached or not.
If the reply is not cached, this bean will contain:
- The service identifier.
- The request.
- The response.
- The Map of allowed buttons, indexed by button name, and each
values being a
ButtonView object.
- The service property key.
- The service property.
- The service buttons state.
And if the reply is cached, the contents would be:
- The service identifier.
- The request.
- The response.
- The Map of allowed buttons, indexed by button name, and each
values being a
ButtonView object.
- The service property key.
- The cached reply for this service.
When the reply is not cached, the getReply method performs
the request to the service by callying
ServiceReplyManager .getReply.
author: Daniel Fernandez author: Fernando Bellas since: 1.0 |
Constructor Summary | |
public | ServiceView(String serviceIdentifier, HttpServletRequest request, HttpServletResponse response, Map allowedButtons, String cachedReply) Creates a new instance of a cached-reply ServiceView. | public | ServiceView(String serviceIdentifier, HttpServletRequest request, HttpServletResponse response, Map allowedButtons, ServicePropertyKey servicePropertyKey, ServiceProperty serviceProperty, ServiceButtonsState serviceButtonsState) Creates a new instance of a non-cached-reply ServiceView. |
ServiceView | public ServiceView(String serviceIdentifier, HttpServletRequest request, HttpServletResponse response, Map allowedButtons, String cachedReply)(Code) | | Creates a new instance of a cached-reply ServiceView.
Parameters: serviceIdentifier - the service identifier. Parameters: request - the request. Parameters: response - the response. Parameters: allowedButtons - the Map of allowed buttons. Parameters: cachedReply - the cached reply. |
ServiceView | public ServiceView(String serviceIdentifier, HttpServletRequest request, HttpServletResponse response, Map allowedButtons, ServicePropertyKey servicePropertyKey, ServiceProperty serviceProperty, ServiceButtonsState serviceButtonsState)(Code) | | Creates a new instance of a non-cached-reply ServiceView.
Parameters: serviceIdentifier - the service identifier. Parameters: request - the request. Parameters: response - the response. Parameters: allowedButtons - the response. Parameters: servicePropertyKey - the service property key. Parameters: serviceProperty - the service property. Parameters: serviceButtonsState - the service buttons state. |
getAllowedButtons | public Map getAllowedButtons()(Code) | | Returns the Map of allowed buttons, indexed by button name. Each of the
values of this Map is a
ButtonView object.
the Map of allowed buttons. |
getReply | public String getReply()(Code) | | Returns the service reply. This will be already ready if it was cached,
but if not this method will call
ServiceReplyManager .getReply
and make the reques to the service.
It returns null if the service is down.
the service reply, or null if the service is down. |
getServiceIdentifier | public String getServiceIdentifier()(Code) | | Returns the service identifier.
the service identifier. |
|
|