2020-12-11 16:37:49 +00:00

14 KiB

Title, Added, Status, Last reviewed
Title Added Status Last reviewed
Sites service v2.0.0 Active 2018-11-13

Sites service

Accesses and manipulates sites from a Content Services repository.

Class members

Methods

  • approveSiteMembershipRequest(siteId: string, inviteeId: string, opts?: any): Observable<SiteMembershipRequestWithPersonPaging>
    Accept site membership requests.
    • siteId: string - The identifier of a site.
    • inviteeId: string - The invitee user name.
    • opts: any - (Optional) Options supported by JS-API
    • Returns Observable<SiteMembershipRequestWithPersonPaging> - Null response notifying when the operation is complete
  • createSiteGroupMembership(siteId: string, siteMembershipBodyCreate: SiteMembershipBodyCreate): Observable<SiteGroupEntry>
    Create a site membership for group
  • createSiteMembership(siteId: string, siteMembershipBodyCreate: SiteMembershipBodyCreate, opts?: any): Observable<SiteMemberEntry>
    Creates a site membership for person personId on site siteId.
  • deleteSite(siteId: string, permanentFlag: boolean = true): Observable<any>
    Deletes a site.
    • siteId: string - Site to delete
    • permanentFlag: boolean - True: deletion is permanent; False: site is moved to the trash
    • Returns Observable<any> - Null response notifying when the operation is complete
  • deleteSiteGroupMembership(siteId: string, groupId: string): Observable<void>
    Delete a group membership for site
    • siteId: string - The identifier of a site.
    • groupId: string - The authorityId of a group.
    • Returns Observable<void> - Observable<void>
  • deleteSiteMembership(siteId: string, personId: string): Observable<void>
    Delete a site membership
    • siteId: string - The identifier of a site.
    • personId: string - The identifier of a person.
    • Returns Observable<void> - Null response notifying when the operation is complete
  • getEcmCurrentLoggedUserName(): string
    Gets the username of the user currently logged into ACS.
    • Returns string - Username string
  • getSite(siteId: string, opts?: any): Observable<SiteEntry|Function>
    Gets the details for a site.
    • siteId: string - ID of the target site
    • opts: any - (Optional) Options supported by JS-API
    • Returns Observable<SiteEntry|Function> - Information about the site
  • getSiteContent(siteId: string): Observable<SiteEntry|Function>
    Gets a site's content.
  • getSiteGroupMembership(siteId: string, groupId: string): Observable<SiteGroupEntry>
    Get information about site membership of group
    • siteId: string - The identifier of a site.
    • groupId: string - The authorityId of a group.
    • Returns Observable<SiteGroupEntry> - Observable<SiteGroupEntry>
  • getSiteMembers(siteId: string): Observable<SiteEntry|Function>
    Gets a list of all a site's members.
  • getSiteMembershipRequests(opts?: any): Observable<SiteMembershipRequestWithPersonPaging>
    Gets a list of site membership requests.
  • getSiteNameFromNodePath(node: MinimalNode): string
    Looks for a site inside the path of a Node and returns its guid if it finds one. (return an empty string if no site is found)
    • node: MinimalNode - Node to look for parent site
    • Returns string - Site guid
  • getSites(opts: any = {}): Observable<SitePaging>
    Gets a list of all sites in the repository.
  • listSiteGroups(siteId: string, opts?: any): Observable<SiteGroupPaging>
    List group membership for site
    • siteId: string - The identifier of a site.
    • opts: any - (Optional) Options supported by JS-API
    • Returns Observable<SiteGroupPaging> - Observable<SiteGroupPaging>
  • listSiteMemberships(siteId: string, opts: any): Observable<SiteMemberPaging>
    Gets a list of all a site's members.
    • siteId: string - ID of the target site
    • opts: any - Optional parameters supported by JS-API
    • Returns Observable<SiteMemberPaging> - Observable<SiteMemberPaging>
  • rejectSiteMembershipRequest(siteId: string, inviteeId: string, opts?: any): Observable<SiteMembershipRequestWithPersonPaging>
    Reject site membership requests.
    • siteId: string - The identifier of a site.
    • inviteeId: string - The invitee user name.
    • opts: any - (Optional) Options supported by JS-API
    • Returns Observable<SiteMembershipRequestWithPersonPaging> - Null response notifying when the operation is complete
  • updateSiteGroupMembership(siteId: string, groupId: string, siteMembershipBodyUpdate: SiteMembershipBodyUpdate): Observable<SiteGroupEntry>
    Update site membership of group
  • updateSiteMembership(siteId: string, personId: string, siteMembershipBodyUpdate: SiteMembershipBodyUpdate, opts?: any): Observable<SiteMemberEntry>
    Update a site membership
    • siteId: string - The identifier of a site.
    • personId: string - The identifier of a person.
    • siteMembershipBodyUpdate: SiteMembershipBodyUpdate - The persons new role
    • opts: any - (Optional) Optional parameters
    • Returns Observable<SiteMemberEntry> - Observable<SiteMemberEntry>

Details

You can use getSites to get a list of all sites in the repository. If you are only interested in a single site and you have its ID, you can use getSite to access it. Alternatively, you can use getSiteContent or getSiteMembers to extract just the contents and members properties of the site.

You can also delete a site using deleteSite. If the permanentFlag parameter is set to false then the site will be moved to the trash rather than being deleted immediately.

Both getSite and getSites have an opts parameter to supply extra options. See the Alfresco JS API docs about getSites and getSite for more information about the available options.