Class BlogUtils
- java.lang.Object
-
- fr.paris.lutece.plugins.blog.utils.BlogUtils
-
public final class BlogUtils extends java.lang.ObjectUtility class for announce plugin
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringCONSTANT_ANDstatic intCONSTANT_ID_NULLstatic java.lang.StringCONSTANT_LINK_TARGET_NEW_WINDOWstatic java.lang.StringCONSTANT_PARAMETER_BLOGstatic java.lang.StringCONSTANT_PARAMETER_IDstatic java.lang.StringCONSTANT_TYPE_RESOURCEstatic java.lang.StringCONSTANT_WHEREstatic java.lang.StringTEMPLATE_INSERT_BLOG_LINK
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidaddHeaderResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String strFileName)write the http header in the responsestatic BlogSearchFilterbuildBlogSearchFilter(java.lang.String searchKeyword, java.lang.String[] searchTagsArray, fr.paris.lutece.portal.business.user.AdminUser user, int isUnpublished, java.lang.String strDateUpdateBlogAfter, java.lang.String strDateUpdateBlogBefore, java.lang.String userEditor, java.util.Locale locale)Create a Blog search filter with specific values.static java.lang.StringbuildCustomBlogLink(java.lang.String customLinkUrl, java.lang.String customLinkText, java.lang.String customLinkTitle, java.lang.String targetedWindow)Create an HTML link to reach the specified URLstatic java.lang.StringbuildRequetteWithFilter(java.lang.String strSelect, java.util.List<java.lang.String> listStrFilter, java.lang.String strOrder)Builds a query with filters placed in parametersstatic fr.paris.lutece.portal.service.plugin.PlugingetPlugin()Gets the pluginstatic java.lang.StringremoveAccents(java.lang.String text)
-
-
-
Field Detail
-
CONSTANT_WHERE
public static final java.lang.String CONSTANT_WHERE
- See Also:
- Constant Field Values
-
CONSTANT_AND
public static final java.lang.String CONSTANT_AND
- See Also:
- Constant Field Values
-
CONSTANT_ID_NULL
public static final int CONSTANT_ID_NULL
- See Also:
- Constant Field Values
-
CONSTANT_TYPE_RESOURCE
public static final java.lang.String CONSTANT_TYPE_RESOURCE
- See Also:
- Constant Field Values
-
CONSTANT_PARAMETER_BLOG
public static final java.lang.String CONSTANT_PARAMETER_BLOG
- See Also:
- Constant Field Values
-
CONSTANT_PARAMETER_ID
public static final java.lang.String CONSTANT_PARAMETER_ID
- See Also:
- Constant Field Values
-
CONSTANT_LINK_TARGET_NEW_WINDOW
public static final java.lang.String CONSTANT_LINK_TARGET_NEW_WINDOW
- See Also:
- Constant Field Values
-
TEMPLATE_INSERT_BLOG_LINK
public static final java.lang.String TEMPLATE_INSERT_BLOG_LINK
- See Also:
- Constant Field Values
-
-
Method Detail
-
buildRequetteWithFilter
public static java.lang.String buildRequetteWithFilter(java.lang.String strSelect, java.util.List<java.lang.String> listStrFilter, java.lang.String strOrder)Builds a query with filters placed in parameters- Parameters:
strSelect- the select of the querylistStrFilter- the list of filter to add in the querystrOrder- the order by of the query- Returns:
- a query
-
addHeaderResponse
public static void addHeaderResponse(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.String strFileName)write the http header in the response- Parameters:
request- the httpServletRequestresponse- the http responsestrFileName- the name of the file who must insert in the response
-
buildBlogSearchFilter
public static BlogSearchFilter buildBlogSearchFilter(java.lang.String searchKeyword, java.lang.String[] searchTagsArray, fr.paris.lutece.portal.business.user.AdminUser user, int isUnpublished, java.lang.String strDateUpdateBlogAfter, java.lang.String strDateUpdateBlogBefore, java.lang.String userEditor, java.util.Locale locale)
Create a Blog search filter with specific values. The unnecessary parameters can be replaced by null values- Parameters:
searchKeyword- Keywords to search for in the blog postssearchTagsArray- Specific tags to search foruser- Filter by the user who created the blogisUnpublished- Search for blogs currently unpublished. Set to '0' to retrieve all blogs, '1' published, '2' unpublishedstrDateUpdateBlogAfter- Filter by blogs updated after a specific datestrDateUpdateBlogBefore- Filter by blogs updated before a specific dateuserEditor- Filter by the last user who edited the bloglocale- The Locale to use for the dates' format- Returns:
- the BlogSearchFilter objects created with the given parameters
-
buildCustomBlogLink
public static java.lang.String buildCustomBlogLink(java.lang.String customLinkUrl, java.lang.String customLinkText, java.lang.String customLinkTitle, java.lang.String targetedWindow)Create an HTML link to reach the specified URL- Parameters:
customLinkUrl- URL of the linkcustomLinkText- Text to display in the linkcustomLinkTitle- Title of the linktargetedWindow- Window where the link will be opened ("_self", "_blank", etc.). Opens in new window by default ("_blank")- Returns:
- the HTML link to the specified url
-
getPlugin
public static fr.paris.lutece.portal.service.plugin.Plugin getPlugin()
Gets the plugin- Returns:
- the plugin
-
removeAccents
public static java.lang.String removeAccents(java.lang.String text)
-
-