Class AuthorityDAOImpl

    • Constructor Detail

      • AuthorityDAOImpl

        public AuthorityDAOImpl()
    • Method Detail

      • setZoneAuthoritySampleSize

        public void setZoneAuthoritySampleSize​(int zoneAuthoritySampleSize)
        Sets number of authorities in a zone to pre-cache, allowing quick generation of 'first n' results and adaption of search technique based on hit rate.
        Parameters:
        zoneAuthoritySampleSize - the zoneAuthoritySampleSize to set
      • setStoreUrl

        public void setStoreUrl​(String storeUrl)
      • setDictionaryService

        public void setDictionaryService​(DictionaryService dictionaryService)
      • setNamespacePrefixResolver

        public void setNamespacePrefixResolver​(NamespacePrefixResolver namespacePrefixResolver)
      • setNodeService

        public void setNodeService​(NodeService nodeService)
      • setSearchService

        public void setSearchService​(SearchService searchService)
      • setUseBridgeTable

        public void setUseBridgeTable​(boolean useBridgeTable)
        Parameters:
        useBridgeTable - the useBridgeTable to set
      • setPersonService

        public void setPersonService​(PersonService personService)
      • setTenantService

        public void setTenantService​(TenantService tenantService)
      • setQnameDAO

        public void setQnameDAO​(QNameDAO qnameDAO)
      • setCannedQueryDAO

        public void setCannedQueryDAO​(CannedQueryDAO cannedQueryDAO)
      • setAclDAO

        public void setAclDAO​(AclDAO aclDao)
      • setPolicyComponent

        public void setPolicyComponent​(PolicyComponent policyComponent)
      • setCannedQueryRegistry

        public void setCannedQueryRegistry​(org.alfresco.util.registry.NamedObjectRegistry<org.alfresco.query.CannedQueryFactory<?>> cannedQueryRegistry)
      • setAuthorityBridgeDAO

        public void setAuthorityBridgeDAO​(AuthorityBridgeDAO authorityBridgeDAO)
        Parameters:
        authorityBridgeDAO - the authorityBridgeDAO to set
      • setFindAuthoritiesLimit

        public void setFindAuthoritiesLimit​(int findAuthoritiesLimit)
      • getAuthoritiesInfo

        public org.alfresco.query.PagingResults<AuthorityInfo> getAuthoritiesInfo​(AuthorityType type,
                                                                                  String zoneName,
                                                                                  String displayNameFilter,
                                                                                  String sortBy,
                                                                                  boolean sortAscending,
                                                                                  org.alfresco.query.PagingRequest pagingRequest)
        Description copied from interface: AuthorityDAO
        Get AuthorityInfo by type and/or zone (both cannot be null).
        Specified by:
        getAuthoritiesInfo in interface AuthorityDAO
        sortBy - either "displayName", "shortName", "authorityName" or null if no sorting.
      • getAuthorities

        public org.alfresco.query.PagingResults<String> getAuthorities​(AuthorityType type,
                                                                       String zoneName,
                                                                       String displayNameFilter,
                                                                       boolean sortByDisplayName,
                                                                       boolean sortAscending,
                                                                       org.alfresco.query.PagingRequest pagingRequest)
        Description copied from interface: AuthorityDAO
        Get authority names by type and/or zone (both cannot be null).
        Specified by:
        getAuthorities in interface AuthorityDAO
      • findAuthorities

        public Set<String> findAuthorities​(AuthorityType type,
                                           String parentAuthority,
                                           boolean immediate,
                                           String displayNamePattern,
                                           String zoneName)
        Description copied from interface: AuthorityDAO
        Find authorities by display name pattern.
        Specified by:
        findAuthorities in interface AuthorityDAO
        parentAuthority - if non-null, will look only for authorities who are a child of the named parent
        immediate - if true then only search root groups if parentAuthority is null, or immediate children of parentAuthority if it is non-null.
        zoneName - - may be null to indicate all zones
      • removeAuthority

        public void removeAuthority​(String parentName,
                                    String childName,
                                    boolean cacheRefresh)
        Description copied from interface: AuthorityDAO
        Remove an authority without authorityBridgeTableCache refresh.
        Specified by:
        removeAuthority in interface AuthorityDAO
      • getContainingAuthoritiesInZone

        public Set<String> getContainingAuthoritiesInZone​(AuthorityType type,
                                                          String authority,
                                                          String zoneName,
                                                          AuthorityService.AuthorityFilter filter,
                                                          int size)
        Description copied from interface: AuthorityDAO
        Get a set of authorities with varying filter criteria
        Specified by:
        getContainingAuthoritiesInZone in interface AuthorityDAO
        Parameters:
        type - authority type or null for all types
        authority - if non-null, only return those authorities who contain this authority
        zoneName - if non-null, only include authorities in the named zone
        filter - optional callback to apply further filter criteria or null
        size - if greater than zero, the maximum results to return. The search strategy used is varied depending on this number.
        Returns:
        a set of authorities
      • addAuthorityNameIfMatches

        protected void addAuthorityNameIfMatches​(Set<String> authorities,
                                                 String authorityName,
                                                 AuthorityType type)
      • getAuthorityName

        public String getAuthorityName​(NodeRef authorityRef)
        Description copied from interface: AuthorityDAO
        Gets the name for the given authority node
        Specified by:
        getAuthorityName in interface AuthorityDAO
        Parameters:
        authorityRef - authority node
      • getOrCreateZone

        public NodeRef getOrCreateZone​(String zoneName)
        Description copied from interface: AuthorityDAO
        Gets or creates an authority zone node with the specified name
        Specified by:
        getOrCreateZone in interface AuthorityDAO
        Parameters:
        zoneName - the zone name
        Returns:
        reference to the zone node
      • getZone

        public NodeRef getZone​(String zoneName)
        Description copied from interface: AuthorityDAO
        Gets an authority zone node with the specified name
        Specified by:
        getZone in interface AuthorityDAO
        Parameters:
        zoneName - the zone name
        Returns:
        reference to the zone node ot null if the zone does not exists
      • getAuthorityZones

        public Set<String> getAuthorityZones​(String name)
        Description copied from interface: AuthorityDAO
        Gets the name of the zone containing the specified authority.
        Specified by:
        getAuthorityZones in interface AuthorityDAO
        Parameters:
        name - the authority long name
        Returns:
        the set of names of all zones containing the specified authority, an empty set if the authority exists but has no zone, or null if the authority does not exist.
      • getAllAuthoritiesInZone

        public Set<String> getAllAuthoritiesInZone​(String zoneName,
                                                   AuthorityType type)
        Description copied from interface: AuthorityDAO
        Gets the names of all authorities in a zone, optionally filtered by type.
        Specified by:
        getAllAuthoritiesInZone in interface AuthorityDAO
        Parameters:
        zoneName - the zone name
        type - the authority type to filter by or null for all authority types
        Returns:
        the names of all authorities in a zone, optionally filtered by type
      • init

        public void init()
      • onRefreshableCacheEvent

        public void onRefreshableCacheEvent​(org.alfresco.util.cache.RefreshableCacheEvent refreshableCacheEvent)
        Specified by:
        onRefreshableCacheEvent in interface org.alfresco.util.cache.RefreshableCacheListener
      • getCacheId

        public String getCacheId()
        Specified by:
        getCacheId in interface org.alfresco.util.cache.RefreshableCacheListener
      • afterPropertiesSet

        public void afterPropertiesSet()
                                throws Exception
        Specified by:
        afterPropertiesSet in interface org.springframework.beans.factory.InitializingBean
        Throws:
        Exception