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

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

public class DirectoryService
extends java.lang.Object

FormService


Constructor Summary
DirectoryService()
           
 
Method Summary
 java.util.List<Field> getFieldsListFromIdEntry(int nIdEntry)
          Get the list of fields from a given id entry
static DirectoryService getInstance()
          Returns the instance of the singleton
 java.util.Map<java.lang.String,java.lang.Object> getManageAdvancedParameters(fr.paris.lutece.portal.business.user.AdminUser user)
          Build the advanced parameters management
 int getMaxNumber(IEntry entry)
          Get the max number
 java.util.Map<java.lang.String,java.lang.String> getModelForEntryForXml(IEntry entry)
          Get the model for entry for xml
 int getNumber(IEntry entry, java.lang.String strNumber)
          Get the number to insert to the entry type numbering.
 java.util.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
 java.util.Map<java.lang.String,java.lang.Object> getResourceAction(Record record, Directory directory, java.util.List<IEntry> listEntryResultSearch, java.util.Locale locale, fr.paris.lutece.portal.business.user.AdminUser adminUser, java.util.List<DirectoryAction> listActionsForDirectoryEnable, java.util.List<DirectoryAction> listActionsForDirectoryDisable, boolean bGetFileName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the resource action for a record
 java.lang.String getUserGuid(int nIdRecord, int nIdEntry)
          Get the user guid from a given id record and id entry.
 fr.paris.lutece.util.ReferenceList getUserInfos(java.lang.String strUserGuid, int nIdEntry)
          Get the user infos from a given id record and id entry.
 java.lang.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 java.util.Map<java.lang.String,java.lang.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(java.lang.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 java.lang.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:
nIdEntryTypeNumbering - the id entry type numbering
nIdDirectory - the id directory
Returns:
the max number

getNumber

public int getNumber(IEntry entry,
                     java.lang.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 java.util.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 java.util.Map<java.lang.String,java.lang.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

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 java.lang.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 java.util.Map<java.lang.String,java.lang.Object> getResourceAction(Record record,
                                                                          Directory directory,
                                                                          java.util.List<IEntry> listEntryResultSearch,
                                                                          java.util.Locale locale,
                                                                          fr.paris.lutece.portal.business.user.AdminUser adminUser,
                                                                          java.util.List<DirectoryAction> listActionsForDirectoryEnable,
                                                                          java.util.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 java.util.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 © 2012 Mairie de Paris. All Rights Reserved.