Creating a custom repository type
Use a repository API to create a custom repository type for repository types that are not provided with Pega Platform. For example, you can build a Google Drive custom repository type. Custom repository types appear in the Pega Platform user interface.
Once you create a custom repository type, create one or more connections to it. Custom repositories behave in the same way as the repositories delivered with Pega Platform.
Open your application.
Create a child class of Embed-Repository-Type for your repository type:Do not create a subclass directly under Embed-Repository-Type. This class is reserved for repositories that are implemented by Pega.
- Include the repository name at the end of the new class name. For example, Embed-Repository-Type-Nexus.
- Create the new class as an abstract class.
To add support for the custom repository type to the Data-Repository rule form, override the pyRepoConfiguration section in the new class.
Customize the activities for your class.
Configure the repository type.
Upload an icon that represents your custom repository type to the
Update the Code-Pega-List.pyRepoTypes data transform with the repository details, such as icon and name.
Implement the following repository APIs:
- Create folder API (D_pxNewFolder)
- Create file API (D_pxNewFile)
- Get file API (D_pxGetFile)
- List files API (D_pxListFiles)
- Exists API (pxExists when rule)
- Delete API (D_pxDelete)
- Is Authenticated API (D_pxIsAuthenticated)
For usage information about these APIs, see Repository APIs.