| | |
| | | */ |
| | | private class Handler extends ClientConstraintHandler { |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isAddAcceptable(ManagementContext context, ManagedObject<?> managedObject, |
| | | Collection<LocalizableMessage> unacceptableReasons) throws LdapException { |
| | |
| | | return allowAdds; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isDeleteAcceptable(ManagementContext context, ManagedObjectPath<?, ?> path, |
| | | Collection<LocalizableMessage> unacceptableReasons) throws LdapException { |
| | |
| | | return allowDeletes; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isModifyAcceptable(ManagementContext context, ManagedObject<?> managedObject, |
| | | Collection<LocalizableMessage> unacceptableReasons) throws LdapException { |
| | |
| | | |
| | | } |
| | | |
| | | // Determines if add operations are allowed. |
| | | /** Determines if add operations are allowed. */ |
| | | private final boolean allowAdds; |
| | | |
| | | // Determines if modify operations are allowed. |
| | | /** Determines if modify operations are allowed. */ |
| | | private final boolean allowModifies; |
| | | |
| | | // Determines if delete operations are allowed. |
| | | /** Determines if delete operations are allowed. */ |
| | | private final boolean allowDeletes; |
| | | |
| | | /** |
| | |
| | | this.allowDeletes = allowDeletes; |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Collection<ClientConstraintHandler> getClientConstraintHandlers() { |
| | | return Collections.<ClientConstraintHandler> singleton(new Handler()); |
| | | } |
| | | |
| | | /** |
| | | * {@inheritDoc} |
| | | */ |
| | | /** {@inheritDoc} */ |
| | | public Collection<ServerConstraintHandler> getServerConstraintHandlers() { |
| | | return Collections.emptySet(); |
| | | } |