| | |
| | | * information: "Portions Copyright [year] [name of copyright owner]". |
| | | * |
| | | * Copyright 2007-2009 Sun Microsystems, Inc. |
| | | * Portions Copyright 2014-2015 ForgeRock AS. |
| | | * Portions Copyright 2014-2016 ForgeRock AS. |
| | | */ |
| | | |
| | | package org.forgerock.opendj.config.client.ldap; |
| | |
| | | */ |
| | | final class LDAPManagedObject<T extends ConfigurationClient> extends AbstractManagedObject<T> { |
| | | |
| | | /** |
| | | * A visitor which is used to encode property LDAP values. |
| | | */ |
| | | /** A visitor which is used to encode property LDAP values. */ |
| | | private static final class ValueEncoder extends PropertyValueVisitor<Object, Void> { |
| | | |
| | | /** Prevent instantiation. */ |
| | |
| | | // No implementation required. |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public <C extends ConfigurationClient, S extends Configuration> Object visitAggregation( |
| | | AggregationPropertyDefinition<C, S> pd, String v, Void p) { |
| | |
| | | return reference.toDN().toString(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public <P> Object visitUnknown(PropertyDefinition<P> propertyDef, P value, Void p) { |
| | | return propertyDef.encodeValue(value); |
| | |
| | | this.driver = driver; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected void addNewManagedObject() throws LdapException, OperationRejectedException, |
| | | ConcurrentModificationException, ManagedObjectAlreadyExistsException { |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected Driver getDriver() { |
| | | return driver; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected void modifyExistingManagedObject() throws ConcurrentModificationException, OperationRejectedException, |
| | | LdapException { |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | protected <M extends ConfigurationClient> ManagedObject<M> newInstance(ManagedObjectDefinition<M, ?> d, |
| | | ManagedObjectPath<M, ?> path, PropertySet properties, boolean existsOnServer, |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean isModified() { |
| | | ManagedObjectDefinition<?, ?> d = getManagedObjectDefinition(); |
| | | for (PropertyDefinition<?> pd : d.getAllPropertyDefinitions()) { |