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 classDefaultProfileKit.ProfileHolder -
Field Summary
Fields Modifier and Type Field Description protected javax.inject.Provider<colesico.framework.teleapi.DataPort>dataPortProvprotected colesico.framework.ioc.scope.ThreadScopethreadScope -
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>
PgetProfile()This method should provide current user valid profile.protected ProfileprofileReadControl(colesico.framework.teleapi.DataPort<java.lang.Object,java.lang.Object> port)protected voidprofileWriteControl(colesico.framework.teleapi.DataPort port, Profile profile)voidsetProfile(Profile profile)Setup curent user profile
-
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
-
getProfile
Description copied from interface:ProfileKitThis 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 profileCommonProfileCreator- Specified by:
getProfilein interfaceProfileKit
-
setProfile
Description copied from interface:ProfileKitSetup curent user profile- Specified by:
setProfilein interfaceProfileKit
-