| | |
| | | */ |
| | | package org.opends.server.backends.pluggable; |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | |
| | | |
| | | import com.forgerock.opendj.util.Pair; |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | /** |
| | | * This class represents the referral database which contains URIs from referral |
| | | * entries. |
| | |
| | | * @return true if the values were deleted, false if not. |
| | | * @throws StorageRuntimeException If an error occurs in the JE database. |
| | | */ |
| | | public boolean delete(WriteableStorage txn, DN dn) throws StorageRuntimeException |
| | | boolean delete(WriteableStorage txn, DN dn) throws StorageRuntimeException |
| | | { |
| | | ByteString key = toKey(dn); |
| | | |
| | |
| | | * @return true if the value was deleted, false if not. |
| | | * @throws StorageRuntimeException If an error occurs in the JE database. |
| | | */ |
| | | public boolean delete(WriteableStorage txn, DN dn, Collection<String> labeledURIs) |
| | | throws StorageRuntimeException |
| | | boolean delete(WriteableStorage txn, DN dn, Collection<String> labeledURIs) throws StorageRuntimeException |
| | | { |
| | | ByteString key = toKey(dn); |
| | | |
| | |
| | | * Indicates whether the underlying database contains any referrals. |
| | | * |
| | | * @param txn The transaction to use when making the determination. |
| | | * |
| | | * @return {@code true} if it is believed that the underlying database may |
| | | * contain at least one referral, or {@code false} if it is certain |
| | | * that it doesn't. |
| | |
| | | * @param mods The sequence of modifications made to the entry. |
| | | * @throws StorageRuntimeException If an error occurs in the JE database. |
| | | */ |
| | | public void modifyEntry(WriteableStorage txn, Entry before, Entry after, |
| | | List<Modification> mods) |
| | | throws StorageRuntimeException |
| | | void modifyEntry(WriteableStorage txn, Entry before, Entry after, List<Modification> mods) |
| | | throws StorageRuntimeException |
| | | { |
| | | DN entryDN = before.getName(); |
| | | for (Modification mod : mods) |
| | |
| | | * @param entry The entry to be deleted. |
| | | * @throws StorageRuntimeException If an error occurs in the JE database. |
| | | */ |
| | | public void deleteEntry(WriteableStorage txn, Entry entry) |
| | | throws StorageRuntimeException |
| | | void deleteEntry(WriteableStorage txn, Entry entry) throws StorageRuntimeException |
| | | { |
| | | Set<String> labeledURIs = entry.getReferralURLs(); |
| | | if (labeledURIs != null) |
| | |
| | | * DN. The referral URLs will be set appropriately for the references found |
| | | * in the referral entry. |
| | | */ |
| | | public void checkTargetForReferral(Entry entry, SearchScope searchScope) |
| | | throws DirectoryException |
| | | void checkTargetForReferral(Entry entry, SearchScope searchScope) throws DirectoryException |
| | | { |
| | | Set<String> referralURLs = entry.getReferralURLs(); |
| | | if (referralURLs != null) |
| | |
| | | * DN. The referral URLs will be set appropriately for the references found |
| | | * in the referral entry. |
| | | */ |
| | | public void throwReferralException(DN targetDN, DN referralDN, Collection<String> labeledURIs, SearchScope searchScope) |
| | | throws DirectoryException |
| | | void throwReferralException(DN targetDN, DN referralDN, Collection<String> labeledURIs, SearchScope searchScope) |
| | | throws DirectoryException |
| | | { |
| | | ArrayList<String> URIList = new ArrayList<String>(labeledURIs.size()); |
| | | for (String labeledURI : labeledURIs) |
| | |
| | | |
| | | /** |
| | | * Process referral entries that are above the target DN of an operation. |
| | | * @param txn The transaction to use when making the determination. |
| | | * @param targetDN The target DN of the operation, or the base object of a |
| | | * search operation. |
| | | * @param searchScope The scope of the search operation, or null if the |
| | |
| | | * DN. The referral URLs will be set appropriately for the references found |
| | | * in the referral entry. |
| | | */ |
| | | public void targetEntryReferrals(ReadableStorage txn, DN targetDN, SearchScope searchScope) |
| | | throws DirectoryException |
| | | void targetEntryReferrals(ReadableStorage txn, DN targetDN, SearchScope searchScope) throws DirectoryException |
| | | { |
| | | if (containsReferrals == ConditionResult.UNDEFINED) |
| | | { |
| | |
| | | /** |
| | | * Return search result references for a search operation using the referral |
| | | * database to find all referral entries within scope of the search. |
| | | * @param txn The transaction to use when making the determination. |
| | | * @param searchOp The search operation for which search result references |
| | | * should be returned. |
| | | * @return <CODE>true</CODE> if the caller should continue processing the |
| | |
| | | * has been reached or the search has been abandoned). |
| | | * @throws DirectoryException If a Directory Server error occurs. |
| | | */ |
| | | public boolean returnSearchReferences(ReadableStorage txn, SearchOperation searchOp) |
| | | throws DirectoryException |
| | | boolean returnSearchReferences(ReadableStorage txn, SearchOperation searchOp) throws DirectoryException |
| | | { |
| | | if (containsReferrals == ConditionResult.UNDEFINED) |
| | | { |