001/*
002 * The contents of this file are subject to the terms of the Common Development and
003 * Distribution License (the License). You may not use this file except in compliance with the
004 * License.
005 *
006 * You can obtain a copy of the License at legal/CDDLv1.0.txt. See the License for the
007 * specific language governing permission and limitations under the License.
008 *
009 * When distributing Covered Software, include this CDDL Header Notice in each file and include
010 * the License file at legal/CDDLv1.0.txt. If applicable, add the following below the CDDL
011 * Header, with the fields enclosed by brackets [] replaced by your own identifying
012 * information: "Portions copyright [year] [name of copyright owner]".
013 *
014 * Copyright 2013 ForgeRock AS.
015 */
016
017package org.forgerock.opendj.rest2ldap;
018
019/**
020 * The policy which should be used in order to read an entry before it is
021 * deleted, or after it is added or modified.
022 */
023public enum ReadOnUpdatePolicy {
024    /**
025     * The LDAP entry will not be read when an update is performed. More
026     * specifically, the REST resource will not be returned as part of a create,
027     * delete, patch, or update request.
028     */
029    DISABLED,
030
031    /**
032     * The LDAP entry will be read atomically using the RFC 4527 read-entry
033     * controls. More specifically, the REST resource will be returned as part
034     * of a create, delete, patch, or update request, and it will reflect the
035     * state of the resource at the time the update was performed. This policy
036     * requires that the LDAP server supports RFC 4527.
037     */
038    CONTROLS,
039
040    /**
041     * The LDAP entry will be read non-atomically using an LDAP search when an
042     * update is performed. More specifically, the REST resource will be
043     * returned as part of a create, delete, patch, or update request, but it
044     * may not reflect the state of the resource at the time the update was
045     * performed.
046     */
047    SEARCH;
048}