protected void fillInAdditionalConnectorRef(PrismObject<ResourceType> resource, String connectorName, String connectorType, OperationResult result)
throws SchemaException {
ResourceType resourceType = resource.asObjectable();
PrismObject<ConnectorType> connectorPrism = findConnectorByType(connectorType, result);
for (ConnectorInstanceSpecificationType additionalConnector: resourceType.getAdditionalConnector()) {
if (connectorName.equals(additionalConnector.getName())) {
ObjectReferenceType ref = new ObjectReferenceType().oid(connectorPrism.getOid());
additionalConnector.setConnectorRef(ref);
}
}
}