fr.paris.lutece.plugins.document.service.category
Class CategoryService

java.lang.Object
  extended by fr.paris.lutece.plugins.document.service.category.CategoryService
All Implemented Interfaces:
fr.paris.lutece.portal.service.image.ImageResourceProvider

public class CategoryService
extends java.lang.Object
implements fr.paris.lutece.portal.service.image.ImageResourceProvider

This classe provide services for Category


Nested Class Summary
 class CategoryService.CategoryDisplay
          This class defines a CategoryDisplay object intended to be used in freemarker templates It provide the Category object and other informations.
 
Method Summary
static java.util.Collection<CategoryService.CategoryDisplay> getAllCategoriesDisplay(fr.paris.lutece.portal.business.user.AdminUser user)
          Get all Category converted to CategoryDisplay objects
static java.util.Collection<CategoryService.CategoryDisplay> getAllCategoriesDisplay(int[] arrayIdCategory, fr.paris.lutece.portal.business.user.AdminUser user)
          Get all Category converted to CategoryDisplay objects and tagged with the assigned value when lists of categories matched
static java.util.Collection<CategoryService.CategoryDisplay> getAllCategoriesDisplay(java.util.List<Category> listCategory, fr.paris.lutece.portal.business.user.AdminUser user)
          Get all Category converted to CategoryDisplay objects and tagged with the assigned value when lists of categories matched
static CategoryService.CategoryDisplay getCategoryDisplay(int nIdCategory)
          Return a CategoryDisplay object for a specified Category
 fr.paris.lutece.portal.service.image.ImageResource getImageResource(int nIdCategory)
          Get the resource for image
static CategoryService getInstance()
          Get the unique instance of the service
static java.lang.String getResourceImageCategory(int nCategoryId)
          Management of the image associated to the Category
 java.lang.String getResourceTypeId()
          Get the type of resource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static CategoryService getInstance()
Get the unique instance of the service

Returns:
The unique instance

getImageResource

public fr.paris.lutece.portal.service.image.ImageResource getImageResource(int nIdCategory)
Get the resource for image

Specified by:
getImageResource in interface fr.paris.lutece.portal.service.image.ImageResourceProvider
Parameters:
nIdCategory - The identifier of Category object
Returns:
The ImageResource

getResourceTypeId

public java.lang.String getResourceTypeId()
Get the type of resource

Specified by:
getResourceTypeId in interface fr.paris.lutece.portal.service.image.ImageResourceProvider
Returns:
The type of resource

getAllCategoriesDisplay

public static java.util.Collection<CategoryService.CategoryDisplay> getAllCategoriesDisplay(fr.paris.lutece.portal.business.user.AdminUser user)
Get all Category converted to CategoryDisplay objects

Parameters:
user - The current user
Returns:
The Collection of CategoryDisplay

getAllCategoriesDisplay

public static java.util.Collection<CategoryService.CategoryDisplay> getAllCategoriesDisplay(int[] arrayIdCategory,
                                                                                            fr.paris.lutece.portal.business.user.AdminUser user)
Get all Category converted to CategoryDisplay objects and tagged with the assigned value when lists of categories matched

Parameters:
arrayIdCategory - The array of Id categories
user - The current user
Returns:
The Collection of CategoryDisplay

getAllCategoriesDisplay

public static java.util.Collection<CategoryService.CategoryDisplay> getAllCategoriesDisplay(java.util.List<Category> listCategory,
                                                                                            fr.paris.lutece.portal.business.user.AdminUser user)
Get all Category converted to CategoryDisplay objects and tagged with the assigned value when lists of categories matched

Parameters:
listCategory - The list of ca t
user - The current user
Returns:
A Collection of CategoryDisplay object

getCategoryDisplay

public static CategoryService.CategoryDisplay getCategoryDisplay(int nIdCategory)
Return a CategoryDisplay object for a specified Category

Parameters:
nIdCategory - The id of Category
Returns:
The CategoryDisplay object

getResourceImageCategory

public static java.lang.String getResourceImageCategory(int nCategoryId)
Management of the image associated to the Category

Parameters:
nCategoryId - The Category identifier
Returns:
The url of the resource


Copyright © 2010 Mairie de Paris. All Rights Reserved.