org.sakaiproject.profile2.logic
Class SakaiProxyImpl

java.lang.Object
  extended by org.sakaiproject.profile2.logic.SakaiProxyImpl
All Implemented Interfaces:
SakaiProxy

public class SakaiProxyImpl
extends Object
implements SakaiProxy

Implementation of SakaiProxy for Profile2.

Author:
Steve Swinsburg (s.swinsburg@lancaster.ac.uk)

Constructor Summary
SakaiProxyImpl()
           
 
Method Summary
 org.sakaiproject.site.api.Site addSite(String id, String type)
          
 boolean checkForSite(String siteId)
          
 boolean checkForUser(String userId)
          
 boolean checkForUserByEid(String eid)
          
 org.sakaiproject.api.common.edu.person.SakaiPerson createSakaiPerson(String userId)
          
 String createUuid()
          
 boolean currentUserMatchesRequest(String userUuid)
          
 String ensureUuid(String userId)
          
 List<String> getAcademicEntityConfigurationSet()
          
 List<String> getActiveUsers(List<String> userUuids)
          
 String getCurrentSiteId()
          
 String getCurrentToolTitle()
          
 org.sakaiproject.user.api.User getCurrentUser()
          
 String getCurrentUserId()
          
 String getDirectUrlToUserProfile(String userId, String extraParams)
          
 String getFullPortalUrl()
          
 List<String> getInvisibleUsers()
          
 Long getLastEventTimeForUser(String userUuid)
          
 Map<String,Long> getLastEventTimeForUsers(List<String> userUuids)
          
 int getMaxProfilePictureSize()
          
 int getMaxSearchResults()
          
 int getMaxSearchResultsPerPage()
          
 List<String> getMinimalEntityConfigurationSet()
          
 String getOfficialImageAttribute()
          
 String getOfficialImageSource()
          
 HashMap<String,Object> getOverriddenPrivacySettings()
          
 String getPortalPath()
          
 String getPortalUrl()
          
 String getProfileGalleryImagePath(String userId, String imageId)
          
 String getProfileGalleryThumbnailPath(String userId, String imageId)
          
 String getProfileImageResourcePath(String userId, int type)
          
 String getProfileImportCsvPath()
          
 int getProfilePictureType()
          
 MimeTypeByteArray getResource(String resourceId)
          
 org.sakaiproject.api.common.edu.person.SakaiPerson getSakaiPerson(String userId)
          
 String getSakaiPersonImageUrl(String userId)
          
 byte[] getSakaiPersonJpegPhoto(String userId)
          
 org.sakaiproject.api.common.edu.person.SakaiPerson getSakaiPersonPrototype()
          
 String getServerConfigurationParameter(String key, String def)
          
 String getServerName()
          
 String getServerUrl()
          
 String getServiceName()
          
 org.sakaiproject.site.api.Site getSite(String siteId)
          
 String getSkinRepoProperty()
          
 org.sakaiproject.tool.api.Tool getTool(String id)
          
 String getToolSkinCSS(String skinRepo)
          
 List<String> getToolsRequired(String category)
          
 String getTwitterSource()
          
 org.sakaiproject.user.api.User getUserById(String userId)
          
 String getUserDisplayName(String userId)
          
 String getUserEid(String userId)
          
 String getUserEmail(String userId)
          
 String getUserFirstName(String userId)
          
 String getUserHomeUrl()
          
 String getUserIdForEid(String eid)
          
 String getUserLastName(String userId)
          
 org.sakaiproject.user.api.User getUserQuietly(String userId)
          
 List<org.sakaiproject.user.api.User> getUsers(List<String> userIds)
          
 List<org.sakaiproject.site.api.Site> getUserSites()
          
 String getUserType(String userId)
          
 List<String> getUuids(List<org.sakaiproject.user.api.User> users)
          
 void init()
          init
 boolean isAccountUpdateAllowed(String userId)
          
 boolean isAdminUser()
          
 boolean isBusinessProfileEnabled()
          
 boolean isConnectionAllowedBetweenUserTypes(String requestingUserType, String targetUserType)
          
 boolean isGoogleIntegrationEnabledGlobally()
          
 boolean isGravatarImageEnabledGlobally()
          
 boolean isLoggedIn()
          
 boolean isOfficialImageEnabledGlobally()
          
 boolean isPrivacyChangeAllowedGlobally()
          
 boolean isProfileConversionEnabled()
          
 boolean isProfileGalleryEnabledGlobally()
          
 boolean isProfileImportEnabled()
          
 boolean isProfilePictureChangeEnabled()
          
 boolean isSuperUser()
          
 boolean isSuperUserAndProxiedToUser(String userId)
          
 boolean isTwitterIntegrationEnabledGlobally()
          
 boolean isUserActive(String userUuid)
          
 boolean isUserAllowedAddSite(String userUuid)
          
 boolean isUserAllowedInSite(String userId, String permission, String siteId)
          
 boolean isUserMyWorkspace(String siteId)
          
 boolean isUsingNormalPortal()
          
 boolean isUsingOfficialImageButAlternateSelectionEnabled()
          
 boolean isWallDefaultProfilePage()
          
 boolean isWallEnabledGlobally()
          
 void postEvent(String event, String reference, boolean modify)
          
 boolean removeResource(String resourceId)
          
 boolean saveFile(String fullResourceId, String userId, String fileName, String mimeType, byte[] fileData)
          
 boolean saveSite(org.sakaiproject.site.api.Site site)
          
 List<org.sakaiproject.user.api.User> searchExternalUsers(String search)
          
 List<org.sakaiproject.user.api.User> searchUsers(String search)
          
 void sendEmail(List<String> userIds, String emailTemplateKey, Map<String,String> replacementValues)
          
 void sendEmail(String userId, String emailTemplateKey, Map<String,String> replacementValues)
          
 void sendEmail(String userId, String subject, String message)
          
 boolean toggleProfileLocked(String userId, boolean locked)
          
 void updateEmailForUser(String userId, String email)
          
 void updateNameForUser(String userId, String firstName, String lastName)
          
 boolean updateSakaiPerson(org.sakaiproject.api.common.edu.person.SakaiPerson sakaiPerson)
          
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SakaiProxyImpl

