- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Members
-
i18nRequirements :object[]
-
An array of the i18n files to use with this widget.
Type:
- object[]
- Default Value:
- [{i18nFile: "./i18n/PageService.properties"}]
- Source:
Methods
-
cleanUpTemplateConfig(parameters)
-
Removes unnecessary attributes from a template before it is passed for previewing.
Parameters:
Name Type Description parameters
object - Since:
- 1.0.49
- Source:
-
createPage(payload)
-
Parameters:
Name Type Description payload
object The details of the page to create - Source:
-
exportPageModel(payload)
-
Exports the JSON model in a format that can be used in a WebScript.
Parameters:
Name Type Description payload
object Details of the page to export - Source:
-
generateWsDownload(fileName, content)
-
Parameters:
Name Type Description fileName
string The name of the file to create content
string The file contents to create - Source:
-
getPageDefinitionFromPayload(payload)
-
Extracts the page definition from the supplied payload. If the payload contains a "pageDefinition" attribute then it is expected that the value is "stringified" JSON, but if it is supplied as individual "publishOnReady", "services" and "widgets" attributes then they will need to be combined and stringified.
Parameters:
Name Type Description payload
object The payload from which to retrieve the page definition. - Source:
-
getPages(payload)
-
PLEASE NOTE: This only works with the Horizon3-Repo-AMP REST APIs
Parameters:
Name Type Description payload
object The payload for the page request - Since:
- 1.0.49
- Source:
-
getPagesSuccess(response, originalRequestConfig)
-
Success handler for getPages.
Parameters:
Name Type Description response
object originalRequestConfig
object - Since:
- 1.0.49
- Source:
-
loadPages(The)
-
Makes an XHR request to retrieve the pages that are available. The pages returned are those that have been created and stored in the Data Dictionary on the Alfresco repository.
Parameters:
Name Type Description The
object paylod containing additional data. This can contain a "responseTopic" to publish the options back on. - Source:
-
loadPagesFailure(response, originalRequestConfig)
-
Parameters:
Name Type Description response
object originalRequestConfig
object - Source:
-
loadPagesSuccess(response, originalRequestConfig)
-
This processes the results returned from the XHR request to obtain the available pages that have been defined on the repository. This is necessary because the REST API doesn't return the data in an way that fits with the typical use case (e.g. for providing selectable options in form controls). This function has been written in respect of the onPubSubOptions function.
Parameters:
Name Type Description response
object originalRequestConfig
object - Source:
-
pageCreateFailure(response, originalRequestConfig)
-
Parameters:
Name Type Description response
object originalRequestConfig
object - Source:
-
pageCreateSuccess(response, originalRequestConfig)
-
Parameters:
Name Type Description response
object originalRequestConfig
object - Source:
-
pageUpdateFailure(response, originalRequestConfig)
-
Parameters:
Name Type Description response
object originalRequestConfig
object - Source:
-
pageUpdateSuccess(response, originalRequestConfig)
-
Parameters:
Name Type Description response
object originalRequestConfig
object - Source:
-
processAvailablePageDefResults(pageDefs, def, index)
-
This updates the supplied array of page defintion with the current page definition. This checks that the supplied definition has both "name" and "nodeRef" attributes - the "name" attribute is converted to a "label" attribute and the "nodeRef" attribute is converted to a "value" attribute in order to make the ultimately returned array be compatible with options for form controls. If the definition does not have these attributes then it is not added to the array.
Parameters:
Name Type Description pageDefs
object[] The array of page definitions to add the current definition to def
object The current definition to add to the supplied array index
number The index of the page def in the original results set - Source:
-
registerSubscriptions()
-
Sets up the subscriptions for the PageService
- Since:
- 1.0.32
- Source:
-
updatePage(payload)
-
Parameters:
Name Type Description payload
object The details of the page to update - Source: