| | |
| | | * CDDL HEADER END |
| | | * |
| | | * |
| | | * Portions Copyright 2006 Sun Microsystems, Inc. |
| | | * Portions Copyright 2006-2007 Sun Microsystems, Inc. |
| | | */ |
| | | package org.opends.server.core; |
| | | |
| | | import static org.opends.server.loggers.Debug.debugConstructor; |
| | | import static org.opends.server.loggers.Debug.debugEnter; |
| | | |
| | | import org.opends.server.api.AccessControlHandler; |
| | | import org.opends.server.api.AccessControlProvider; |
| | | import org.opends.server.config.ConfigEntry; |
| | |
| | | * decision function which grants access to everything and anyone. |
| | | */ |
| | | class DefaultAccessControlProvider implements AccessControlProvider { |
| | | // Fully qualified class name for debugging purposes. |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.core.DefaultAccessControlProvider"; |
| | | |
| | | /** |
| | | * The single handler instance. |
| | |
| | | public DefaultAccessControlProvider() { |
| | | super(); |
| | | |
| | | assert debugConstructor(CLASS_NAME); |
| | | |
| | | // No implementation required. |
| | | } |
| | |
| | | */ |
| | | public void initializeAccessControlHandler(ConfigEntry configEntry) |
| | | throws ConfigException, InitializationException { |
| | | assert debugEnter(CLASS_NAME, "initializeAccessControlHandler"); |
| | | |
| | | // Avoid potential race conditions constructing the handler instance |
| | | // and create it here. |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public void finalizeAccessControlHandler() { |
| | | assert debugEnter(CLASS_NAME, "finalizeAccessControlHandler"); |
| | | |
| | | // No implementation required. |
| | | } |
| | |
| | | * {@inheritDoc} |
| | | */ |
| | | public AccessControlHandler getInstance() { |
| | | assert debugEnter(CLASS_NAME, "getInstance"); |
| | | |
| | | if (instance == null) { |
| | | instance = new Handler(); |
| | |
| | | * control handler. |
| | | */ |
| | | private static class Handler extends AccessControlHandler { |
| | | // Fully qualified class name for debugging purposes. |
| | | private static final String CLASS_NAME = |
| | | "org.opends.server.core.DefaultAccessControlProvider.Handler"; |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | @Override |
| | | public boolean isAllowed(AddOperation addOperation) { |
| | | assert debugEnter(CLASS_NAME, "isAllowed"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAllowed(BindOperation bindOperation) { |
| | | assert debugEnter(CLASS_NAME, "isAllowed"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAllowed(CompareOperation compareOperation) { |
| | | assert debugEnter(CLASS_NAME, "isAllowed"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAllowed(DeleteOperation deleteOperation) { |
| | | assert debugEnter(CLASS_NAME, "isAllowed"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAllowed(ExtendedOperation extendedOperation) { |
| | | assert debugEnter(CLASS_NAME, "isAllowed"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAllowed(ModifyOperation modifyOperation) { |
| | | assert debugEnter(CLASS_NAME, "isAllowed"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAllowed(ModifyDNOperation modifyDNOperation) { |
| | | assert debugEnter(CLASS_NAME, "isAllowed"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | */ |
| | | @Override |
| | | public boolean isAllowed(SearchOperation searchOperation) { |
| | | assert debugEnter(CLASS_NAME, "isAllowed"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | @Override |
| | | public boolean maySend(SearchOperation searchOperation, |
| | | SearchResultEntry searchEntry) { |
| | | assert debugEnter(CLASS_NAME, "maySend"); |
| | | |
| | | return true; |
| | | } |
| | |
| | | @Override |
| | | public SearchResultEntry filterEntry( |
| | | SearchOperation searchOperation, SearchResultEntry searchEntry) { |
| | | assert debugEnter(CLASS_NAME, "filterEntry"); |
| | | |
| | | // No implementation required. |
| | | return searchEntry; |
| | |
| | | @Override |
| | | public boolean maySend(SearchOperation searchOperation, |
| | | SearchResultReference searchReference) { |
| | | assert debugEnter(CLASS_NAME, "maySend"); |
| | | |
| | | return true; |
| | | } |