org.apache.cocoon.portal
Interface LinkService

All Superinterfaces:
Component
All Known Implementing Classes:
DefaultLinkService, PageLabelLinkService

public interface LinkService
extends Component

Version:
CVS $Id: LinkService.html 1304258 2012-03-23 10:09:27Z ilgrosso $
Author:
Carsten Ziegeler, Volker Schmitt

Nested Class Summary
static class LinkService.ParameterDescription
           
 
Field Summary
static String DEFAULT_CONVERTABLE_EVENT_PARAMETER_NAME
           
static String DEFAULT_REQUEST_EVENT_PARAMETER_NAME
           
static String ROLE
           
 
Method Summary
 void addEventToLink(Event event)
          Add this event to the list of events contained in the uri
 void addParameterToLink(String name, String value)
          Add this parameter to every link.
 void addUniqueParameterToLink(String name, String value)
          Add this parameter to every link.
 String encodeURL(String url)
           
 String getLinkURI(Event event)
          Get the uri for this coplet containing the additional event
 String getLinkURI(Event event, Boolean secure)
          Get the uri for this coplet containing the additional event and using a secure protocol if requested.
 String getLinkURI(List events)
          Get the uri for this coplet containing the additional events.
 String getLinkURI(List events, Boolean secure)
          Get a uri for this coplet containing the additional events.
 String getRefreshLinkURI()
          Get a link that simply refreshs the portal
 String getRefreshLinkURI(Boolean secure)
          Get a link that simply refreshs the portal
 boolean isSecure()
          Determine whether the current url is using a secure protocol
 

Field Detail

ROLE

static final String ROLE

DEFAULT_REQUEST_EVENT_PARAMETER_NAME

static final String DEFAULT_REQUEST_EVENT_PARAMETER_NAME
See Also:
Constant Field Values

DEFAULT_CONVERTABLE_EVENT_PARAMETER_NAME

static final String DEFAULT_CONVERTABLE_EVENT_PARAMETER_NAME
See Also:
Constant Field Values
Method Detail

getLinkURI

String getLinkURI(Event event)
Get the uri for this coplet containing the additional event

Parameters:
event - The event to add (null is also allowed for convenience)
Returns:
A URI

getLinkURI

String getLinkURI(Event event,
                  Boolean secure)
Get the uri for this coplet containing the additional event and using a secure protocol if requested.

Parameters:
event - The event to add (null is also allowed for convenience)
secure - true if a secure protocol is required, false otherwise.
Returns:
A URI

getLinkURI

String getLinkURI(List events)
Get the uri for this coplet containing the additional events.

Parameters:
events - The events to add: These can either be Events or LinkService.ParameterDescriptions.
Returns:
A URI

getLinkURI

String getLinkURI(List events,
                  Boolean secure)
Get a uri for this coplet containing the additional events. Use a secure protocol if requested.

Parameters:
events - The events to add: These can either be Events or LinkService.ParameterDescriptions.
secure - true if a secure protocol is required, false otherwise.
Returns:
A URI

addEventToLink

void addEventToLink(Event event)
Add this event to the list of events contained in the uri

Parameters:
event - Event to add

addParameterToLink

void addParameterToLink(String name,
                        String value)
Add this parameter to every link. If the link already contains a parameter with this name, then the link will have both parameters with the same name, but different values.

Parameters:
name - The request parameter name
value - The value for the parameter
See Also:
addUniqueParameterToLink(String, String)

addUniqueParameterToLink

void addUniqueParameterToLink(String name,
                              String value)
Add this parameter to every link. If the link already contains a parameter with this name, then this old parameter will be removed and replaced by the new one.

Parameters:
name - The request parameter name
value - The value for the parameter
See Also:
addUniqueParameterToLink(String, String)

getRefreshLinkURI

String getRefreshLinkURI()
Get a link that simply refreshs the portal

Returns:
A URI

getRefreshLinkURI

String getRefreshLinkURI(Boolean secure)
Get a link that simply refreshs the portal

Parameters:
secure - true if a secure protocol is required, false otherwise.
Returns:
A URI

isSecure

boolean isSecure()
Determine whether the current url is using a secure protocol

Returns:
true if the current url is using a secure protocol

encodeURL

String encodeURL(String url)
Parameters:
url - The url to encode.
Returns:
The enocoded URL.
See Also:
HttpServletResponse.encodeURL(java.lang.String)


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.