public SakaiProxyImpl()
Method Detail

getCurrentSiteId

public String getCurrentSiteId()

Specified by:
getCurrentSiteId in interface SakaiProxy

getCurrentUserId

public String getCurrentUserId()

Specified by:
getCurrentUserId in interface SakaiProxy

getCurrentUser

public org.sakaiproject.user.api.User getCurrentUser()

Specified by:
getCurrentUser in interface SakaiProxy

getUserEid

public String getUserEid(String userId)

Specified by:
getUserEid in interface SakaiProxy

getUserIdForEid

public String getUserIdForEid(String eid)

Specified by:
getUserIdForEid in interface SakaiProxy

getUserDisplayName

public String getUserDisplayName(String userId)

Specified by:
getUserDisplayName in interface SakaiProxy

getUserFirstName

public String getUserFirstName(String userId)

Specified by:
getUserFirstName in interface SakaiProxy

getUserLastName

public String getUserLastName(String userId)

Specified by:
getUserLastName in interface SakaiProxy

getUserEmail

public String getUserEmail(String userId)

Specified by:
getUserEmail in interface SakaiProxy

checkForUser

public boolean checkForUser(String userId)

Specified by:
checkForUser in interface SakaiProxy

checkForUserByEid

public boolean checkForUserByEid(String eid)

Specified by:
checkForUserByEid in interface SakaiProxy

isSuperUser

public boolean isSuperUser()

Specified by:
isSuperUser in interface SakaiProxy

isAdminUser

public boolean isAdminUser()

Specified by:
isAdminUser in interface SakaiProxy

isSuperUserAndProxiedToUser

public boolean isSuperUserAndProxiedToUser(String userId)

Specified by:
isSuperUserAndProxiedToUser in interface SakaiProxy

getUserType

public String getUserType(String userId)

Specified by:
getUserType in interface SakaiProxy

getUserById

public org.sakaiproject.user.api.User getUserById(String userId)

Specified by:
getUserById in interface SakaiProxy

getUserQuietly

public org.sakaiproject.user.api.User getUserQuietly(String userId)

Specified by:
getUserQuietly in interface SakaiProxy

getCurrentToolTitle

public String getCurrentToolTitle()

Specified by:
getCurrentToolTitle in interface SakaiProxy

getUsers

public List<org.sakaiproject.user.api.User> getUsers(List<String> userIds)

Specified by:
getUsers in interface SakaiProxy

getUuids

public List<String> getUuids(List<org.sakaiproject.user.api.User> users)

Specified by:
getUuids in interface SakaiProxy

getSakaiPerson

public org.sakaiproject.api.common.edu.person.SakaiPerson getSakaiPerson(String userId)

Specified by:
getSakaiPerson in interface SakaiProxy

getSakaiPersonJpegPhoto

public byte[] getSakaiPersonJpegPhoto(String userId)

Specified by:
getSakaiPersonJpegPhoto in interface SakaiProxy

getSakaiPersonImageUrl

public String getSakaiPersonImageUrl(String userId)

Specified by:
getSakaiPersonImageUrl in interface SakaiProxy

getSakaiPersonPrototype

public org.sakaiproject.api.common.edu.person.SakaiPerson getSakaiPersonPrototype()

Specified by:
getSakaiPersonPrototype in interface SakaiProxy

createSakaiPerson

public org.sakaiproject.api.common.edu.person.SakaiPerson createSakaiPerson(String userId)

Specified by:
createSakaiPerson in interface SakaiProxy

updateSakaiPerson

public boolean updateSakaiPerson(org.sakaiproject.api.common.edu.person.SakaiPerson sakaiPerson)

Specified by:
updateSakaiPerson in interface SakaiProxy

getMaxProfilePictureSize

public int getMaxProfilePictureSize()

Specified by:
getMaxProfilePictureSize in interface SakaiProxy

getProfileGalleryImagePath

public String getProfileGalleryImagePath(String userId,
                                         String imageId)

Specified by:
getProfileGalleryImagePath in interface SakaiProxy

getProfileGalleryThumbnailPath

public String getProfileGalleryThumbnailPath(String userId,
                                             String imageId)

Specified by:
getProfileGalleryThumbnailPath in interface SakaiProxy

getProfileImageResourcePath

public String getProfileImageResourcePath(String userId,
                                          int type)

Specified by:
getProfileImageResourcePath in interface SakaiProxy

saveFile

public boolean saveFile(String fullResourceId,
                        String userId,
                        String fileName,
                        String mimeType,
                        byte[] fileData)

Specified by:
saveFile in interface SakaiProxy

getResource

public MimeTypeByteArray getResource(String resourceId)

Specified by:
getResource in interface SakaiProxy

removeResource

public boolean removeResource(String resourceId)

Specified by:
removeResource in interface SakaiProxy

searchUsers

public List<org.sakaiproject.user.api.User> searchUsers(String search)

Specified by:
searchUsers in interface SakaiProxy

searchExternalUsers

public List<org.sakaiproject.user.api.User> searchExternalUsers(String search)

Specified by:
searchExternalUsers in interface SakaiProxy

postEvent

public void postEvent(String event,
                      String reference,
                      boolean modify)

Specified by:
postEvent in interface SakaiProxy

sendEmail

public void sendEmail(String userId,
                      String subject,
                      String message)

Specified by:
sendEmail in interface SakaiProxy

sendEmail

public void sendEmail(List<String> userIds,
                      String emailTemplateKey,
                      Map<String,String> replacementValues)

Specified by:
sendEmail in interface SakaiProxy

sendEmail

public void sendEmail(String userId,
                      String emailTemplateKey,
                      Map<String,String> replacementValues)

Specified by:
sendEmail in interface SakaiProxy

getServerName

public String getServerName()

Specified by:
getServerName in interface SakaiProxy

getPortalUrl

public String getPortalUrl()

Specified by:
getPortalUrl in interface SakaiProxy

getServerUrl

public String getServerUrl()

Specified by:
getServerUrl in interface SakaiProxy

getFullPortalUrl

public String getFullPortalUrl()

Specified by:
getFullPortalUrl in interface SakaiProxy

getPortalPath

public String getPortalPath()

Specified by:
getPortalPath in interface SakaiProxy

isUsingNormalPortal

public boolean isUsingNormalPortal()

Specified by:
isUsingNormalPortal in interface SakaiProxy

getUserHomeUrl

public String getUserHomeUrl()

Specified by:
getUserHomeUrl in interface SakaiProxy

getServiceName

public String getServiceName()

Specified by:
getServiceName in interface SakaiProxy

updateEmailForUser

public void updateEmailForUser(String userId,
                               String email)

Specified by:
updateEmailForUser in interface SakaiProxy

updateNameForUser

public void updateNameForUser(String userId,
                              String firstName,
                              String lastName)

Specified by:
updateNameForUser in interface SakaiProxy

getDirectUrlToUserProfile

public String getDirectUrlToUserProfile(String userId,
                                        String extraParams)

Specified by:
getDirectUrlToUserProfile in interface SakaiProxy

isAccountUpdateAllowed

public boolean isAccountUpdateAllowed(String userId)

Specified by:
isAccountUpdateAllowed in interface SakaiProxy

isBusinessProfileEnabled

public boolean isBusinessProfileEnabled()

Specified by:
isBusinessProfileEnabled in interface SakaiProxy

isWallEnabledGlobally

public boolean isWallEnabledGlobally()

Specified by:
isWallEnabledGlobally in interface SakaiProxy

isWallDefaultProfilePage

public boolean isWallDefaultProfilePage()

Specified by:
isWallDefaultProfilePage in interface SakaiProxy

isProfileConversionEnabled

public boolean isProfileConversionEnabled()

Specified by:
isProfileConversionEnabled in interface SakaiProxy

isProfileImportEnabled

public boolean isProfileImportEnabled()

Specified by:
isProfileImportEnabled in interface SakaiProxy

getProfileImportCsvPath

public String getProfileImportCsvPath()

Specified by:
getProfileImportCsvPath in interface SakaiProxy

isTwitterIntegrationEnabledGlobally

public boolean isTwitterIntegrationEnabledGlobally()

Specified by:
isTwitterIntegrationEnabledGlobally in interface SakaiProxy

getTwitterSource

public String getTwitterSource()

Specified by:
getTwitterSource in interface SakaiProxy

isProfileGalleryEnabledGlobally

public boolean isProfileGalleryEnabledGlobally()

Specified by:
isProfileGalleryEnabledGlobally in interface SakaiProxy

isProfilePictureChangeEnabled

public boolean isProfilePictureChangeEnabled()

Specified by:
isProfilePictureChangeEnabled in interface SakaiProxy

getProfilePictureType

public int getProfilePictureType()

Specified by:
getProfilePictureType in interface SakaiProxy

getAcademicEntityConfigurationSet

public List<String> getAcademicEntityConfigurationSet()

Specified by:
getAcademicEntityConfigurationSet in interface SakaiProxy

getMinimalEntityConfigurationSet

public List<String> getMinimalEntityConfigurationSet()

Specified by:
getMinimalEntityConfigurationSet in interface SakaiProxy

ensureUuid

public String ensureUuid(String userId)

Specified by:
ensureUuid in interface SakaiProxy

currentUserMatchesRequest

public boolean currentUserMatchesRequest(String userUuid)

Specified by:
currentUserMatchesRequest in interface SakaiProxy

isPrivacyChangeAllowedGlobally

public boolean isPrivacyChangeAllowedGlobally()

Specified by:
isPrivacyChangeAllowedGlobally in interface SakaiProxy

getOverriddenPrivacySettings

public HashMap<String,Object> getOverriddenPrivacySettings()

Specified by:
getOverriddenPrivacySettings in interface SakaiProxy

getInvisibleUsers

public List<String> getInvisibleUsers()

Specified by:
getInvisibleUsers in interface SakaiProxy

isConnectionAllowedBetweenUserTypes

public boolean isConnectionAllowedBetweenUserTypes(String requestingUserType,
                                                   String targetUserType)

Specified by:
isConnectionAllowedBetweenUserTypes in interface SakaiProxy

toggleProfileLocked

public boolean toggleProfileLocked(String userId,
                                   boolean locked)

Specified by:
toggleProfileLocked in interface SakaiProxy

isOfficialImageEnabledGlobally

public boolean isOfficialImageEnabledGlobally()

Specified by:
isOfficialImageEnabledGlobally in interface SakaiProxy

isUsingOfficialImageButAlternateSelectionEnabled

public boolean isUsingOfficialImageButAlternateSelectionEnabled()

Specified by:
isUsingOfficialImageButAlternateSelectionEnabled in interface SakaiProxy

getOfficialImageSource

public String getOfficialImageSource()

Specified by:
getOfficialImageSource in interface SakaiProxy

getOfficialImageAttribute

public String getOfficialImageAttribute()

Specified by:
getOfficialImageAttribute in interface SakaiProxy

getSkinRepoProperty

public String getSkinRepoProperty()

Specified by:
getSkinRepoProperty in interface SakaiProxy

getToolSkinCSS

public String getToolSkinCSS(String skinRepo)

Specified by:
getToolSkinCSS in interface SakaiProxy

createUuid

public String createUuid()

Specified by:
createUuid in interface SakaiProxy

isUserActive

public boolean isUserActive(String userUuid)

Specified by:
isUserActive in interface SakaiProxy

getActiveUsers

public List<String> getActiveUsers(List<String> userUuids)

Specified by:
getActiveUsers in interface SakaiProxy

getLastEventTimeForUser

public Long getLastEventTimeForUser(String userUuid)

Specified by:
getLastEventTimeForUser in interface SakaiProxy

getLastEventTimeForUsers

public Map<String,Long> getLastEventTimeForUsers(List<String> userUuids)

Specified by:
getLastEventTimeForUsers in interface SakaiProxy

getServerConfigurationParameter

public String getServerConfigurationParameter(String key,
                                              String def)

Specified by:
getServerConfigurationParameter in interface SakaiProxy

isUserMyWorkspace

public boolean isUserMyWorkspace(String siteId)

Specified by:
isUserMyWorkspace in interface SakaiProxy

isUserAllowedInSite

public boolean isUserAllowedInSite(String userId,
                                   String permission,
                                   String siteId)

Specified by:
isUserAllowedInSite in interface SakaiProxy

checkForSite

public boolean checkForSite(String siteId)

Specified by:
checkForSite in interface SakaiProxy

getMaxSearchResults

public int getMaxSearchResults()

Specified by:
getMaxSearchResults in interface SakaiProxy

getMaxSearchResultsPerPage

public int getMaxSearchResultsPerPage()

Specified by:
getMaxSearchResultsPerPage in interface SakaiProxy

isGravatarImageEnabledGlobally

public boolean isGravatarImageEnabledGlobally()

Specified by:
isGravatarImageEnabledGlobally in interface SakaiProxy

isUserAllowedAddSite

public boolean isUserAllowedAddSite(String userUuid)

Specified by:
isUserAllowedAddSite in interface SakaiProxy

addSite

public org.sakaiproject.site.api.Site addSite(String id,
                                              String type)

Specified by:
addSite in interface SakaiProxy

saveSite

public boolean saveSite(org.sakaiproject.site.api.Site site)

Specified by:
saveSite in interface SakaiProxy

getSite

public org.sakaiproject.site.api.Site getSite(String siteId)

Specified by:
getSite in interface SakaiProxy

getUserSites

public List<org.sakaiproject.site.api.Site> getUserSites()

Specified by:
getUserSites in interface SakaiProxy

getTool

public org.sakaiproject.tool.api.Tool getTool(String id)

Specified by:
getTool in interface SakaiProxy

getToolsRequired

public List<String> getToolsRequired(String category)

Specified by:
getToolsRequired in interface SakaiProxy

isGoogleIntegrationEnabledGlobally

public boolean isGoogleIntegrationEnabledGlobally()

Specified by:
isGoogleIntegrationEnabledGlobally in interface SakaiProxy

isLoggedIn

public boolean isLoggedIn()

Specified by:
isLoggedIn in interface SakaiProxy

init

public void init()
init



Copyright © 2008-2012 The Sakai Foundation. All Rights Reserved.