fr.paris.lutece.plugins.myapps.modules.database.service
Class MyAppsDatabaseService

java.lang.Object
  extended by fr.paris.lutece.plugins.myapps.modules.database.service.MyAppsDatabaseService

public final class MyAppsDatabaseService
extends java.lang.Object

MyAppsDatabaseService


Constructor Summary
MyAppsDatabaseService()
           
 
Method Summary
 void create(MyAppsDatabase myApp, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create a new MyAppsDatabase
 void createMyAppUser(MyAppsDatabaseUser myAppsUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Create a new MyAppsDatabaseUser
 fr.paris.lutece.plugins.myapps.business.MyApps findByPrimaryKey(int nMyAppId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Returns an instance of a myApps whose identifier is specified in parameter
 fr.paris.lutece.plugins.myapps.business.MyAppsUser getCredential(int nMyAppId, java.lang.String strUserName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Loads the data of all the myAppsUsers and returns them in form of a collection
 fr.paris.lutece.portal.service.image.ImageResource getImageResource(int nMyAppId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the image resource
static MyAppsDatabaseService getInstance()
          Returns the instance of the singleton
 fr.paris.lutece.util.ReferenceList getMyApps(fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Get the list of MyApps
 java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> getMyAppsListByFilter(MyAppsDatabaseFilter filter, boolean bIsAscSort, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Loads a list of myApps belonging to a filter
 java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Boolean>> getMyAppsPermissions(java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> listMyApps, fr.paris.lutece.portal.business.user.AdminUser user)
          Get the permissions for each MyApps
 java.lang.String getResourceImageUrl(java.lang.String strMyAppId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Management of the image associated to the application
 void init()
          Initialize the Database service
 void remove(int nMyAppId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Remove a MyAppsDatabase
 void removeMyAppUser(int nMyAppsUserId, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a MyAppsDatabaseUser
 void removeMyAppUser(int nMyAppId, java.lang.String strUserName, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Delete a MyAppsDatabaseUser
 java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> selectMyAppsList(MyAppsDatabaseFilter filter, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Select the MyApps list
 void update(MyAppsDatabase myApp, boolean bUpdateIcon, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update a MyAppsDatabase
 void updateMyAppUser(MyAppsDatabaseUser myAppsUser, fr.paris.lutece.portal.service.plugin.Plugin plugin)
          Update a MyAppsDatabaseUser
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MyAppsDatabaseService

public MyAppsDatabaseService()
Method Detail

init

public void init()
Initialize the Database service


getInstance

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

Returns:
The instance of the singleton

getMyApps

public fr.paris.lutece.util.ReferenceList getMyApps(fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the list of MyApps

Parameters:
plugin - Plugin
Returns:
a list of MyAppsDatabase

findByPrimaryKey

public fr.paris.lutece.plugins.myapps.business.MyApps findByPrimaryKey(int nMyAppId,
                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Returns an instance of a myApps whose identifier is specified in parameter

Parameters:
nMyAppId - The myApps primary key
plugin - the Plugin
Returns:
an instance of MyApps

selectMyAppsList

public java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> selectMyAppsList(MyAppsDatabaseFilter filter,
                                                                                       fr.paris.lutece.portal.service.plugin.Plugin plugin)
Select the MyApps list

Parameters:
filter - the app filter
plugin - Plugin
Returns:
a list of MyApps

getMyAppsPermissions

public java.util.Map<java.lang.String,java.util.Map<java.lang.String,java.lang.Boolean>> getMyAppsPermissions(java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> listMyApps,
                                                                                                              fr.paris.lutece.portal.business.user.AdminUser user)
Get the permissions for each MyApps

Parameters:
listMyApps - a list of MyApps
user - the current AdminUser
Returns:
a map of permissions

create

public void create(MyAppsDatabase myApp,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create a new MyAppsDatabase

Parameters:
myApp - the MyAppsDatabase to create
plugin - Plugin

update

public void update(MyAppsDatabase myApp,
                   boolean bUpdateIcon,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a MyAppsDatabase

Parameters:
myApp - the MyAppsDatabase to update
bUpdateIcon - true if the icon must be updated, false otherwise
plugin - Plugin

remove

public void remove(int nMyAppId,
                   fr.paris.lutece.portal.service.plugin.Plugin plugin)
Remove a MyAppsDatabase

Parameters:
nMyAppId - the MyApp Id
plugin - Plugin

getImageResource

public fr.paris.lutece.portal.service.image.ImageResource getImageResource(int nMyAppId,
                                                                           fr.paris.lutece.portal.service.plugin.Plugin plugin)
Get the image resource

Parameters:
nMyAppId - the MyApp Id
plugin - Plugin
Returns:
the image resource

createMyAppUser

public void createMyAppUser(MyAppsDatabaseUser myAppsUser,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Create a new MyAppsDatabaseUser

Parameters:
myAppsUser - the MyAppsDatabaseUser to create
plugin - Plugin

updateMyAppUser

public void updateMyAppUser(MyAppsDatabaseUser myAppsUser,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Update a MyAppsDatabaseUser

Parameters:
myAppsUser - the MyAppsDatabaseUser to update
plugin - Plugin

removeMyAppUser

public void removeMyAppUser(int nMyAppsUserId,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a MyAppsDatabaseUser

Parameters:
nMyAppsUserId - the MyAppsUser Id
plugin - Plugin

removeMyAppUser

public void removeMyAppUser(int nMyAppId,
                            java.lang.String strUserName,
                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Delete a MyAppsDatabaseUser

Parameters:
nMyAppId - the MyApp Id
strUserName - the user name
plugin - Plugin

getMyAppsListByFilter

public java.util.List<fr.paris.lutece.plugins.myapps.business.MyApps> getMyAppsListByFilter(MyAppsDatabaseFilter filter,
                                                                                            boolean bIsAscSort,
                                                                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads a list of myApps belonging to a filter

Parameters:
filter - the app filter
bIsAscSort - true if it is sorted ascendly, false otherwise
plugin - the Plugin
Returns:
the collection which contains the data of all the myApps

getResourceImageUrl

public java.lang.String getResourceImageUrl(java.lang.String strMyAppId,
                                            fr.paris.lutece.portal.service.plugin.Plugin plugin)
Management of the image associated to the application

Parameters:
strMyAppId - The myapp identifier
plugin - Plugin
Returns:
the URL of the image resource

getCredential

public fr.paris.lutece.plugins.myapps.business.MyAppsUser getCredential(int nMyAppId,
                                                                        java.lang.String strUserName,
                                                                        fr.paris.lutece.portal.service.plugin.Plugin plugin)
Loads the data of all the myAppsUsers and returns them in form of a collection

Parameters:
nMyAppId - the ID of the appication
strUserName - the user name
plugin - the Plugin
Returns:
a MyAppsUser


Copyright © 2012 Mairie de Paris. All Rights Reserved.