Module: alfresco/services/DataListService

alfresco/services/DataListService

Since:
  • 1.0.85
Author:
  • Dave Draper
License:
Source:

Members

defaultDataNameMappings :object

Type:
  • object
Default Value:
  • {"dl:attachments": {name: "alfresco/lists/AlfList", config: {style: {overflow: "hidden"}, waitForPageWidgets: false, noDataMessage: " ", widgets: [{name: "alfresco/lists/views/AlfListView", config: {widgets: [{name: "alfresco/lists/views/layouts/Row", config: {widgets: [{name: "alfresco/lists/views/layouts/Cell", config: {width: "50px", widgets: [{name: "alfresco/renderers/SmallThumbnail", config: {itemKey: "value", assumeRendition: true, showDocumentPreview: true, usePreviewService: true}}]}}, {name: "alfresco/lists/views/layouts/Cell", config: {widgets: [{name: "alfresco/renderers/Property", config: {propertyToRender: "displayValue"}}]}}]}}]}}]}}, "cm:attachments": {name: "alfresco/lists/AlfList", config: {style: {overflow: "hidden"}, waitForPageWidgets: false, noDataMessage: " ", widgets: [{name: "alfresco/lists/views/AlfListView", config: {widgets: [{name: "alfresco/lists/views/layouts/Row", config: {widgets: [{name: "alfresco/lists/views/layouts/Cell", config: {width: "50px", widgets: [{name: "alfresco/renderers/SmallThumbnail", config: {itemKey: "value", assumeRendition: true, showDocumentPreview: true, usePreviewService: true}}]}}, {name: "alfresco/lists/views/layouts/Cell", config: {widgets: [{name: "alfresco/renderers/Property", config: {propertyToRender: "displayValue"}}]}}]}}]}}]}}, "dl:issueAssignedTo": {name: "alfresco/lists/AlfList", config: {style: {overflow: "hidden"}, waitForPageWidgets: false, noDataMessage: " ", widgets: [{name: "alfresco/lists/views/AlfListView", config: {widgets: [{name: "alfresco/lists/views/layouts/Row", config: {widgets: [{name: "alfresco/lists/views/layouts/Cell", config: {width: "40px", widgets: [{name: "alfresco/renderers/AvatarThumbnail", config: {userNameProperty: "metadata", dimensions: {w: "32px", h: "32px", margins: "5px"}}}]}}, {name: "alfresco/lists/views/layouts/Cell", config: {widgets: [{name: "alfresco/renderers/Property", config: {propertyToRender: "displayValue"}}]}}]}}]}}]}}}
Source:

defaultDataTypeMappings :object

Type:
  • object
Default Value:
  • {"datetime": {name: "alfresco/renderers/Date", config: {simple: true}}, "date": {name: "alfresco/renderers/Date", config: {simple: true}}}
Source:

i18nRequirements :object[]

An array of the i18n files to use with this service.
Type:
  • object[]
Default Value:
  • [{i18nFile: "./i18n/DataListService.properties"}]
Source:

Methods

getDataListItems(payload)

Handles requests to retrieve Data Lists for the supplied site.
Parameters:
Name Type Description
payload object The payload containing the details of the Data List to retreive items for
Since:
  • 1.0.86
Source:

getDataLists(payload)

Handles requests to retrieve Data Lists for the supplied site.
Parameters:
Name Type Description
payload object The payload containing the details of the site to retrieve the Data Lists for
Source:

getDataListWidgets()

Handles requests to retrieve a model for displaying the requests Data List. In order to render the Data List it is necessary to request the columns details for it. This function makes and XHR request to retrieve this data which is then handled by onColumnsRetrieved.
Source:

onColumnsFailed(response, originalRequestConfig)

This is the failure callback for requesting the column data for a DataList. It publishes a request to display a notification prompt to inform the user of the failure.
Parameters:
Name Type Description
response object The response from the request
originalRequestConfig object The configuration passed on the original request
Source:
Fires:

onColumnsRetrieved(response, originalRequestConfig)

This is the successful callback handler for getDataListWidgets. Using the data provided it builds a model for rendering the DataList and then publishes. Currently the model structure is fixed, but in the future will be made configurable.
Parameters:
Name Type Description
response object The response from the request
originalRequestConfig object The configuration passed on the original request
Source:

onDeleteDataListConfirmation(payload)

Handles the confrmation of a request to delete a Data List.
Parameters:
Name Type Description
payload object The payload containing the NodeRef of the Data List to delete
Source:

onDeleteDataListFailure(response, originalRequestConfig)

Handles failed attempts to delete a Data List
Parameters:
Name Type Description
response object The response from the original XHR request.
originalRequestConfig object The configuration passed to the original XHR request.
Source:

onDeleteDataListItemsConfirmation(payload)

Handles the confrmation of a request to delete a Data List.
Parameters:
Name Type Description
payload object The payload containing the NodeRef of the Data List to delete
Source:

onDeleteDataListItemsRequest(payload)

Handles requests to delete items from a Data List. Generates a confirmation prompt to the user.
Parameters:
Name Type Description
payload object The payload containing the NodeRefs of the items to delete
Since:
  • 1.0.86
Source:
Fires:

onDeleteDataListRequest(payload)

Handles requests to delete a Data List. Generates a confirmation prompt to the user.
Parameters:
Name Type Description
payload object The payload containing the NodeRef of the Data List to delete
Source:
Fires:

onDeleteDataListSuccess(response, originalRequestConfig)

Parameters:
Name Type Description
response object The response from the original XHR request.
originalRequestConfig object The configuration passed to the original XHR request.
Source:
Fires:

registerSubscriptions()

Sets up the subscriptions for the LoginService
Source:
Listens to Events:

updateDataList(payload)

Handles requests to update the title and description of a Data List
Parameters:
Name Type Description
payload object The details of the Data List to update.
Source:

updateDataListFailure(response, originalRequestConfig)

This handles failed requests to update a Data List
Parameters:
Name Type Description
response object The response from the request
originalRequestConfig object The configuration passed on the original request
Source:

updateDataListSuccess(response, originalRequestConfig)

This handles successfully completed requests to update a Data List
Parameters:
Name Type Description
response object The response from the request
originalRequestConfig object The configuration passed on the original request
Source:
Fires: