Module: alfresco/services/SiteService

alfresco/services/SiteService

Author:
  • Erik Winlöf
License:
Source:

Members

additionalSitePresets :object[]

This can be configured to be an array of additional site presets that will be added to the default set (which will just be the "Collaboration Site"). Rather than configuring the sitePresets it may be better to define additional presets. Each element in the array should be an object with "label" and "value" attributes where the value matches a preset configured in Share.
Type:
  • object[]
Since:
  • 1.0.95
Default Value:
  • null
Source:

createSiteDialogHeight :string

In order to get a smoother initial rendering of the create site dialog a fixed height is configured. However when customizing the contents of the create site dialog it may be advisable to set an alternative height (or configure to be null and allow natural sizing to occur).
Type:
  • string
Since:
  • 1.0.99
Default Value:
  • "500px"
Source:

createSiteDialogWidth :string

In order to get a smoother initial rendering of the create site dialog a fixed width is configured. However when customizing the contents of the create site dialog it may be advisable to set an alternative width (or configure to be null and allow natural sizing to occur).
Type:
  • string
Since:
  • 1.0.99
Default Value:
  • "670px"
Source:

i18nRequirements :Array

An array of the i18n files to use with this widget.
Type:
  • Array
Source:

i18nRequirements :Array

An array of the i18n files to use with this widget.
Type:
  • Array
Source:

legacyMode :boolean

Indicates whether or not the Site Service is running in legacy mode. When configured in this mode the service will attempt to use the YUI2 based dialogs provided by Alfresch Share for creating and editing sites. If this is configured to be false then the DialogService will be used to display dialogs for creating and editing sites.
Type:
  • boolean
Since:
  • 1.0.55
Default Value:
  • true
Source:

setCreateSiteDialogValueTopic :string

This is an optional topic that can be configured to allow the create site dialog to have a value set on it. This can be useful when needing to pre-fill fields based changing data within the form (for example a custom preset). The use case is when a custom field needs to make an XHR request for data to be added (i.e. something not possible through autoSetConfig).
Type:
  • string
Since:
  • 1.0.97
Default Value:
  • null
Source:

setEditSiteDialogValueTopic :string

This is an optional topic that can be configured to allow the edit site dialog to have a value set on it. This can be useful when needing to pre-fill fields based changing data within the form (for example a custom preset). The use case is when a custom field needs to make an XHR request for data to be added (i.e. something not possible through autoSetConfig).
Type:
  • string
Since:
  • 1.0.97
Default Value:
  • null
Source:

siteHomePage :string

The prefix to apply to site locations to complete the URL for site home pages. Prior to version 5.1 of Share this would be "/dashboard" but from Share 5.1 onwards the site home page is configurable so should be configured to be the empty string.
Type:
  • string
Since:
  • 1.0.95
Default Value:
  • "/dashboard"
Source:

sitePresets :object[]

This is an array of site preset options that will be displayed when creating a site (when the service is not configured to be in legacyMode). The default configuration just contains the "Collaboration Site", but this can be overridden here. Any presets must have values that map to presets in the Surf configuration. Note that additionalSitePresets can be used to augment the default list rather than replacing it completely.
Type:
  • object[]
Since:
  • 1.0.55
Source:

sitePresetsToRemove :string[]

This can be configured to be a string array of the site preset values to be removed from both sitePresets and additionalSitePresets. Note that unlike those attributes this is just a string array rather than an object array because only the site preset values (not labels) are matched.
Type:
  • string[]
Since:
  • 1.0.95
Default Value:
  • null
Source:

userHomePage :string

The standard home page for a user
Type:
  • string
Since:
  • 1.0.39
Default Value:
  • "/dashboard"
Source:

widgetsForCreateSiteDialog :object[]

This is the widget model displayed when creating sites.
Type:
  • object[]
Since:
  • 1.0.55
Source:

widgetsForCreateSiteDialogOverrides :object[]

Overrides for the default edit site dialog model See the applyWidgetOverrides for detailed instructions on how to configure overrides to add, remove, replace and update widgets.
Type:
  • object[]
Since:
  • 1.0.97
Default Value:
  • null
Source:

widgetsForEditSiteDialog :object[]

This is the widget model displayed when editing sites.
Type:
  • object[]
Since:
  • 1.0.55
Source:

widgetsForEditSiteDialogOverrides :object[]

Overrides for the default edit site dialog model See the applyWidgetOverrides for detailed instructions on how to configure overrides to add, remove, replace and update widgets.
Type:
  • object[]
Since:
  • 1.0.97
Default Value:
  • null
Source:

Methods

_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:
  • 1.0.58
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:
  • 1.0.58
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:
  • 1.0.55
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:
  • 1.0.87
Source:

initService()

Ensures that default sitePresets are configured if no custom values have been provided.
Since:
  • 1.0.55
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:
  • 1.0.55
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:
  • 1.0.55
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:
  • 1.0.55
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:
  • 1.0.55
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:
  • 1.0.55
Source:
Fires:

onUserSitesFailure(response, originalRequestConfig)

This is the failure callback for getUserSites.
Parameters:
Name Type Description
response object The response from the request
originalRequestConfig object The configuration passed on the original request
Since:
  • 1.0.87
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:
  • 1.0.86
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)

This is the success callback for getUserSites.
Parameters:
Name Type Description
response object The response from the request
originalRequestConfig object The configuration passed on the original request
Since:
  • 1.0.86
Source:

registerSubscriptions()

Sets up the subscriptions for the ReportService
Since:
  • 1.0.32
Source:

registerSubscriptions()

Sets up the subscriptions for the SiteService
Since:
  • 1.0.32
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:
  • 1.0.58
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:
  • 1.0.89
