Class DefaultProfileKit

java.lang.Object
colesico.framework.profile.DefaultProfileKit
All Implemented Interfaces:
ProfileKit

public class DefaultProfileKit
extends java.lang.Object
implements ProfileKit
Profile kit default implementation. Extend this class to customize the profile read/write control. (For example to enrich the profile from the database)
  • Nested Class Summary

    Nested Classes 
    Modifier and Type Class Description
    static class  DefaultProfileKit.ProfileHolder  
  • Field Summary

    Fields 
    Modifier and Type Field Description
    protected javax.inject.Provider<colesico.framework.teleapi.DataPort> dataPortProv  
    protected colesico.framework.ioc.scope.ThreadScope threadScope  
  • Constructor Summary

    Constructors 
    Constructor Description
    DefaultProfileKit​(colesico.framework.ioc.scope.ThreadScope threadScope, javax.inject.Provider<colesico.framework.teleapi.DataPort> dataPortProv)  
  • Method Summary

    Modifier and Type Method Description
    <P extends Profile>
    P
    getProfile()
    This method should provide current user valid profile.
    protected Profile profileReadControl​(colesico.framework.teleapi.DataPort<java.lang.Object,​java.lang.Object> port)  
    protected void profileWriteControl​(colesico.framework.teleapi.DataPort port, Profile profile)  
    void setProfile​(Profile profile)
    Setup curent user profile

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • threadScope

      protected final colesico.framework.ioc.scope.ThreadScope threadScope
    • dataPortProv

      protected final javax.inject.Provider<colesico.framework.teleapi.DataPort> dataPortProv
  • Constructor Details

    • DefaultProfileKit

      public DefaultProfileKit​(colesico.framework.ioc.scope.ThreadScope threadScope, javax.inject.Provider<colesico.framework.teleapi.DataPort> dataPortProv)
  • Method Details

    • profileReadControl

      protected Profile profileReadControl​(colesico.framework.teleapi.DataPort<java.lang.Object,​java.lang.Object> port)
    • profileWriteControl

      protected void profileWriteControl​(colesico.framework.teleapi.DataPort port, Profile profile)
    • getProfile

      public final <P extends Profile> P getProfile()
      Description copied from interface: ProfileKit
      This method should provide current user valid profile. The method should provide the ability to quickly re-read the profile within the thread. If it is impassible to determine current user profile method returns common profile CommonProfileCreator
      Specified by:
      getProfile in interface ProfileKit
    • setProfile

      public final void setProfile​(Profile profile)
      Description copied from interface: ProfileKit
      Setup curent user profile
      Specified by:
      setProfile in interface ProfileKit