-
_cancelJoinSiteRequestSuccess(response, originalRequestConfig)
-
Success-handler for the request to cancel a join-site request.
Parameters:
Name |
Type |
Description |
response |
object
|
The response object |
originalRequestConfig |
object
|
The original configuration passed when the request was made |
- Since:
- Source:
-
addSiteAsFavourite(payload)
-
Handles requesting that a site be made a favourite.
Parameters:
Name |
Type |
Description |
payload |
object
|
The payload containing the details of the site to add to the favourites list |
- Source:
-
becomeSiteManager(data)
-
Handles XHR posting to make a user a site manager.
Parameters:
Name |
Type |
Description |
data |
object
|
The payload containing the user status to post. |
- Source:
-
cancelJoinSiteRequest(payload)
-
Cancel a pending request to join a site
Parameters:
Name |
Type |
Description |
payload |
object
|
The publication payload |
- Since:
- Source:
-
createSite(payload)
-
This method delegates site creation to the legacy YUI popup as found in Alfresco Share unless the
legacyMode is configured to be false, in which
case a request is published to display a form dialog containing the
widgetsForCreateSiteDialog.
Parameters:
Name |
Type |
Description |
payload |
object
|
The payload published with the request to create a site |
- Source:
Fires:
- module:alfresco/core/topics#event:CREATE_FORM_DIALOG
-
disableSiteActivityFeed(payload)
-
Handles requests to disable the activity feed for a site (for the current user).
Parameters:
Name |
Type |
Description |
payload |
object
|
The details of the site to disable the feed for |
- Source:
-
editEditSiteData(payload)
-
Attempts to edit a site using the data supplied in the payload.
Parameters:
Name |
Type |
Description |
payload |
object
|
The payload containing the data for the site to create |
- Since:
- Source:
Fires:
-
editSite(site)
-
This method delegates edit creation to the legacy YUI popup as found in Alfresco Share unless the
legacyMode is configured to be false, in which
case a request is published to get the full site details in order to display a form dialog containing the
widgetsForEditSiteDialog.
Parameters:
Name |
Type |
Description |
site |
string
|
|
- Source:
-
enableSiteActivityFeed(payload)
-
Handles requests to enable the activity feed for a site (for the current user).
Parameters:
Name |
Type |
Description |
payload |
object
|
The details of the site to enable the feed for |
- Source:
-
favouriteSiteAdded(response, originalRequestConfig)
-
This handles successfully completed requests to remove a site from the favourites list for a user. It publishes the
details on "ALF_FAVOURITE_SITE_ADDED" topic.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request |
originalRequestConfig |
object
|
The configuration passed on the original request |
- Source:
-
favouriteSiteRemoved(response, originalRequestConfig)
-
This handles successfully completed requests to remove a site from the favourites list for a user. It publishes the
details on "ALF_FAVOURITE_SITE_REMOVED" topic.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the XHR request to remove the site. |
originalRequestConfig |
object
|
The original configuration passed when the request was made. |
- Source:
-
getAdminSites(payload)
-
Get sites list using the admin API - this returns ALL sites if the user is a member of the SITE_ADMINISTRATORS group.
Parameters:
Name |
Type |
Description |
payload |
object
|
The details of the request |
- Source:
-
getFavouriteSites(payload)
-
Handles requests to retrieve the current users list of favourite sites.
Parameters:
Name |
Type |
Description |
payload |
object
|
|
- Source:
-
getRecentSites(payload)
-
Handles requests to retrieve the current users list of recently visited sites.
Parameters:
Name |
Type |
Description |
payload |
object
|
|
- Source:
-
getSiteContentReport(payload)
-
Parameters:
Name |
Type |
Description |
payload |
object
|
The details of the request |
- Source:
-
getSiteDetails(config)
-
This function makes a request to obtain the details of a specific site. Unlike the other functions
in this service it requires a specific callback function and scope to be provided in the request
as it doesn't make sense to just publish site information.
Parameters:
Name |
Type |
Description |
config |
object
|
An object with the details of the site to retrieve the data for. |
- Source:
-
getSiteMemberships(payload)
-
Retrieves the site membership data for the supplied site.
Parameters:
Name |
Type |
Description |
payload |
object
|
The details of the site to retrieve member data for |
- Source:
-
getSites(payload)
-
Parameters:
Name |
Type |
Description |
payload |
object
|
The details of the request |
- Source:
-
getSitesSuccess(response, originalRequestConfig)
-
This processes the results returned from the XHR request.
Parameters:
Name |
Type |
Description |
response |
object
|
|
originalRequestConfig |
object
|
|
- Source:
-
getTopSiteContributorReport(payload)
-
Requests data that gives an overview of the amount of created content for each user in the site.
Parameters:
Name |
Type |
Description |
payload |
object
|
The details of the request |
- Source:
-
getUserSites(payload)
-
Parameters:
Name |
Type |
Description |
payload |
payload
|
The details of the user to retrieve sites for |
- Since:
- Source:
-
initService()
-
Ensures that default
sitePresets are configured
if no custom values have been provided.
- Since:
- Source:
-
joinSite(config)
-
Performs and XHR put request to make the user a member of the site. The argument supplied must include
the attributes "site" and "user" and can optionally include an attribute "role".
Parameters:
Name |
Type |
Description |
config |
object
|
The configuration for the join request. |
- Source:
-
leaveSite(site, user)
-
Parameters:
Name |
Type |
Description |
site |
string
|
The name of the site to leave |
user |
string
|
The name of the user to leave the site |
- Source:
-
leaveSiteRequest(payload)
-
Handles a request to leave a site.
Parameters:
Name |
Type |
Description |
payload |
object
|
|
- Source:
-
leaveSiteSuccess()
-
When a request is made for a user to leave a site we should determine whether or not the current user is the
user removed and whether or not they are currently viewing that site. If they are then we should navigate
them away from the site and back to their dashboard.
In a future where notifications are generated based on events generated by other users, this would mean
that a user can be immediately ejected from a site as soon as they are removed from it (e.g. A Site Manager
removes a user from a site and if that user is viewing the site they are "ejected").
- Source:
-
onActionDeleteSite(payload)
-
Handles requests to delete the supplied site.
Parameters:
Name |
Type |
Description |
payload |
object
|
The details of the site to delete |
- Source:
-
onActionDeleteSiteConfirmation(payload)
-
This function is called when the user confirms that they wish to delete a site
Parameters:
Name |
Type |
Description |
payload |
object
|
An object containing the details of the site to be deleted. |
- Source:
-
onActionDeleteSiteSuccess(payload)
-
This action will be called when a site is successfully deleted
Parameters:
Name |
Type |
Description |
payload |
object
|
|
- Source:
Fires:
-
onCreateSiteData(payload)
-
Attempts to create a new site using the data provided in the supplied payload.
Parameters:
Name |
Type |
Description |
payload |
object
|
The payload containing the data for the site to create |
- Since:
- Source:
Fires:
-
onSiteCreationFailure(response, originalRequestConfig)
-
Handles failed requests to create a site.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request to create the site |
originalRequestConfig |
object
|
The configuration for the request to create the site |
- Since:
- Source:
Fires:
-
onSiteCreationSuccess(response, originalRequestConfig)
-
Handles the successful creation of a new site.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request to create the site |
originalRequestConfig |
object
|
The configuration for the request to create the site |
- Since:
- Source:
Fires:
-
onSiteEditFailure(response, originalRequestConfig)
-
Handles failed requests to edit a site.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request to edit the site |
originalRequestConfig |
object
|
The configuration for the request to edit the site |
- Since:
- Source:
Fires:
-
onSiteEditSuccess(response, originalRequestConfig)
-
Handles the successful editing of site details.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request to edit the site |
originalRequestConfig |
object
|
The configuration for the request to edit the site |
- Since:
- Source:
Fires:
-
onUserSitesFailure(response, originalRequestConfig)
-
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request |
originalRequestConfig |
object
|
The configuration passed on the original request |
- Since:
- Source:
-
onUserSitesSuccess(response, originalRequestConfig)
-
Handles successful requests to get users filtered by the supplied user name. Makes an additional
XHR request to determine whether or not the user is being followed by the current user.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request |
originalRequestConfig |
object
|
The configuration passed on the original request |
- Since:
- Source:
-
publishSiteDetails(response, originalRequestConfig)
-
Publishes the details of a site on the requested topic. This is called
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request |
originalRequestConfig |
object
|
The configuration passed on the original request |
- Source:
-
publishSites(response, originalRequestConfig)
-
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the request |
originalRequestConfig |
object
|
The configuration passed on the original request |
- Since:
- Source:
-
registerSubscriptions()
-
Sets up the subscriptions for the ReportService
- Since:
- Source:
-
registerSubscriptions()
-
Sets up the subscriptions for the SiteService
- Since:
- Source:
Listens to Events:
-
reloadData()
-
This is a method that reloads DocList data
- Source:
Fires:
-
reloadPage()
-
This is a catch all success handler for both the join site and become site manager. It simply reloads
the current page. It is ** INCORRECTLY ** assumed that the current user will always be on the site
referenced in the request. This method needs to be updated accordingly.
- Source:
Fires:
- module:alfresco/core/topics#event:RELOAD_PAGE
-
removeSiteFromFavourites(payload)
-
Handles requesting that a site be removed from favourites
Parameters:
Name |
Type |
Description |
payload |
object
|
The payload containing the details of the site to remove from the favourites list |
- Source:
-
requestSiteMembership(config)
-
Handles requests to request membership of a moderated site
Parameters:
Name |
Type |
Description |
config |
object
|
The configuration for the join request. |
- Source:
-
showEditSiteDialog(response, originalRequestConfig)
-
This is called as a result of
editSite being used
when
legacyMode is configured to be false. It
takes the site data supplied in the response and publishes a request to display a form dialog containing the
widgetsForEditSiteDialog.
Parameters:
Name |
Type |
Description |
response |
object
|
The details of the site to be edited |
originalRequestConfig |
object
|
The details of the request made to obtain site data |
- Source:
Fires:
- module:alfresco/core/topics#event:CREATE_FORM_DIALOG
-
siteJoined(response, originalRequestConfig)
-
This function is called when a user successfully joins a site.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the XHR request to join the site. |
originalRequestConfig |
object
|
The original configuration passed when the request was made. |
- Source:
Fires:
-
siteLeft(response, originalRequestConfig)
-
This function is called when a user has successfully left a site.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the XHR request to leave the site. |
originalRequestConfig |
object
|
The original configuration passed when the request was made. |
- Source:
-
siteLeftFailure(response, originalRequestConfig)
-
This function is called when a user has failued to leave a site.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the XHR request to leave the site. |
originalRequestConfig |
object
|
The original configuration passed when the request was made. |
- Source:
-
siteMembershipRequestComplete(response, originalRequestConfig)
-
Callback that occurs after a request to join a moderated site is complete.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the XHR request to join the site. |
originalRequestConfig |
object
|
The original configuration passed when the request was made. |
- Source:
-
siteMembershipRequestFailed(response, originalRequestConfig)
-
Callback that occurs after a request to join a moderated site has failed.
Parameters:
Name |
Type |
Description |
response |
object
|
The response from the XHR request to join the site. |
originalRequestConfig |
object
|
The original configuration passed when the request was made. |
- Since:
- Source:
-
updateSite(payload)
-
This function handles requests to update a specific site
Parameters:
Name |
Type |
Description |
payload |
object
|
Details of the update |
- Source:
-
validateSiteIdentifier(payload)
-
Handles requests to validate whether or not a suggested site title or shortName has
already been used.
Parameters:
Name |
Type |
Description |
payload |
object
|
|
- Since:
- Source: