com.google.code.ssm.test.svc
Interface AppUserService

All Known Implementing Classes:
AppUserServiceImpl

public interface AppUserService

Author:
Jakub BiaƂek

Method Summary
 void disableAppForUser(int userId, int applicationId)
          Uninstall application for user.
 void enableAppForUser(int userId, int applicationId, boolean favourite)
          Installs application for user.
 AppUser get(int userId, int applicationId)
          Returns application - user association
 List<AppUser> getInstalledList(int userId, List<Integer> applicationsIds)
          Returns application - user associations
 List<AppUser> getList(int userId)
          Get the list of AppUser entities for specified user that contains authorized and unauthorized (uninstalled) applications.
 List<AppUser> getList(int userId, boolean authorized)
          Get the list of AppUser entities for specified portal user.
 List<Integer> getUserIdsList(int applicationId, List<Integer> userIds)
          Gets the sublist of given users IDs list that contains only those users that installed given application.
 boolean isEnabled(int userId, int applicationId)
          Check if the user (by UID) is user of selected application.
 

Method Detail

get

AppUser get(int userId,
            int applicationId)
Returns application - user association

Parameters:
userId - user ID
applicationId - application ID
Returns:
AppUser for given user and application

getList

List<AppUser> getList(int userId)
Get the list of AppUser entities for specified user that contains authorized and unauthorized (uninstalled) applications.

Parameters:
userId - the portal user ID
Returns:
list of all AppUser of given user

getList

List<AppUser> getList(int userId,
                      boolean authorized)
Get the list of AppUser entities for specified portal user.

Parameters:
userId - the portal user ID
authorized - if true the only authorized applications will be returned, otherwise other unauthorized (uninstalled) application will be returned
Returns:
list of authorized or unauthorized AppUser of given user

getInstalledList

List<AppUser> getInstalledList(int userId,
                               List<Integer> applicationsIds)
Returns application - user associations

Parameters:
userId - user ID
applicationsIds - the IDs of applications
Returns:
list of installed (authorized) AppUser of given user with given applications' IDs

getUserIdsList

List<Integer> getUserIdsList(int applicationId,
                             List<Integer> userIds)
Gets the sublist of given users IDs list that contains only those users that installed given application.

Parameters:
applicationId -
userIds - portal user IDs
Returns:
find who have installed the selected application

isEnabled

boolean isEnabled(int userId,
                  int applicationId)
Check if the user (by UID) is user of selected application.

Parameters:
userId - the user portal ID
applicationId - the application ID
Returns:
true if given portal user is a user of selected application (authorized = true)

enableAppForUser

void enableAppForUser(int userId,
                      int applicationId,
                      boolean favourite)
Installs application for user.

Parameters:
userId - the portal user ID
applicationId - the application ID
favourite - is application marked as favourite

disableAppForUser

void disableAppForUser(int userId,
                       int applicationId)
Uninstall application for user.

Parameters:
userId - the portal user ID
applicationId - the application ID


Copyright © 2014. All rights reserved.