de.captaingoldfish.scim.sdk.server.endpoints.bulkid.BulkIdReferenceArrayWrapper Maven / Gradle / Ivy
// Generated by delombok at Thu Nov 02 20:38:53 CET 2023
package de.captaingoldfish.scim.sdk.server.endpoints.bulkid;
import com.fasterxml.jackson.databind.node.ArrayNode;
import de.captaingoldfish.scim.sdk.common.constants.AttributeNames;
/**
* author Pascal Knueppel
* created at: 25.08.2022 - 18:43
*
*/
public class BulkIdReferenceArrayWrapper implements BulkIdReferenceWrapper
{
private final ArrayNode parentNode;
private final int index;
private final String bulkId;
public BulkIdReferenceArrayWrapper(ArrayNode parentNode, int index)
{
this.parentNode = parentNode;
this.index = index;
this.bulkId = parentNode.get(index).textValue().replace(String.format("%s:", AttributeNames.RFC7643.BULK_ID), "");
}
@Override
public void replaceValueNode(String newValue)
{
parentNode.remove(index);
parentNode.insert(index, newValue);
}
@java.lang.SuppressWarnings("all")
public String getBulkId()
{
return this.bulkId;
}
}