fr.paris.lutece.plugins.seo.service
Class CanonicalUrlService

java.lang.Object
  extended by fr.paris.lutece.plugins.seo.service.CanonicalUrlService

public final class CanonicalUrlService
extends java.lang.Object

Canonical Url Service


Method Summary
 java.lang.String addCanonicalUrl(java.lang.String strContent, javax.servlet.http.HttpServletRequest request, java.util.Map<java.lang.String,java.lang.String> mapFriendlyUrls, java.lang.String strBaseUrl)
          Add canonical URL into an HTML page's content
static CanonicalUrlService instance()
          Return the unique instance
 boolean isCanonicalUrlsEnabled()
          Tells if canonical urls are enabled
 void setCanonicalUrlsEnabled(boolean bEnabled)
          Sets the status of Canonical URLs (Enabled or Disabled)
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

instance

public static CanonicalUrlService instance()
Return the unique instance

Returns:
The instance

isCanonicalUrlsEnabled

public boolean isCanonicalUrlsEnabled()
Tells if canonical urls are enabled

Returns:
True if canonical urls are enabled, otherwise false

setCanonicalUrlsEnabled

public void setCanonicalUrlsEnabled(boolean bEnabled)
Sets the status of Canonical URLs (Enabled or Disabled)

Parameters:
bEnabled - The status

addCanonicalUrl

public java.lang.String addCanonicalUrl(java.lang.String strContent,
                                        javax.servlet.http.HttpServletRequest request,
                                        java.util.Map<java.lang.String,java.lang.String> mapFriendlyUrls,
                                        java.lang.String strBaseUrl)
Add canonical URL into an HTML page's content

Parameters:
strContent - The HTML page's content
request - The HTTP request
mapFriendlyUrls - The map of friendly URLS
strBaseUrl - The Base URL
Returns:
The HTML page content with the canonical URL inserted


Copyright © 2012 Mairie de Paris. All Rights Reserved.