fr.paris.lutece.plugins.directory.service
Class DirectoryService

java.lang.Object
  extended by fr.paris.lutece.plugins.directory.service.DirectoryService

public class DirectoryService
extends Object

Directory Service


Constructor Summary
DirectoryService()
           
 
Method Summary
 List<Field> getFieldsListFromIdEntry(int nIdEntry)
          Get the list of fields from a given id entry
static DirectoryService getInstance()
          Returns the instance of the singleton
 Map<String,Object> getManageAdvancedParameters(fr.paris.lutece.portal.business.user.AdminUser user)
          Build the advanced parameters management
 int getMaxNumber(IEntry entry)
          Get the max number
 Map<String,String> getModelForEntryForXml(IEntry entry)
          Get the model for entry for xml
 int getNumber(IEntry entry, String strNumber)
          Get the number to insert to the entry type numbering.
 List<RecordField> getRecordFieldByFilter(RecordFieldFilter recordFieldFilter)
          Get the list of record fields from a given Filter
 int getRecordsCount(Directory directory, fr.paris.lutece.portal.business.user.AdminUser user)
          Get the records count
 Map<String,Object> getResourceAction(Record record, Directory directory, List<IEntry> listEntryResultSearch, Locale locale, fr.paris.lutece.portal.business.user.AdminUser adminUser, List<DirectoryAction> listActionsForDirectoryEnable, List<DirectoryAction> listActionsForDirectoryDisable, boolean bGetFileName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the resource action for a record
 String getUserGuid(int nIdRecord, int nIdEntry)
          Get the user guid from a given id record and id entry.
 fr.paris.lutece.util.ReferenceList getUserInfos(String strUserGuid, int nIdEntry)
          Get the user infos from a given id record and id entry.
 String getWSRestUrl(IEntry entry, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the WS rest url from a given entry
 void init()
          Initialize the Form service
 void removeAsynchronousFile(RecordField recordField, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove asynchronous file
 boolean showXY(IEntry entry)
          Check if the entry must show the X and Y or not
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DirectoryService

public DirectoryService()
Method Detail

init

public void init()
Initialize the Form service


getInstance

public static DirectoryService getInstance()
Returns the instance of the singleton

Returns:
The instance of the singleton

getManageAdvancedParameters

public Map<String,Object> getManageAdvancedParameters(fr.paris.lutece.portal.business.user.AdminUser user)
Build the advanced parameters management

Parameters:
user - the current user
Returns:
The model for the advanced parameters

getRecordsCount

public int getRecordsCount(Directory directory,
                           fr.paris.lutece.portal.business.user.AdminUser user)
Get the records count

Parameters:
directory - the Directory
user - the AdminUser
Returns:
the record count

getUserInfos

public fr.paris.lutece.util.ReferenceList getUserInfos(String strUserGuid,
                                                       int nIdEntry)
Get the user infos from a given id record and id entry.
The retrieval of the user infos depends on the entry type :

Parameters:
strUserGuid - the user guid
nIdEntry - the id entry
Returns:
a ReferenceList

getUserGuid

public String getUserGuid(int nIdRecord,
                          int nIdEntry)
Get the user guid from a given id record and id entry.
Return an empty string if the entry is not an EntryTypeMyLuteceUser nor EntryTypeRemoteMyLuteceUser

Parameters:
nIdRecord - the id record
nIdEntry - the id entry
Returns:
the user GUID

getMaxNumber

public int getMaxNumber(IEntry entry)
Get the max number

Parameters:
entry - the entry
Returns:
the max number

getNumber

public int getNumber(IEntry entry,
                     String strNumber)
              throws DirectoryErrorException
Get the number to insert to the entry type numbering.

Parameters:
entry - the entry type numbering
strNumber - the number to insert
Returns:
the number
Throws:
DirectoryErrorException - exception if the number already exists on an another record field

getFieldsListFromIdEntry

public List<Field> getFieldsListFromIdEntry(int nIdEntry)
Get the list of fields from a given id entry

Parameters:
nIdEntry - the id entry
Returns:
a list of fields

getModelForEntryForXml

public Map<String,String> getModelForEntryForXml(IEntry entry)
Get the model for entry for xml

Parameters:
entry - the entry
Returns:
the model

showXY

public boolean showXY(IEntry entry)
Check if the entry must show the X and Y or not

Parameters:
entry - The entry
Returns:
true if it must show, false otherwise

removeAsynchronousFile

public void removeAsynchronousFile(RecordField recordField,
                                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove asynchronous file

Parameters:
recordField - the record field
plugin - the plugin

getWSRestUrl

public String getWSRestUrl(IEntry entry,
                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the WS rest url from a given entry

Parameters:
entry - the entry
plugin - the plugin
Returns:
the ws rest url

getResourceAction

public Map<String,Object> getResourceAction(Record record,
                                            Directory directory,
                                            List<IEntry> listEntryResultSearch,
                                            Locale locale,
                                            fr.paris.lutece.portal.business.user.AdminUser adminUser,
                                            List<DirectoryAction> listActionsForDirectoryEnable,
                                            List<DirectoryAction> listActionsForDirectoryDisable,
                                            boolean bGetFileName,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the resource action for a record

Parameters:
record - the record
directory - the directory
listEntryResultSearch - the list of entry
locale - the locale
adminUser - the AdminUser
plugin - the plugin
Returns:
a map of string - object

getRecordFieldByFilter

public List<RecordField> getRecordFieldByFilter(RecordFieldFilter recordFieldFilter)
Get the list of record fields from a given Filter

Parameters:
recordFieldFilter - the filter
Returns:
a map of (user attribute name, user attribute value)


Copyright © 2013 Mairie de Paris. All Rights Reserved.