Overview

The file connector will have two types of resources.

  • Account

The user accounts in the target system. This will include the permissions associated with the account

  • Entitlement

The list of permissions available in the target system

File Structure Storage

There will be three files to implement the connector.

  1. Account Data  - This file will contain the list of user accounts and metadata associated with the accounts
  2. Entitlements - This file will contain the list of entitlements for the target system
  3. Entitlement Membership - This file will contain the entitlements associated with user accounts

Implementation

The following methods of the target system connector interface defined in the connector SPI needs to be implemented for account and entitlement resource

Create Resource - Account

public String postResource(String resourceName, String resourceInstance) {
    transform the data 
	
}
JAVA


Update Resource

public String patchResource(String resourceName, String resourceInstance, String id){
connect to the target system
retrieve the resource from the target system with the id
update the JSON object retrieved from target system with the JSON object in the resource body - additional attributes must be added and existing attributes must be updated
replace the resource in the target system with the newly created JSON object
Update the resource in the target system with the details in the request body
}
JAVA

Replace Resource

public String putResource(String resourceName, String resourceInstance, String id) {
connect to the target system
replace the resource in the target system with the given id with the object in the request body
}
JAVA

Delete Resource
 

public String deleteResource(String resourceName, String id) {
connect to the target system
delete the resource in the target system with the given id
}
JAVA

Get Resource
 

public String getResourceById(String resourceName, String id) {
connect to the target system
get the resource instance matching the resource name and id
return a JSON object conatining the resource instance
}
JAVA

Search Resource
 

public String searchResource(String resourceName, String filters) {
if the filter parameter is empty
return all the instances of the given resource types are returned
return the list of resource objects matching the filter
}
JAVA

Get Schema
 

public String getSchema() {
return a JSON object with the schema definition
}
JAVA

Questions

  1. Is the schema predefined ? (one file for account, one file for entitlement, one file for entitlement membership) ?
  2. transformation to TS schema can happen in Null Splice/connector SPI ?