| | |
| | | */ |
| | | package org.opends.server.backends.jeb; |
| | | |
| | | import static com.sleepycat.je.LockMode.*; |
| | | import static com.sleepycat.je.OperationStatus.*; |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.backends.jeb.JebFormat.*; |
| | | import static org.opends.server.util.ServerConstants.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | import org.forgerock.i18n.LocalizableMessage; |
| | |
| | | |
| | | import com.sleepycat.je.*; |
| | | |
| | | import static com.sleepycat.je.LockMode.*; |
| | | import static com.sleepycat.je.OperationStatus.*; |
| | | |
| | | import static org.opends.messages.JebMessages.*; |
| | | import static org.opends.server.backends.jeb.JebFormat.*; |
| | | 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 DatabaseException If an error occurs in the JE database. |
| | | */ |
| | | public boolean delete(Transaction txn, DN dn) |
| | | throws DatabaseException |
| | | boolean delete(Transaction txn, DN dn) throws DatabaseException |
| | | { |
| | | byte[] normDN = JebFormat.dnToDNKey(dn, prefixRDNComponents); |
| | | DatabaseEntry key = new DatabaseEntry(normDN); |
| | |
| | | * @return true if the value was deleted, false if not. |
| | | * @throws DatabaseException If an error occurs in the JE database. |
| | | */ |
| | | public boolean delete(Transaction txn, DN dn, String labeledURI) |
| | | throws DatabaseException |
| | | private boolean delete(Transaction txn, DN dn, String labeledURI) throws DatabaseException |
| | | { |
| | | CursorConfig cursorConfig = null; |
| | | byte[] normDN = JebFormat.dnToDNKey(dn, prefixRDNComponents); |
| | |
| | | * @param mods The sequence of modifications made to the entry. |
| | | * @throws DatabaseException If an error occurs in the JE database. |
| | | */ |
| | | public void modifyEntry(Transaction txn, Entry before, Entry after, |
| | | List<Modification> mods) |
| | | void modifyEntry(Transaction txn, Entry before, Entry after, List<Modification> mods) |
| | | throws DatabaseException |
| | | { |
| | | DN entryDN = before.getName(); |
| | |
| | | * @param entry The entry to be deleted. |
| | | * @throws DatabaseException If an error occurs in the JE database. |
| | | */ |
| | | public void deleteEntry(Transaction txn, Entry entry) |
| | | throws DatabaseException |
| | | void deleteEntry(Transaction txn, Entry entry) throws DatabaseException |
| | | { |
| | | 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, |
| | | Set<String> labeledURIs, |
| | | SearchScope searchScope) |
| | | private void throwReferralException(DN targetDN, DN referralDN, Set<String> labeledURIs, SearchScope searchScope) |
| | | throws DirectoryException |
| | | { |
| | | ArrayList<String> URIList = new ArrayList<String>(labeledURIs.size()); |
| | |
| | | * DN. The referral URLs will be set appropriately for the references found |
| | | * in the referral entry. |
| | | */ |
| | | public void targetEntryReferrals(DN targetDN, SearchScope searchScope) |
| | | throws DirectoryException |
| | | void targetEntryReferrals(DN targetDN, SearchScope searchScope) throws DirectoryException |
| | | { |
| | | if (containsReferrals == ConditionResult.UNDEFINED) |
| | | { |
| | |
| | | * has been reached or the search has been abandoned). |
| | | * @throws DirectoryException If a Directory Server error occurs. |
| | | */ |
| | | public boolean returnSearchReferences(SearchOperation searchOp) |
| | | throws DirectoryException |
| | | boolean returnSearchReferences(SearchOperation searchOp) throws DirectoryException |
| | | { |
| | | if (containsReferrals == ConditionResult.UNDEFINED) |
| | | { |