public class DemandTypeService extends Object
Modifier | Constructor and Description |
---|---|
protected |
DemandTypeService()
Constructor
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkRoleForDemandType(DemandType demandType,
javax.servlet.http.HttpServletRequest request)
Check if the user has the role in order to view the demand type
|
int |
create(DemandType demandType)
Create a new demand type
|
void |
doReorderDemandTypes()
Reorder all demand types
|
void |
doReorderDemandTypesGreaterOrder(int nCurrentOrder,
int nOldOrder)
Reorder the demand types that are greater or equal to the
nCurrentOrder . |
void |
doReorderDemandTypesLowerOrder(int nCurrentOrder,
int nOldOrder)
Reorder the demand types that have a lower order than the
nCurrentOrder . |
List<DemandType> |
findAll()
Find all demand types
|
List<DemandType> |
findByFilter(DemandTypeFilter dtFilter)
Find the demand types given a filter
|
DemandType |
findByOrder(int nOrder)
Find a demand type by its order
|
DemandType |
findByPrimaryKey(int nIdDemandType)
Find a demand type by its primary key
|
fr.paris.lutece.util.ReferenceList |
findDemandTypes()
Find all demand types as a
ReferenceList |
Map<String,List<DemandType>> |
findForLuteceUser(javax.servlet.http.HttpServletRequest request)
Find the list of demand types for the lutece user ordered by id category
|
List<DemandType> |
findForLuteceUser(javax.servlet.http.HttpServletRequest request,
int nIdCategory)
Find the list of demand types for the lutece user and a category
|
int |
findMaxOrder()
Find the max order + 1
|
List<DemandType> |
findNoDateEndDemandTypes()
Find the list of demand types that have not a date end
|
fr.paris.lutece.util.ReferenceList |
getOperatorsList()
Get the list of operators as a
ReferenceList |
fr.paris.lutece.util.ReferenceList |
getRolesList()
Get the list of MyLutece role as a
ReferenceList |
static DemandTypeService |
getService()
Get the instance of
DemandTypeService |
fr.paris.lutece.util.ReferenceList |
getTargetsList()
Get the list of targets as a
ReferenceList |
static void |
init()
Initialize the service
|
boolean |
isWellOrdered()
Check if the list of demand types are well ordered
|
void |
remove(int nIdDemandType)
Remove a demand type
|
void |
update(DemandType demandType)
Update a demand type
|
public static DemandTypeService getService()
DemandTypeService
DemandTypeService
public static void init()
public int create(DemandType demandType)
demandType
- the demand typepublic void update(DemandType demandType)
demandType
- the demand typepublic void remove(int nIdDemandType)
nIdDemandType
- the ID demand typepublic DemandType findByPrimaryKey(int nIdDemandType)
nIdDemandType
- the id demand typeDemandType
public DemandType findByOrder(int nOrder)
nOrder
- the orderDemandType
public List<DemandType> findAll()
DemandType
public fr.paris.lutece.util.ReferenceList findDemandTypes()
ReferenceList
ReferenceList
public int findMaxOrder()
public List<DemandType> findByFilter(DemandTypeFilter dtFilter)
dtFilter
- the filterDemandType
public List<DemandType> findForLuteceUser(javax.servlet.http.HttpServletRequest request, int nIdCategory)
request
- HttpServletRequest
nIdCategory
- the category Id Selectedpublic Map<String,List<DemandType>> findForLuteceUser(javax.servlet.http.HttpServletRequest request)
request
- HttpServletRequest
public List<DemandType> findNoDateEndDemandTypes()
public fr.paris.lutece.util.ReferenceList getRolesList()
ReferenceList
ReferenceList
public fr.paris.lutece.util.ReferenceList getOperatorsList()
ReferenceList
ReferenceList
public fr.paris.lutece.util.ReferenceList getTargetsList()
ReferenceList
ReferenceList
public void doReorderDemandTypes()
public void doReorderDemandTypesGreaterOrder(int nCurrentOrder, int nOldOrder)
nCurrentOrder
. nOldOrder
is ignored in the process.nCurrentOrder
- the current ordernOldOrder
- the order to ignorepublic void doReorderDemandTypesLowerOrder(int nCurrentOrder, int nOldOrder)
nCurrentOrder
. nOldOrder
is ignored in the process.nCurrentOrder
- the current ordernOldOrder
- the order to ignorepublic boolean checkRoleForDemandType(DemandType demandType, javax.servlet.http.HttpServletRequest request)
demandType
- the demand typerequest
- HttpServletRequest
public boolean isWellOrdered()
Copyright © 2019 City of Paris. All rights reserved.