AnsweredAssumed Answered

Dell Boomi Custom Connector: Using Object Definition Role

Question asked by yogesh.prasad102787 on Aug 30, 2018
Latest reply on Sep 5, 2018 by kbarlow@boomi.com

Hi Team,

 

We need to know how to use the ObjectDefnitionRoles in the getObjectDefintions method of Browser class.

We have debugged the code and the roles object will have OUTPUT value for GET operation and INPUT,OUTPUT values. We have attached the following code snippet:

 

@Override
public ObjectDefinitions getObjectDefinitions(String objectTypeId, Collection<ObjectDefinitionRole> roles) {
try {
ObjectDefinitions definitions = new ObjectDefinitions();
OperationType operationType = getContext().getOperationType();
switch (operationType) {
case GET:
if (objectTypeId.equalsIgnoreCase("Download")) {
definitions = download(definitions);
} else if (objectTypeId.equalsIgnoreCase("Search")) {
definitions = search(definitions);
}
break;

case CREATE:
if (objectTypeId.equalsIgnoreCase("Upload")) {
definitions = upload(definitions);
break;

}
default:
throw new ConnectorException("Operation unsupported");
}
return definitions;
} catch (Exception e) {
throw new ConnectorException(e);
}

}

 

Could you please provide the details on how to use this roles object inside this method.

 

Thanks,

Yogesh Prasad

Outcomes