org.alfresco.web.site
Class SlingshotUserFactory

java.lang.Object
  extended by org.springframework.extensions.surf.support.BaseFactory
      extended by org.springframework.extensions.surf.support.AbstractUserFactory
          extended by org.springframework.extensions.surf.support.AlfrescoUserFactory
              extended by org.alfresco.web.site.SlingshotUserFactory
All Implemented Interfaces:
org.springframework.context.ApplicationContextAware, org.springframework.extensions.surf.UserFactory

public class SlingshotUserFactory
extends org.springframework.extensions.surf.support.AlfrescoUserFactory

Slingshot User Factory makes use of the slingshot REST API to persist modified user details back to the repo.


Field Summary
 
Fields inherited from class org.springframework.extensions.surf.support.AlfrescoUserFactory
ALFRESCO_ENDPOINT_ID, CM_AVATAR, CM_COMPANYADDRESS1, CM_COMPANYADDRESS2, CM_COMPANYADDRESS3, CM_COMPANYEMAIL, CM_COMPANYFAX, CM_COMPANYPOSTCODE, CM_COMPANYTELEPHONE, CM_EMAIL, CM_FIRSTNAME, CM_GOOGLEUSERNAME, CM_INSTANTMSG, CM_JOBTITLE, CM_LASTNAME, CM_LOCATION, CM_MOBILE, CM_ORGANIZATION, CM_PERSONDESCRIPTION, CM_SKYPE, CM_TELEPHONE, CM_USERNAME
 
Fields inherited from interface org.springframework.extensions.surf.UserFactory
SESSION_ATTRIBUTE_EXTERNAL_AUTH, SESSION_ATTRIBUTE_KEY_USER_ID, SESSION_ATTRIBUTE_KEY_USER_OBJECT, USER_GUEST
 
Constructor Summary
SlingshotUserFactory()
           
 
Method Summary
 boolean authenticate(javax.servlet.http.HttpServletRequest request, java.lang.String username, java.lang.String password)
           
protected  org.springframework.extensions.surf.site.AlfrescoUser constructUser(org.json.JSONObject properties, java.util.Map capabilities)
           
 void saveUser(org.springframework.extensions.surf.site.AlfrescoUser user)
          Persist the user back to the Alfresco repository
 
Methods inherited from class org.springframework.extensions.surf.support.AlfrescoUserFactory
buildAlfrescoUser, constructAlfrescoUser, loadUser, loadUser
 
Methods inherited from class org.springframework.extensions.surf.support.AbstractUserFactory
getGuestUser, initialiseUser, initialiseUser, initialiseUser, initialiseUser
 
Methods inherited from class org.springframework.extensions.surf.support.BaseFactory
getApplicationContext, getObjectService, getResourceService, getServiceRegistry, getWebFrameworkConfiguration, setApplicationContext, setServiceRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SlingshotUserFactory

public SlingshotUserFactory()
Method Detail

authenticate

public boolean authenticate(javax.servlet.http.HttpServletRequest request,
                            java.lang.String username,
                            java.lang.String password)
Specified by:
authenticate in interface org.springframework.extensions.surf.UserFactory
Overrides:
authenticate in class org.springframework.extensions.surf.support.AlfrescoUserFactory
See Also:
org.alfresco.web.site.UserFactory#authenticate(org.alfresco.web.site.RequestContext, javax.servlet.http.HttpServletRequest, java.lang.String, java.lang.String)

constructUser

protected org.springframework.extensions.surf.site.AlfrescoUser constructUser(org.json.JSONObject properties,
                                                                              java.util.Map capabilities)
                                                                       throws org.json.JSONException
Overrides:
constructUser in class org.springframework.extensions.surf.support.AlfrescoUserFactory
Throws:
org.json.JSONException

saveUser

public void saveUser(org.springframework.extensions.surf.site.AlfrescoUser user)
              throws org.springframework.extensions.surf.exception.UserFactoryException
Persist the user back to the Alfresco repository

Parameters:
user - to persist
Throws:
java.io.IOException
org.springframework.extensions.surf.exception.UserFactoryException


Copyright © 2005 - 2010 Alfresco Software, Inc. All Rights Reserved.