Source:

alfresco/services/SiteService

Author:
  • Dave Draper
License:
Source:

Members

additionalSitePresets :object[]

This can be configured to be an array of additional site presets that will be added to the default set (which will just be the "Collaboration Site"). Rather than configuring the sitePresets it may be better to define additional presets. Each element in the array should be an object with "label" and "value" attributes where the value matches a preset configured in Share.
Type:
  • object[]
Since:
  • 1.0.95
Default Value:
  • null
Source:

createSiteDialogHeight :string

In order to get a smoother initial rendering of the create site dialog a fixed height is configured. However when customizing the contents of the create site dialog it may be advisable to set an alternative height (or configure to be null and allow natural sizing to occur).
Type:
  • string
Since:
  • 1.0.99
Default Value:
  • "500px"
Source:

createSiteDialogWidth :string

In order to get a smoother initial rendering of the create site dialog a fixed width is configured. However when customizing the contents of the create site dialog it may be advisable to set an alternative width (or configure to be null and allow natural sizing to occur).
Type:
  • string
Since:
  • 1.0.99
Default Value:
  • "670px"
Source:

i18nRequirements :Array

An array of the i18n files to use with this widget.
Type:
  • Array
Source:

i18nRequirements :Array

An array of the i18n files to use with this widget.
Type:
  • Array
Source:

legacyMode :boolean

Indicates whether or not the Site Service is running in legacy mode. When configured in this mode the service will attempt to use the YUI2 based dialogs provided by Alfresch Share for creating and editing sites. If this is configured to be false then the DialogService will be used to display dialogs for creating and editing sites.
Type:
  • boolean
Since:
  • 1.0.55
Default Value:
  • true
Source:

setCreateSiteDialogValueTopic :string

This is an optional topic that can be configured to allow the create site dialog to have a value set on it. This can be useful when needing to pre-fill fields based changing data within the form (for example a custom preset). The use case is when a custom field needs to make an XHR request for data to be added (i.e. something not possible through autoSetConfig).
Type:
  • string
Since:
  • 1.0.97
Default Value:
  • null
Source:

setEditSiteDialogValueTopic :string

This is an optional topic that can be configured to allow the edit site dialog to have a value set on it. This can be useful when needing to pre-fill fields based changing data within the form (for example a custom preset). The use case is when a custom field needs to make an XHR request for data to be added (i.e. something not possible through autoSetConfig).
Type:
  • string
Since:
  • 1.0.97
Default Value:
  • null
Source:

siteHomePage :string

The prefix to apply to site locations to complete the URL for site home pages. Prior to version 5.1 of Share this would be "/dashboard" but from Share 5.1 onwards the site home page is configurable so should be configured to be the empty string.
Type:
  • string
Since:
  • 1.0.95
Default Value:
  • "/dashboard"
Source:

sitePresets :object[]

This is an array of site preset options that will be displayed when creating a site (when the service is not configured to be in legacyMode). The default configuration just contains the "Collaboration Site", but this can be overridden here. Any presets must have values that map to presets in the Surf configuration. Note that additionalSitePresets can be used to augment the default list rather than replacing it completely.
Type:
  • object[]
Since:
  • 1.0.55
Source:

sitePresetsToRemove :string[]

This can be configured to be a string array of the site preset values to be removed from both sitePresets and additionalSitePresets. Note that unlike those attributes this is just a string array rather than an object array because only the site preset values (not labels) are matched.
Type:
  • string[]
Since:
  • 1.0.95
Default Value:
  • null
Source:

userHomePage :string

The standard home page for a user
Type:
  • string
Since:
  • 1.0.39
Default Value:
  • "/dashboard"
Source:

widgetsForCreateSiteDialog :object[]

This is the widget model displayed when creating sites.
Type:
  • object[]
Since:
  • 1.0.55
Source:

widgetsForCreateSiteDialogOverrides :object[]

Overrides for the default edit site dialog model See the applyWidgetOverrides for detailed instructions on how to configure overrides to add, remove, replace and update widgets.
Type:
  • object[]
Since:
  • 1.0.97
Default Value:
  • null
Source:

widgetsForEditSiteDialog :object[]

This is the widget model displayed when editing sites.
Type:
  • object[]
Since:
  • 1.0.55
Source:

widgetsForEditSiteDialogOverrides :object[]

Overrides for the default edit site dialog model See the applyWidgetOverrides for detailed instructions on how to configure overrides to add, remove, replace and update widgets.
Type:
  • object[]
Since:
  • 1.0.97
Default Value:
  • null
Source:

Methods

_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:
  • 1.0.58
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:
  • 1.0.58
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:
  • 1.0.55
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:
  • 1.0.87
Source:

initService()

Ensures that default sitePresets are configured if no custom values have been provided.
Since:
  • 1.0.55
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:
  • 1.0.55
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:
  • 1.0.55
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:
  • 1.0.55
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:
  • 1.0.55
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:
  • 1.0.55
Source:
Fires:

onUserSitesFailure(response, originalRequestConfig)

This is the failure callback for getUserSites.
Parameters:
Name Type Description
response object The response from the request
originalRequestConfig object The configuration passed on the original request
Since:
  • 1.0.87
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:
  • 1.0.86
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)

This is the success callback for getUserSites.
Parameters:
Name Type Description
response object The response from the request
originalRequestConfig object The configuration passed on the original request
Since:
  • 1.0.86
Source:

registerSubscriptions()

Sets up the subscriptions for the ReportService
Since:
  • 1.0.32
Source:

registerSubscriptions()

Sets up the subscriptions for the SiteService
Since:
  • 1.0.32
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:
  • 1.0.58
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:
  • 1.0.89
Source: