Interface SiteService

  • All Known Subinterfaces:
    SiteServiceInternal
    All Known Implementing Classes:
    SiteServiceImpl

    @AlfrescoPublicApi
    public interface SiteService
    Site service fundamental API.

    This service API is designed to support the public facing Site APIs

    Author:
    Roy Wetherall
    • Field Summary

      Fields 
      Modifier and Type Field Description
      static java.lang.String DOCUMENT_LIBRARY  
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean canAddMember​(java.lang.String shortName, java.lang.String authorityName, java.lang.String role)
      Can the current user add the authority "authorityName" to the site "shortName" with role "role"?
      void cleanSitePermissions​(org.alfresco.service.cmr.repository.NodeRef relocatedNode, SiteInfo containingSite)
      This method cleans the permissions on the specified node.
      int countAuthoritiesWithRole​(java.lang.String shortName, java.lang.String role)  
      org.alfresco.service.cmr.repository.NodeRef createContainer​(java.lang.String shortName, java.lang.String componentId, org.alfresco.service.namespace.QName containerType, java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> containerProperties)
      Creates a container for a component is a site of the given container type (must be a sub-type of st:siteContainer)
      SiteInfo createSite​(java.lang.String sitePreset, java.lang.String shortName, java.lang.String title, java.lang.String description, boolean isPublic)
      Deprecated.
      SiteInfo createSite​(java.lang.String sitePreset, java.lang.String shortName, java.lang.String title, java.lang.String description, SiteVisibility visibility)
      Create a new site.
      SiteInfo createSite​(java.lang.String sitePreset, java.lang.String shortName, java.lang.String title, java.lang.String description, SiteVisibility visibility, org.alfresco.service.namespace.QName siteType)
      Create a new site.
      void deleteSite​(java.lang.String shortName)
      Delete the site.
      java.util.List<SiteInfo> findSites​(java.lang.String filter, int size)
      This method will find all sites available to the currently authenticated user based on the specified site filter and result set size.
      java.util.List<SiteInfo> findSites​(java.lang.String filter, java.lang.String sitePresetFilter, int size)
      This method will find all sites available to the currently authenticated user based on the specified site filter, site preset filter and result set size.
      org.alfresco.service.cmr.repository.NodeRef getContainer​(java.lang.String shortName, java.lang.String componentId)
      Gets the "container" folder for the specified component.
      java.lang.String getMembersRole​(java.lang.String shortName, java.lang.String authorityName)  
      SiteMemberInfo getMembersRoleInfo​(java.lang.String shortName, java.lang.String authorityName)
      Gets the extended role information of the specified user.
      SiteInfo getSite​(java.lang.String shortName)
      Gets site information based on the short name of a site.
      SiteInfo getSite​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      This method gets the SiteInfo for the Share Site which contains the given NodeRef.
      java.lang.String getSiteGroup​(java.lang.String shortName)
      Gets the sites group.
      java.lang.String getSiteRoleGroup​(java.lang.String shortName, java.lang.String role)
      Gets the sites role group.
      java.util.List<java.lang.String> getSiteRoles()
      Gets a list of all the currently available roles that a user can perform on all sites
      java.util.List<java.lang.String> getSiteRoles​(java.lang.String shortName)
      Gets a list of all the currently available roles that a user can perform on a specific site.
      org.alfresco.service.cmr.repository.NodeRef getSiteRoot()
      Gets the reference to the folder that is the Site root node.
      java.lang.String getSiteShortName​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
      This method gets the shortName for the Share Site which contains the given NodeRef.
      boolean hasContainer​(java.lang.String shortName, java.lang.String componentId)
      Determines if a "container" folder for the specified component exists.
      boolean hasCreateSitePermissions()
      This method checks if the currently authenticated user has permission to create sites.
      boolean hasSite​(java.lang.String shortName)
      Returns true if the site exists.
      boolean isMember​(java.lang.String shortName, java.lang.String authorityName)
      Indicates whether an authority is a member of a site or not
      boolean isSiteAdmin​(java.lang.String userName)
      Indicates whether the specified user is a site administrator or not.
      org.alfresco.query.PagingResults<FileInfo> listContainers​(java.lang.String shortName, org.alfresco.query.PagingRequest pagingRequest)
      Returns a paged list of top level containers for the site
      void listMembers​(java.lang.String shortName, java.lang.String nameFilter, java.lang.String roleFilter, boolean collapseGroups, SiteService.SiteMembersCallback callback)
      List the members of the site.
      java.util.Map<java.lang.String,​java.lang.String> listMembers​(java.lang.String shortName, java.lang.String nameFilter, java.lang.String roleFilter, int size)
      List the members of the site.
      java.util.Map<java.lang.String,​java.lang.String> listMembers​(java.lang.String shortName, java.lang.String nameFilter, java.lang.String roleFilter, int size, boolean collapseGroups)
      List the members of the site.
      java.util.List<SiteMemberInfo> listMembersInfo​(java.lang.String shortName, java.lang.String nameFilter, java.lang.String roleFilter, int size, boolean collapseGroups)
      List the members of the site.
      org.alfresco.query.PagingResults<SiteMembership> listMembersPaged​(java.lang.String shortName, boolean collapseGroups, java.util.List<org.alfresco.util.Pair<SiteService.SortFields,​java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)
      Gets the role of the specified user.
      java.util.List<SiteMembership> listSiteMemberships​(java.lang.String userName, int size)
      Lists all the memberships in sites that the specified user is in.
      java.util.List<SiteInfo> listSites​(java.lang.String userName)
      List all the sites that the specified user has a explicit membership to.
      java.util.List<SiteInfo> listSites​(java.lang.String userName, int size)
      List all the sites that the specified user has a explicit membership to.
      java.util.List<SiteInfo> listSites​(java.lang.String filter, java.lang.String sitePresetFilter)
      List the available sites.
      java.util.List<SiteInfo> listSites​(java.lang.String filter, java.lang.String sitePresetFilter, int size)
      List the available sites.
      org.alfresco.query.PagingResults<SiteInfo> listSites​(java.util.List<FilterProp> filterProps, java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)
      This method returns paged result sets of SiteInfo objects, which should be more efficient than the unpaged methods also available on this interface.
      org.alfresco.query.PagingResults<SiteMembership> listSitesPaged​(java.lang.String userName, java.util.List<org.alfresco.util.Pair<SiteService.SortFields,​java.lang.Boolean>> sortProps, org.alfresco.query.PagingRequest pagingRequest)
      List all the sites that the specified user has a explicit membership to.
      void removeMembership​(java.lang.String shortName, java.lang.String authorityName)
      Clears an authorities role within a site
      java.lang.String resolveSite​(java.lang.String group)  
      void setMembership​(java.lang.String shortName, java.lang.String authorityName, java.lang.String role)
      Sets the role of an authority within a site
      void updateSite​(SiteInfo siteInfo)
      Update the site information.
    • Method Detail

      • createSite

        @Auditable(parameters={"sitePreset","shortName"})
        SiteInfo createSite​(java.lang.String sitePreset,
                            java.lang.String shortName,
                            java.lang.String title,
                            java.lang.String description,
                            boolean isPublic)
        Deprecated.
        Create a new site.
        Parameters:
        sitePreset - site preset name
        shortName - site short name, must be unique
        title - site title
        description - site description
        isPublic - whether the site is public or not (true = public, false = private)
        Returns:
        SiteInfo information about the created site
      • canAddMember

        @NotAuditable
        boolean canAddMember​(java.lang.String shortName,
                             java.lang.String authorityName,
                             java.lang.String role)
        Can the current user add the authority "authorityName" to the site "shortName" with role "role"?
        Parameters:
        shortName - site short name, must be unique
        authorityName - authority to add
        role - site role
        Returns:
        true if the current user can add the authority to the site, false otherwise
      • createSite

        @Auditable(parameters={"sitePreset","shortName"})
        SiteInfo createSite​(java.lang.String sitePreset,
                            java.lang.String shortName,
                            java.lang.String title,
                            java.lang.String description,
                            SiteVisibility visibility)
        Create a new site.
        Parameters:
        sitePreset - site preset name
        shortName - site short name, must be unique
        title - site title
        description - site description
        visibility - site visibility (public|moderated|private)
        Returns:
        SiteInfo information about the created site
      • createSite

        @Auditable(parameters={"sitePreset","shortName"})
        SiteInfo createSite​(java.lang.String sitePreset,
                            java.lang.String shortName,
                            java.lang.String title,
                            java.lang.String description,
                            SiteVisibility visibility,
                            org.alfresco.service.namespace.QName siteType)
        Create a new site.
        Parameters:
        sitePreset - site preset name
        shortName - site short name, must be unique
        title - site title
        description - site description
        visibility - site visibility (public|moderated|private)
        siteType - type of site to create, must be a sub-type of st:site
        Returns:
        SiteInfo information about the created site
      • hasCreateSitePermissions

        @NotAuditable
        boolean hasCreateSitePermissions()
        This method checks if the currently authenticated user has permission to create sites.
        Returns:
        true if current user can create sites, else false.
        Since:
        3.4
      • findSites

        @NotAuditable
        java.util.List<SiteInfo> findSites​(java.lang.String filter,
                                           java.lang.String sitePresetFilter,
                                           int size)
        This method will find all sites available to the currently authenticated user based on the specified site filter, site preset filter and result set size. The filter parameter will match any sites whose cm:name, cm:title or cm:description contain the specified string (ignoring case).

        Note that this method uses Alfresco Full Text Search to retrieve results and depending on server Lucene, SOLR configuration may only offer eventually consistent results.

        Parameters:
        filter - Any supplied filter will be wrapped in asterisks (e.g. '*foo*') and used to match the sites' cm:name, cm:title or cm:description.
        sitePresetFilter - a site preset filter name to match against.
        size - this parameter specifies a maximum result set size.
        Returns:
        Site objects for all matching sites up to the maximum result size.
        Since:
        4.0
      • findSites

        @NotAuditable
        java.util.List<SiteInfo> findSites​(java.lang.String filter,
                                           int size)
        This method will find all sites available to the currently authenticated user based on the specified site filter and result set size. The filter parameter will match any sites whose cm:name, cm:title or cm:description contain the specified string (ignoring case).

        Note that this method uses Alfresco Full Text Search to retrieve results and depending on server Lucene, SOLR configuration may only offer eventually consistent results.

        Parameters:
        filter - Any supplied filter will be wrapped in asterisks (e.g. 'foo*') and used to match the sites' cm:name, cm:title or cm:description.
        size - this parameter specifies a maximum result set size.
        Returns:
        Site objects for all matching sites up to the maximum result size.
        Since:
        5.0
      • listSites

        @NotAuditable
        java.util.List<SiteInfo> listSites​(java.lang.String filter,
                                           java.lang.String sitePresetFilter,
                                           int size)
        List the available sites. This list can optionally be filtered by site name/title/description and/or site preset.

        Note: Starting with Alfresco 4.0, the filter parameter will only match sites whose cm:name or cm:title or cm:description start with the specified string (ignoring case). The listing of sites whose cm:names (or titles or descriptions) contain the specified string is no longer supported. To retrieve sites whose cm:names etc contain a substring, findSites(String, String, int) should be used instead.

        THIS METHOD CAN RETURN INCOMPLETE RESULTS WHILE CACHES CATCH UP WITH REALITY (BM-0012: Run v420b1494_01: (CMIS) GetSites is Slow).

        Parameters:
        filter - filter (sites whose cm:name, cm:title or cm:description START WITH filter)
        sitePresetFilter - site preset filter (sites whose preset EQUALS sitePresetFilter)
        size - list maximum size or zero for all
        Returns:
        list of site information
      • listSites

        @NotAuditable
        java.util.List<SiteInfo> listSites​(java.lang.String filter,
                                           java.lang.String sitePresetFilter)
        List the available sites. This list can optionally be filtered by site name/title/description and/or site preset.

        Note: Starting with Alfresco 4.0, the filter parameter will only match sites whose cm:name or cm:title or cm:description start with the specified string (ignoring case). The listing of sites whose cm:names (or titles or descriptions) contain the specified string is no longer supported. To retrieve sites whose cm:names etc contain a substring, findSites(String, String, int) should be used instead.

        Parameters:
        filter - filter
        sitePresetFilter - site preset filter
        Returns:
        list of site information
      • listSites

        @NotAuditable
        java.util.List<SiteInfo> listSites​(java.lang.String userName)
        List all the sites that the specified user has a explicit membership to.
        Parameters:
        userName - user name
        Returns:
        list of site information
      • listSites

        @NotAuditable
        org.alfresco.query.PagingResults<SiteInfo> listSites​(java.util.List<FilterProp> filterProps,
                                                             java.util.List<org.alfresco.util.Pair<org.alfresco.service.namespace.QName,​java.lang.Boolean>> sortProps,
                                                             org.alfresco.query.PagingRequest pagingRequest)
        This method returns paged result sets of SiteInfo objects, which should be more efficient than the unpaged methods also available on this interface. It is also guaranteed to return fully consistent results.
        Parameters:
        filterProps - property filters
        sortProps - sorting options
        pagingRequest - paging options
        Returns:
        a page of SiteInfo objects.
        Since:
        4.0
      • listSiteMemberships

        @NotAuditable
        java.util.List<SiteMembership> listSiteMemberships​(java.lang.String userName,
                                                           int size)
        Lists all the memberships in sites that the specified user is in.
        Parameters:
        userName - String
        size - list maximum size or zero for all
        Returns:
        a list of SiteMembership objects
      • listSites

        @NotAuditable
        java.util.List<SiteInfo> listSites​(java.lang.String userName,
                                           int size)
        List all the sites that the specified user has a explicit membership to.
        Parameters:
        userName - user name
        size - list maximum size or zero for all
        Returns:
        list of site information
      • getSite

        @NotAuditable
        SiteInfo getSite​(java.lang.String shortName)
        Gets site information based on the short name of a site.

        Returns null if the site can not be found.

        Parameters:
        shortName - the site short name
        Returns:
        SiteInfo the site information
      • getSite

        @NotAuditable
        SiteInfo getSite​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        This method gets the SiteInfo for the Share Site which contains the given NodeRef. If the given NodeRef is not contained within a Share Site, then null is returned.
        Parameters:
        nodeRef - the node whose containing site's info is to be found.
        Returns:
        SiteInfo site information for the containing site or null if node is not in a site.
      • getSiteShortName

        @NotAuditable
        java.lang.String getSiteShortName​(org.alfresco.service.cmr.repository.NodeRef nodeRef)
        This method gets the shortName for the Share Site which contains the given NodeRef. If the given NodeRef is not contained within a Share Site, then null is returned.
        Parameters:
        nodeRef - the node whose containing site's info is to be found.
        Returns:
        String site short name for the containing site or null if node is not in a site.
      • hasSite

        @NotAuditable
        boolean hasSite​(java.lang.String shortName)
        Returns true if the site exists. This allows create scripts to confirm the existence of private sites - they would not normally be returned from getSite() if the user does not have permission on the site noderef.
        Parameters:
        shortName - the site short name
        Returns:
        true if the site exists, false otherwise
      • updateSite

        @Auditable
        void updateSite​(SiteInfo siteInfo)
        Update the site information.

        Note that the short name and site preset of a site can not be updated once the site has been created.

        Parameters:
        siteInfo - site information
      • deleteSite

        @Auditable(parameters="shortName")
        void deleteSite​(java.lang.String shortName)
        Delete the site.
        Parameters:
        shortName - site short name
      • listMembers

        @NotAuditable
        void listMembers​(java.lang.String shortName,
                         java.lang.String nameFilter,
                         java.lang.String roleFilter,
                         boolean collapseGroups,
                         SiteService.SiteMembersCallback callback)
        List the members of the site. This includes both users and groups.

        Name and role filters are optional and if not specified all the members of the site are returned.

        Parameters:
        shortName - site short name
        nameFilter - name filter
        roleFilter - role filter
        collapseGroups - true if collapse member groups into user list, false otherwise
        callback - callback
      • listMembers

        @NotAuditable
        java.util.Map<java.lang.String,​java.lang.String> listMembers​(java.lang.String shortName,
                                                                           java.lang.String nameFilter,
                                                                           java.lang.String roleFilter,
                                                                           int size)
        List the members of the site. This includes both users and groups.

        Name and role filters are optional and if not specified all the members of the site are returned.

        Parameters:
        shortName - site short name
        nameFilter - name filter
        roleFilter - role filter
        size - max results size crop if >0
        Returns:
        the authority name and their role
      • listMembers

        @NotAuditable
        java.util.Map<java.lang.String,​java.lang.String> listMembers​(java.lang.String shortName,
                                                                           java.lang.String nameFilter,
                                                                           java.lang.String roleFilter,
                                                                           int size,
                                                                           boolean collapseGroups)
        List the members of the site. This includes both users and groups if collapseGroups is set to false, otherwise all groups that are members are collapsed into their component users and listed.
        Parameters:
        shortName - site short name
        nameFilter - name filter
        roleFilter - role filter
        size - max results size crop if >0
        collapseGroups - true if collapse member groups into user list, false otherwise
        Returns:
        the authority name and their role
      • listMembersInfo

        @NotAuditable
        java.util.List<SiteMemberInfo> listMembersInfo​(java.lang.String shortName,
                                                       java.lang.String nameFilter,
                                                       java.lang.String roleFilter,
                                                       int size,
                                                       boolean collapseGroups)
        List the members of the site. This includes both users and groups if collapseGroups is set to false, otherwise all groups that are members are collapsed into their component users and listed.
        Parameters:
        shortName - site short name
        nameFilter - name filter
        roleFilter - role filter
        size - max results size crop if >0
        collapseGroups - true if collapse member groups into user list, false otherwise
        Returns:
        List of site authorities’ information objects
      • listMembersPaged

        @NotAuditable
        org.alfresco.query.PagingResults<SiteMembership> listMembersPaged​(java.lang.String shortName,
                                                                          boolean collapseGroups,
                                                                          java.util.List<org.alfresco.util.Pair<SiteService.SortFields,​java.lang.Boolean>> sortProps,
                                                                          org.alfresco.query.PagingRequest pagingRequest)
        Gets the role of the specified user. Returns a paged list of the members of the site. This includes both users and groups if collapseGroups is set to false, otherwise all groups that are members are collapsed into their component users and listed.
        Parameters:
        shortName - site short name
        collapseGroups - true if collapse member groups into user list, false otherwise
        pagingRequest - the paging request
        Returns:
        the authority name and their role
      • getMembersRoleInfo

        @NotAuditable
        SiteMemberInfo getMembersRoleInfo​(java.lang.String shortName,
                                          java.lang.String authorityName)
        Gets the extended role information of the specified user.
        Parameters:
        shortName - site short name
        authorityName - full authority name (so if it's a group then its prefixed with 'GROUP_')
        Returns:
        SiteMemberInfo site role information, null if none
      • isMember

        @NotAuditable
        boolean isMember​(java.lang.String shortName,
                         java.lang.String authorityName)
        Indicates whether an authority is a member of a site or not
        Parameters:
        shortName - site short name
        authorityName - authority name (so if it's a group then its prefixed with 'GROUP_')
        Returns:
        boolean true if the authority is a member of the site, false otherwise
      • setMembership

        @Auditable(parameters={"shortName","authorityName","role"})
        void setMembership​(java.lang.String shortName,
                           java.lang.String authorityName,
                           java.lang.String role)
        Sets the role of an authority within a site
        Parameters:
        shortName - site short name
        authorityName - authority name (so if it's a group then its prefixed with 'GROUP_')
        role - site role
        Throws:
        UnknownAuthorityException - if the site role is not supported.
      • removeMembership

        @Auditable(parameters={"shortName","authorityName"})
        void removeMembership​(java.lang.String shortName,
                              java.lang.String authorityName)
        Clears an authorities role within a site
        Parameters:
        shortName - site short name
        authorityName - authority name (so if it's a group then its prefixed with 'GROUP_')
      • createContainer

        @NotAuditable
        org.alfresco.service.cmr.repository.NodeRef createContainer​(java.lang.String shortName,
                                                                    java.lang.String componentId,
                                                                    org.alfresco.service.namespace.QName containerType,
                                                                    java.util.Map<org.alfresco.service.namespace.QName,​java.io.Serializable> containerProperties)
        Creates a container for a component is a site of the given container type (must be a sub-type of st:siteContainer)

        If no container type is specified then a node of type st:siteContainer is created.

        The map of container properties are set on the created container node. Null can be provided when no properties need to be set.

        Parameters:
        shortName - site short name
        componentId - component id
        containerType - container type to create (can be null)
        containerProperties - container property values (can be null)
        Returns:
        noderef of container or null if a container can't be created.
      • getContainer

        @NotAuditable
        org.alfresco.service.cmr.repository.NodeRef getContainer​(java.lang.String shortName,
                                                                 java.lang.String componentId)
        Gets the "container" folder for the specified component.
        Parameters:
        shortName - short name of site
        componentId - component id
        Returns:
        noderef of container
      • listContainers

        @NotAuditable
        org.alfresco.query.PagingResults<FileInfo> listContainers​(java.lang.String shortName,
                                                                  org.alfresco.query.PagingRequest pagingRequest)
        Returns a paged list of top level containers for the site
        Parameters:
        shortName - short name of site
        pagingRequest - paging request
        Returns:
        paged list of top level containers
      • hasContainer

        @NotAuditable
        boolean hasContainer​(java.lang.String shortName,
                             java.lang.String componentId)
        Determines if a "container" folder for the specified component exists.
        Parameters:
        shortName - short name of site
        componentId - component id
        Returns:
        true => "container" folder exists for component
      • getSiteRoles

        @NotAuditable
        java.util.List<java.lang.String> getSiteRoles()
        Gets a list of all the currently available roles that a user can perform on all sites
        Returns:
        list of available roles
      • getSiteRoles

        @NotAuditable
        java.util.List<java.lang.String> getSiteRoles​(java.lang.String shortName)
        Gets a list of all the currently available roles that a user can perform on a specific site. This will generally only differ from getSiteRoles() if your site is of a custom type.
        Returns:
        list of available roles
      • getSiteGroup

        @NotAuditable
        java.lang.String getSiteGroup​(java.lang.String shortName)
        Gets the sites group. All members of the site are contained within this group.
        Parameters:
        shortName - site short name
        Returns:
        String group name
      • getSiteRoleGroup

        @NotAuditable
        java.lang.String getSiteRoleGroup​(java.lang.String shortName,
                                          java.lang.String role)
        Gets the sites role group. All members assigned the given role will be members of the returned group.
        Parameters:
        shortName - site short name
        role - membership role
        Returns:
        String group name
      • getSiteRoot

        @NotAuditable
        org.alfresco.service.cmr.repository.NodeRef getSiteRoot()
        Gets the reference to the folder that is the Site root node.
        Returns:
        site root node.
      • cleanSitePermissions

        void cleanSitePermissions​(org.alfresco.service.cmr.repository.NodeRef relocatedNode,
                                  SiteInfo containingSite)
        This method cleans the permissions on the specified node. It is intended to be used after a node is moved or copied from one site to another. Permissions relating to the former site are removed and the node is given the default permissions for its new site.
        Parameters:
        relocatedNode - NodeRef
        containingSite - SiteInfo
        Since:
        3.4.2
      • listSitesPaged

        @NotAuditable
        org.alfresco.query.PagingResults<SiteMembership> listSitesPaged​(java.lang.String userName,
                                                                        java.util.List<org.alfresco.util.Pair<SiteService.SortFields,​java.lang.Boolean>> sortProps,
                                                                        org.alfresco.query.PagingRequest pagingRequest)
        List all the sites that the specified user has a explicit membership to.
        Parameters:
        userName - user name
        Returns:
        paged list of site information
      • resolveSite

        @NotAuditable
        java.lang.String resolveSite​(java.lang.String group)
      • getMembersRole

        @NotAuditable
        java.lang.String getMembersRole​(java.lang.String shortName,
                                        java.lang.String authorityName)
      • countAuthoritiesWithRole

        @NotAuditable
        int countAuthoritiesWithRole​(java.lang.String shortName,
                                     java.lang.String role)
      • isSiteAdmin

        @NotAuditable
        boolean isSiteAdmin​(java.lang.String userName)
        Indicates whether the specified user is a site administrator or not.

        Note: The super/repo admin is considered to be a site administrator too.

        Parameters:
        userName - The user name
        Returns:
        true if the specified user is a 'site administrator', false otherwise