com.alogient.cameleon.extension.wicket
Class AbstractCameleonSession

java.lang.Object
  extended by org.apache.wicket.Session
      extended by org.apache.wicket.protocol.http.WebSession
          extended by org.apache.wicket.authentication.AuthenticatedWebSession
              extended by com.alogient.cameleon.extension.wicket.AbstractCameleonSession
All Implemented Interfaces:
Serializable, org.apache.wicket.IClusterable
Direct Known Subclasses:
CameleonSession

public abstract class AbstractCameleonSession
extends org.apache.wicket.authentication.AuthenticatedWebSession

Our custom web session implementation. This session is abstract because you need to specify a custom spring Authentication class used to authenticate a user.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.apache.wicket.Session
org.apache.wicket.Session.IPageMapVisitor, org.apache.wicket.Session.PageMapAccessMetaData
 
Field Summary
 
Fields inherited from class org.apache.wicket.Session
PAGEMAP_ACCESS_MDK, SESSION_ATTRIBUTE_NAME
 
Constructor Summary
AbstractCameleonSession(org.apache.wicket.Request request)
          Constructor.
 
Method Summary
 boolean authenticate(String username, String password)
           
static AbstractCameleonSession get()
           
 com.alogient.cameleon.sdk.membership.vo.AuthenticationVo getAuthenticationVo()
           
 com.alogient.cameleon.sdk.content.vo.CultureVo getCultureVo()
          Deprecated. 
 com.alogient.cameleon.sdk.content.vo.menu.MenuVo getCurrentMenu()
          Deprecated. 
abstract  org.springframework.security.core.Authentication getCustomAuthentication(String username, String password)
          Called when you want to use a custom authentication.
 com.alogient.cameleon.sdk.content.util.nav.ModeType getModeType()
          Deprecated. 
 org.apache.wicket.authorization.strategies.role.Roles getRoles()
           
protected  void init()
          Initialize.
 void signOut()
          
 
Methods inherited from class org.apache.wicket.authentication.AuthenticatedWebSession
isSignedIn, signIn, signIn
 
Methods inherited from class org.apache.wicket.protocol.http.WebSession
cleanupComponentFeedbackMessages, cleanupFeedbackMessages, isCurrentRequestValid
 
Methods inherited from class org.apache.wicket.Session
attach, bind, clear, createAutoPageMap, createAutoPageMapName, currentCreateAutoPageMapCounter, detach, dirty, error, exists, findOrCreate, findOrCreate, getApplication, getAttribute, getAttributeNames, getAuthorizationStrategy, getAutoPageMapNamePrefix, getAutoPageMapNameSuffix, getClassResolver, getClientInfo, getDefaultPageMap, getFeedbackMessages, getId, getLocale, getMetaData, getPage, getPage, getPageFactory, getPageMaps, getSessionStore, getSizeInBytes, getStyle, incrementCreateAutoPageMapCounter, info, invalidate, invalidateNow, isSessionInvalidated, isTemporary, newPageMap, nextPageId, nextSequenceValue, pageMapForName, removeAttribute, removePageMap, replaceSession, set, setApplication, setAttribute, setClientInfo, setLocale, setMetaData, setStyle, touch, unset, untouch, update, visitPageMaps, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractCameleonSession

public AbstractCameleonSession(org.apache.wicket.Request request)
Constructor. Note that RequestCycle is not available until this constructor returns.

Parameters:
request - The current request
Method Detail

init

protected void init()
Initialize.


getAuthenticationVo

public com.alogient.cameleon.sdk.membership.vo.AuthenticationVo getAuthenticationVo()
Returns:
the authentication information.

authenticate

public boolean authenticate(String username,
                            String password)
Specified by:
authenticate in class org.apache.wicket.authentication.AuthenticatedWebSession

signOut

public void signOut()

Overrides:
signOut in class org.apache.wicket.authentication.AuthenticatedWebSession

getCustomAuthentication

public abstract org.springframework.security.core.Authentication getCustomAuthentication(String username,
                                                                                         String password)
Called when you want to use a custom authentication. The default one uses the UsernamePasswordAuthenticationToken

Parameters:
username - the username
password - the password
Returns:
the authentication instance.

getRoles

public org.apache.wicket.authorization.strategies.role.Roles getRoles()
Specified by:
getRoles in class org.apache.wicket.authentication.AuthenticatedWebSession

get

public static AbstractCameleonSession get()
Returns:
the user session

getCurrentMenu

@Deprecated
public com.alogient.cameleon.sdk.content.vo.menu.MenuVo getCurrentMenu()
Deprecated. 


getModeType

@Deprecated
public com.alogient.cameleon.sdk.content.util.nav.ModeType getModeType()
Deprecated. 


getCultureVo

@Deprecated
public com.alogient.cameleon.sdk.content.vo.CultureVo getCultureVo()
Deprecated. 

Returns:
the culture


Copyright © 2011 Alogient. All Rights Reserved.