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
-
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 GroupDAOImpl
ENCLOSING_GROUPS, GROUP_DESCRIPTION, GROUP_LABEL, NESTED_GROUPSFields inherited from class 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) voidvoidclearGroupCache(String groupId) voidvoidorg.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.voidlinkGroups(org.exoplatform.services.organization.NestedMembership nestedMembership) 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) voidunlinkGroups(org.exoplatform.services.organization.NestedMembership nestedMembership) voidupdateGroup(org.exoplatform.services.organization.Group group, boolean broadcast) Methods inherited from class GroupDAOImpl
addDecoratorPlugin, addGroupEventListener, convertGroup, createGroup, createGroupInstance, findAllGroupsByKeyword, findGroupChildren, findGroupsByKeyword, findGroupsOfUserByKeyword, findGroupsOfUserByKeyword, getChildrenGroups, getGtnGroupName, getNestedMemberships, getPLIDMGroup, getPLIDMGroupName, getRootGroup, obtainRootGroup, removeGroupEventListener, toSetMethods inherited from class 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
-
updateGroup
public void updateGroup(org.exoplatform.services.organization.Group group, boolean broadcast) throws Exception - Specified by:
updateGroupin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
updateGroupin 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
-
linkGroups
public void linkGroups(org.exoplatform.services.organization.NestedMembership nestedMembership) throws Exception - Specified by:
linkGroupsin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
linkGroupsin classGroupDAOImpl- Throws:
Exception
-
unlinkGroups
public void unlinkGroups(org.exoplatform.services.organization.NestedMembership nestedMembership) throws Exception - Specified by:
unlinkGroupsin interfaceorg.exoplatform.services.organization.GroupHandler- Overrides:
unlinkGroupsin classGroupDAOImpl- Throws:
Exception
-
clearCache
public void clearCache() -
disableCache
public void disableCache() -
enableCache
public void enableCache() -
clearGroupCache
-