| | |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | |
| | | /** |
| | | * Server management connection context. |
| | | */ |
| | | /** Server management connection context. */ |
| | | public final class ServerManagementContext { |
| | | |
| | | /** |
| | |
| | | /** Any exception that occurred whilst retrieving inherited default values. */ |
| | | private PropertyException exception; |
| | | |
| | | /** |
| | | * Optional new configuration entry which does not yet exist in |
| | | * the configuration back-end. |
| | | */ |
| | | /** Optional new configuration entry which does not yet exist in the configuration back-end. */ |
| | | private final Entry newConfigEntry; |
| | | |
| | | /** The path of the managed object containing the next property. */ |
| | |
| | | this.newConfigEntry = newConfigEntry; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Collection<T> visitAbsoluteInherited(AbsoluteInheritedDefaultBehaviorProvider<T> d, Void p) { |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Collection<T> visitAlias(AliasDefaultBehaviorProvider<T> d, Void p) { |
| | | return Collections.emptySet(); |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Collection<T> visitDefined(DefinedDefaultBehaviorProvider<T> d, Void p) { |
| | | Collection<String> stringValues = d.getDefaultValues(); |
| | |
| | | return values; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Collection<T> visitRelativeInherited(RelativeInheritedDefaultBehaviorProvider<T> d, Void p) { |
| | | try { |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public Collection<T> visitUndefined(UndefinedDefaultBehaviorProvider<T> d, Void p) { |
| | | return Collections.emptySet(); |
| | |
| | | this.entry = entry; |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public boolean matches(AbstractManagedObjectDefinition<?, ?> d) { |
| | | String oc = LDAPProfile.getInstance().getObjectClass(d); |
| | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * A visitor which is used to decode property LDAP values. |
| | | */ |
| | | /** A visitor which is used to decode property LDAP values. */ |
| | | private static final class ValueDecoder extends PropertyDefinitionVisitor<Object, String> { |
| | | |
| | | /** |
| | |
| | | // Do nothing. |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public <C extends ConfigurationClient, S extends Configuration> Object visitAggregation( |
| | | AggregationPropertyDefinition<C, S> d, String p) { |
| | |
| | | } |
| | | } |
| | | |
| | | /** {@inheritDoc} */ |
| | | @Override |
| | | public <T> Object visitUnknown(PropertyDefinition<T> d, String p) { |
| | | // By default the property definition's decoder will do. |
| | |
| | | |
| | | private static final Logger debugLogger = LoggerFactory.getLogger(ServerManagementContext.class); |
| | | |
| | | /** |
| | | * The root server managed object, lazily initialized. |
| | | */ |
| | | /** The root server managed object, lazily initialized. */ |
| | | private volatile ServerManagedObject<RootCfg> root; |
| | | |
| | | /** Repository of configuration entries. */ |
| | |
| | | return configRepository; |
| | | } |
| | | |
| | | /** |
| | | * Gets a config entry required for a managed object and throws a |
| | | * config exception on failure. |
| | | */ |
| | | /** Gets a config entry required for a managed object and throws a config exception on failure. */ |
| | | private Entry getManagedObjectConfigEntry(DN dn) throws ConfigException { |
| | | Entry configEntry; |
| | | try { |