Class CacheableGroupHandlerImpl
java.lang.Object
org.exoplatform.services.organization.idm.AbstractDAOImpl
org.exoplatform.services.organization.idm.GroupDAOImpl
org.exoplatform.services.organization.idm.cache.CacheableGroupHandlerImpl
- All Implemented Interfaces:
org.exoplatform.services.organization.GroupHandler
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final class -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ThreadLocal<Boolean> Used to avoid this problem 1/ Delete from cache 2/ super.delete 2.1 trigger preDelete listeners: the listener.findEntity THEN cache is populated again 2.2 delete from Store 2.3 trigger postDelete listeners THEN Error: when listener a listener calls findUserById, the entity is returned from cacheFields inherited from class org.exoplatform.services.organization.idm.GroupDAOImpl
GROUP_DESCRIPTION, GROUP_LABELFields inherited from class org.exoplatform.services.organization.idm.AbstractDAOImpl
log, orgService, service_ -
Constructor Summary
ConstructorsConstructorDescriptionCacheableGroupHandlerImpl(org.exoplatform.services.organization.cache.OrganizationCacheHandler organizationCacheHandler, PicketLinkIDMOrganizationServiceImpl orgService, PicketLinkIDMService service, boolean useCacheList) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddChild(org.exoplatform.services.organization.Group parent, org.exoplatform.services.organization.Group child, boolean broadcast) voidvoidvoidorg.exoplatform.services.organization.GroupfindGroupById(String groupId) Collection<org.exoplatform.services.organization.Group> findGroupByMembership(String userName, String membershipType) Collection<org.exoplatform.services.organization.Group> findGroups(org.exoplatform.services.organization.Group parent) Collection<org.exoplatform.services.organization.Group> findGroupsOfUser(String user) Collection<org.exoplatform.services.organization.Group> getGroupId(org.picketlink.idm.api.Group jbidGroup, List<org.picketlink.idm.api.Group> processed) Calculates group id by checking all parents up to the root group or group type mapping from the configuration.voidmoveGroup(org.exoplatform.services.organization.Group parentOriginGroup, org.exoplatform.services.organization.Group parentTargetGroup, org.exoplatform.services.organization.Group groupToMove) org.exoplatform.services.organization.GroupremoveGroup(org.exoplatform.services.organization.Group group, boolean broadcast) Collection<org.exoplatform.services.organization.Group> resolveGroupByMembership(String userName, String membershipType) voidsaveGroup(org.exoplatform.services.organization.Group group, boolean broadcast) Methods inherited from class org.exoplatform.services.organization.idm.GroupDAOImpl
addGroupEventListener, convertGroup, createGroup, createGroupInstance, findAllGroupsByKeyword, findGroupChildren, findGroupsByKeyword, findGroupsOfUserByKeyword, findGroupsOfUserByKeyword, getChildrenGroups, getGtnGroupName, getPLIDMGroup, getPLIDMGroupName, getRootGroup, obtainRootGroup, removeGroupEventListenerMethods inherited from class org.exoplatform.services.organization.idm.AbstractDAOImpl
getIdentitySession, handleException
-
Field Details
-
disableCacheInThread
Used to avoid this problem 1/ Delete from cache 2/ super.delete 2.1 trigger preDelete listeners: the listener.findEntity THEN cache is populated again 2.2 delete from Store 2.3 trigger postDelete listeners THEN Error: when listener a listener calls findUserById, the entity is returned from cache
-
-
Constructor Details
-
CacheableGroupHandlerImpl
public CacheableGroupHandlerImpl(org.exoplatform.services.organization.cache.OrganizationCacheHandler organizationCacheHandler, PicketLinkIDMOrganizationServiceImpl orgService, PicketLinkIDMService service, boolean useCacheList)
-
-
Method Details
-
addChild
public void addChild(org.exoplatform.services.organization.Group parent, org.exoplatform.services.organization.Group child, boolean broadcast) throws Exception - Specified by:
addChildin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
addChildin classGroupDAOImpl- Throws:
Exception
-
findGroupById
- Specified by:
findGroupByIdin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
findGroupByIdin classGroupDAOImpl- Throws:
Exception
-
findGroupByMembership
public Collection<org.exoplatform.services.organization.Group> findGroupByMembership(String userName, String membershipType) throws Exception - Specified by:
findGroupByMembershipin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
findGroupByMembershipin classGroupDAOImpl- Throws:
Exception
-
resolveGroupByMembership
public Collection<org.exoplatform.services.organization.Group> resolveGroupByMembership(String userName, String membershipType) throws Exception - Specified by:
resolveGroupByMembershipin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
resolveGroupByMembershipin classGroupDAOImpl- Throws:
Exception
-
findGroups
public Collection<org.exoplatform.services.organization.Group> findGroups(org.exoplatform.services.organization.Group parent) throws Exception - Specified by:
findGroupsin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
findGroupsin classGroupDAOImpl- Throws:
Exception
-
findGroupsOfUser
public Collection<org.exoplatform.services.organization.Group> findGroupsOfUser(String user) throws Exception - Specified by:
findGroupsOfUserin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
findGroupsOfUserin classGroupDAOImpl- Throws:
Exception
-
getAllGroups
- Specified by:
getAllGroupsin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
getAllGroupsin classGroupDAOImpl- Throws:
Exception
-
removeGroup
public org.exoplatform.services.organization.Group removeGroup(org.exoplatform.services.organization.Group group, boolean broadcast) throws Exception - Specified by:
removeGroupin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
removeGroupin classGroupDAOImpl- Throws:
Exception
-
getGroupId
public String getGroupId(org.picketlink.idm.api.Group jbidGroup, List<org.picketlink.idm.api.Group> processed) throws Exception Calculates group id by checking all parents up to the root group or group type mapping from the configuration.- Overrides:
getGroupIdin classGroupDAOImpl- Parameters:
jbidGroup-processed-- Returns:
- Throws:
Exception
-
saveGroup
public void saveGroup(org.exoplatform.services.organization.Group group, boolean broadcast) throws Exception - Specified by:
saveGroupin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
saveGroupin classGroupDAOImpl- Throws:
Exception
-
moveGroup
public void moveGroup(org.exoplatform.services.organization.Group parentOriginGroup, org.exoplatform.services.organization.Group parentTargetGroup, org.exoplatform.services.organization.Group groupToMove) throws Exception - Specified by:
moveGroupin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
moveGroupin classGroupDAOImpl- Throws:
Exception
-
clearCache
public void clearCache() -
disableCache
public void disableCache() -
enableCache
public void enableCache()
-