Creating a custom repository
Use a repository API to create a custom repository 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.
- Open your application.
- Create a child class of Embed-Repository-Type for your repository
type:
- 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
webwb
directory. - Create a field value for the new repository type in the
Data-Repository class for the pyType
field.Use S3 configuration as an example. For more information, see Adding an S3 repository.
- Update the Code-Pega-List.pyRepoTypes data transform with the repository details, such as icon and name.
- Upload an icon that represents your custom repository type to the
- 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 Using repository APIs in your application.
Previous topic Adding an on-premises file system (legacy) Next topic Using repository APIs in your application