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
static java.lang.String ACTIVITI_ADMIN_ENDPOINT_ID
           
static java.lang.String ALF_USER_LOADED
           
static java.lang.String CM_USERSTATUS
           
static java.lang.String CM_USERSTATUSTIME
           
static java.lang.String PROP_USERSTATUS
           
static java.lang.String PROP_USERSTATUSTIME
           
 
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 class org.springframework.extensions.surf.support.BaseFactory
frameworkUtils, webFrameworkServiceRegistry
 
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, java.util.Map immutability)
           
 org.springframework.extensions.webscripts.connector.User loadUser(org.springframework.extensions.surf.RequestContext context, java.lang.String userId, java.lang.String endpointId)
           
 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
 
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, setFrameworkUtils, setServiceRegistry
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALF_USER_LOADED

public static final java.lang.String ALF_USER_LOADED
See Also:
Constant Field Values

CM_USERSTATUS

public static final java.lang.String CM_USERSTATUS
See Also:
Constant Field Values

CM_USERSTATUSTIME

public static final java.lang.String CM_USERSTATUSTIME
See Also:
Constant Field Values

PROP_USERSTATUS

public static final java.lang.String PROP_USERSTATUS
See Also:
Constant Field Values

PROP_USERSTATUSTIME

public static final java.lang.String PROP_USERSTATUSTIME
See Also:
Constant Field Values

ACTIVITI_ADMIN_ENDPOINT_ID

public static final java.lang.String ACTIVITI_ADMIN_ENDPOINT_ID
See Also:
Constant Field Values
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,
                                                                              java.util.Map immutability)
                                                                       throws org.json.JSONException
Overrides:
constructUser in class org.springframework.extensions.surf.support.AlfrescoUserFactory
Throws:
org.json.JSONException

loadUser

public org.springframework.extensions.webscripts.connector.User loadUser(org.springframework.extensions.surf.RequestContext context,
                                                                         java.lang.String userId,
                                                                         java.lang.String endpointId)
                                                                  throws org.springframework.extensions.surf.exception.UserFactoryException
Specified by:
loadUser in interface org.springframework.extensions.surf.UserFactory
Overrides:
loadUser in class org.springframework.extensions.surf.support.AlfrescoUserFactory
Throws:
org.springframework.extensions.surf.exception.UserFactoryException

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.