public class FriendlyURLFilter extends JcmsServletFilter implements javax.servlet.Filter, java.io.Serializable
| Modifier and Type | Field and Description | 
|---|---|
| static java.lang.String | REVISION | 
| Constructor and Description | 
|---|
| FriendlyURLFilter() | 
| Modifier and Type | Method and Description | 
|---|---|
| static boolean | addFriendlyURL(Data data,
              java.lang.String friendlyURL)Add the given friendlyURLSet to the friendly urls of the servlet. | 
| static java.lang.String | buildCleanURL(java.lang.String str)Method to clean the given string to have a proper URL. | 
| void | destroy() | 
| void | doFilter(javax.servlet.ServletRequest req,
        javax.servlet.ServletResponse res,
        javax.servlet.FilterChain chain)The main filter method. | 
| static java.lang.String | generateFriendlyURL(Category cat,
                   java.lang.String lang)Build and return a friendly url that can be added later to the friendly urls
 Servlet Filter. | 
| static java.lang.String | generateFriendlyURL(Publication pub,
                   java.lang.String lang)Build and return a friendly url that can be added later to the friendly urls
 Servlet Filter. | 
| static Data | getDataFromFriendlyURL(java.lang.String friendlyURL)Return the data associated with the given friendly URL. | 
| static java.util.HashMap | getDataToFriendlyURLSetMap() | 
| static java.util.TreeSet | getFriendlyURLSet(Data data)Return a set of friendly urls associated with the given data | 
| static java.util.HashMap | getFriendlyURLToDataMap() | 
| static FriendlyURLFilter | getInstance() | 
| void | init(javax.servlet.FilterConfig config) | 
| static void | initAfterLoad()This method is called after the loading of the store (therefore after all
 specificied Data's FriendlyURL have been updated in this servlet) to generate
 FriendlyURL for the remaining Datas. | 
| static boolean | isFriendlyURLAvailable(Data data,
                      java.lang.String friendlyURL)Check if the given friendly URL is available, that is either :
 
   the Friendly URL is not in the Friendly URLs of the servlet 
   or else the Friendly URL is already there with the same data 
  | 
| boolean | isFriendlyURLAvailable(java.lang.String id,
                      java.lang.String friendlyURL)Check if the given friendly URL is available, that is either :
 
   the Friendly URL is not in the Friendly URLs of the servlet 
   or else the Friendly URL is already there with the same data 
   Instance method, to be used by rpc call in doEditCommonPubAttribute. | 
| boolean | isFriendlyURLValid(java.lang.String friendlyURL)Check if the given friendly url is valid. | 
| static boolean | removeDataFriendlyURL(Data data)Remove the given data and all its associated friendly url. | 
| static boolean | removeFriendlyURL(java.lang.String friendlyURL)Remove the given friendly url. | 
endFilter, initJSONBridge, processFilterpublic static final java.lang.String REVISION
public void doFilter(javax.servlet.ServletRequest req,
            javax.servlet.ServletResponse res,
            javax.servlet.FilterChain chain)
              throws java.io.IOException,
                     javax.servlet.ServletException
doFilter in interface javax.servlet.Filterjava.io.IOExceptionjavax.servlet.ServletExceptionpublic static java.lang.String generateFriendlyURL(Category cat, java.lang.String lang)
cat - the Category to build a url forlang - the lang in which to build a urlpublic static java.lang.String generateFriendlyURL(Publication pub, java.lang.String lang)
pub - the Publication to build a url forlang - the lang in which to build a urlpublic static java.lang.String buildCleanURL(java.lang.String str)
str - the string to cleanpublic boolean isFriendlyURLAvailable(java.lang.String id,
                             java.lang.String friendlyURL)
id - the id of the data associated with the friendly urlfriendlyURL - the friendlyURL for which to check availabilitypublic boolean isFriendlyURLValid(java.lang.String friendlyURL)
friendlyURL - the friendly url to checkpublic static boolean isFriendlyURLAvailable(Data data, java.lang.String friendlyURL)
data - the data associated with the friendly urlfriendlyURL - the friendlyURL for which to check availabilitypublic static java.util.TreeSet getFriendlyURLSet(Data data)
data - the data of which to retrieve friendly urlspublic static Data getDataFromFriendlyURL(java.lang.String friendlyURL)
friendlyURL - the friendly URL to testpublic static boolean addFriendlyURL(Data data, java.lang.String friendlyURL)
data - the data associated with the friendly urlfriendlyURL - the friendly urlpublic static boolean removeDataFriendlyURL(Data data)
data - the data to remove from the servlet.public static boolean removeFriendlyURL(java.lang.String friendlyURL)
friendlyURL - the friendly url to removepublic static java.util.HashMap getFriendlyURLToDataMap()
public static java.util.HashMap getDataToFriendlyURLSetMap()
public void init(javax.servlet.FilterConfig config)
init in interface javax.servlet.Filterpublic void destroy()
destroy in interface javax.servlet.Filterpublic static FriendlyURLFilter getInstance()
public static void initAfterLoad()
Copyright © 2001-2010 Jalios SA. All Rights Reserved.