Class HibernateContentPermissionSetDao
java.lang.Object
org.springframework.dao.support.DaoSupport
com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao<ContentPermissionSet>
com.atlassian.confluence.security.persistence.dao.hibernate.HibernateContentPermissionSetDao
- All Implemented Interfaces:
ContentPermissionSetDaoInternal,ContentPermissionSetDao,org.springframework.beans.factory.InitializingBean
public class HibernateContentPermissionSetDao
extends HibernateObjectDao<ContentPermissionSet>
implements ContentPermissionSetDaoInternal
-
Nested Class Summary
Nested classes/interfaces inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
HibernateObjectDao.Cacheability -
Field Summary
Fields inherited from class org.springframework.dao.support.DaoSupport
logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetById(long id) getContentIdsWithPermissionSet(String spaceKey) Gets the list of id of content which belongs to the specified space and has the permission set configured.Get a map between content id and permission set.getInheritedContentPermissionSets(Page page, String type) getInheritedContentPermissionSets(Collection<Long> pageIds) Get all inheritedContentPermissionSets for the given page IDs.getPermissionSets(String spaceKey, List<Long> contentIds) Retrieves theContentPermissionSetof contents specified by the contentIds parameter given the spacegetRelevantViewRestrictionsForContent(LimitedRequest pageRequest, Map<Long, Long> contentIdToParentIdMap) Return RelevantViewRestrictions per content where it will contain direct and inherited permission set required to access a contentvoidremove(ContentPermissionSet contentPermissionSet) Remove an object from the databasevoidsetSchemaInformationService(SchemaInformationService schemaInformationService) Methods inherited from class com.atlassian.confluence.core.persistence.hibernate.HibernateObjectDao
applyTransactionTimeout, applyTransactionTimeout, checkDaoConfig, createHibernateTemplate, findAll, findAllSorted, findAllSorted, findNamedQuery, findNamedQuery, findNamedQuery, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParam, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findNamedQueryStringParams, findSingleObject, getByClassId, getCountResult, getHibernateTemplate, getSessionFactory, publishEvent, reIndex, save, saveEntity, saveRaw, setHibernateTemplate, setSessionFactory, uniqueResult, updateModificationDataMethods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDaoMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.atlassian.confluence.security.persistence.dao.ContentPermissionSetDao
save
-
Constructor Details
-
HibernateContentPermissionSetDao
public HibernateContentPermissionSetDao()
-
-
Method Details
-
getSchemaInformationService
-
setSchemaInformationService
-
getById
- Specified by:
getByIdin interfaceContentPermissionSetDao
-
getExplicitPermissionSetsFor
Description copied from interface:ContentPermissionSetDaoGet a map between content id and permission set. This only returns ContentPermissionSets directly owned by the given ids (or empty lists for content without any content permissions). It is not aware of inherited permissions.- Specified by:
getExplicitPermissionSetsForin interfaceContentPermissionSetDao- Parameters:
ids- id of content to query- Returns:
- permission set map
-
getInheritedContentPermissionSets
- Specified by:
getInheritedContentPermissionSetsin interfaceContentPermissionSetDao- Returns:
- a list of
ContentPermissionSets associated with the ancestors of this page objectThe supplied page object must not be a root level page. The query is redundant for page without parents.
-
getInheritedContentPermissionSets
public Map<Long,List<ContentPermissionSet>> getInheritedContentPermissionSets(Collection<Long> pageIds) Description copied from interface:ContentPermissionSetDaoInternalGet all inheritedContentPermissionSets for the given page IDs.- Specified by:
getInheritedContentPermissionSetsin interfaceContentPermissionSetDaoInternal
-
getRelevantViewRestrictionsForContent
public Map<ContentId,PageResponse<ContentPermissionSet>> getRelevantViewRestrictionsForContent(LimitedRequest pageRequest, Map<Long, Long> contentIdToParentIdMap) Description copied from interface:ContentPermissionSetDaoInternalReturn RelevantViewRestrictions per content where it will contain direct and inherited permission set required to access a content- Specified by:
getRelevantViewRestrictionsForContentin interfaceContentPermissionSetDaoInternal- Returns:
-
getPermissionSets
public Map<Long,Set<ContentPermissionSet>> getPermissionSets(String spaceKey, List<Long> contentIds) Description copied from interface:ContentPermissionSetDaoRetrieves theContentPermissionSetof contents specified by the contentIds parameter given the space- Specified by:
getPermissionSetsin interfaceContentPermissionSetDao- Parameters:
spaceKey- - key of SpacecontentIds- - list of content id- Returns:
- a map where the key is the content id, and the value are the permission set, such as View/Edit, being configured
- See Also:
-
getContentIdsWithPermissionSet
Description copied from interface:ContentPermissionSetDaoGets the list of id of content which belongs to the specified space and has the permission set configured. If a page is using the inherited permission, its id will not be included.- Specified by:
getContentIdsWithPermissionSetin interfaceContentPermissionSetDao- Parameters:
spaceKey- - key of space- Returns:
- the list of content id
-
remove
Description copied from class:HibernateObjectDaoRemove an object from the database- Specified by:
removein interfaceContentPermissionSetDao- Overrides:
removein classHibernateObjectDao<ContentPermissionSet>- Parameters:
contentPermissionSet- the object to remove
-
getPersistentClass
- Specified by:
getPersistentClassin classHibernateObjectDao<ContentPermissionSet>
-