fr.paris.lutece.plugins.contextinclude.service
Interface IContextService

All Known Implementing Classes:
ContextService

public interface IContextService

IContextService


Method Summary
 void create(Context context)
          Create a new context
 void doReorderContexts()
          Reorder all demand types
 void doReorderContextsGreaterPriority(int nCurrentPriority)
          Reorder the contexts that are greater or equal to the nCurrentPriority.
 java.util.List<Context> findActiveContexts()
          Find active contexts
 java.util.List<Context> findAll()
          Find all contexts
 Context findByPrimaryKey(int nIdContext)
          Find context by its primary key
 java.util.List<Context> findByRelativePriority(OperatorEnum operator, int nPriority)
          Find by relative priority
 boolean isWellOrdered()
          Check if the list of contexts are well ordered
 void remove(int nIdContext)
          Remove a context
 void update(Context context)
          Update a context
 

Method Detail

create

@Transactional(value="contextinclude.transactionManager")
void create(Context context)
Create a new context

Parameters:
context - the context

update

@Transactional(value="contextinclude.transactionManager")
void update(Context context)
Update a context

Parameters:
context - a context

remove

@Transactional(value="contextinclude.transactionManager")
void remove(int nIdContext)
Remove a context

Parameters:
nIdContext - the id context

findByPrimaryKey

Context findByPrimaryKey(int nIdContext)
Find context by its primary key

Parameters:
nIdContext - the id context
Returns:
a Context

findAll

java.util.List<Context> findAll()
Find all contexts

Returns:
a list of Context

findActiveContexts

java.util.List<Context> findActiveContexts()
Find active contexts

Returns:
a list of Context

findByRelativePriority

java.util.List<Context> findByRelativePriority(OperatorEnum operator,
                                               int nPriority)
Find by relative priority

Parameters:
operator - the operator
nPriority - the priority to compare to
Returns:
a list of Context

isWellOrdered

boolean isWellOrdered()
Check if the list of contexts are well ordered

Returns:
true if it is well ordered, false otherwise

doReorderContexts

void doReorderContexts()
Reorder all demand types


doReorderContextsGreaterPriority

void doReorderContextsGreaterPriority(int nCurrentPriority)
Reorder the contexts that are greater or equal to the nCurrentPriority.
Those context orders are move up by 1.

Parameters:
nCurrentPriority - the current priority


Copyright © 2012 Mairie de Paris. All Rights Reserved.