/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License, Version 1.0 only
* (the "License"). You may not use this file except in compliance
* with the License.
*
* You can obtain a copy of the license at legal-notices/CDDLv1_0.txt
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at legal-notices/CDDLv1_0.txt.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information:
* Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*
*
* Copyright 2008-2009 Sun Microsystems, Inc.
* Portions Copyright 2014-2015 ForgeRock AS
*/
/**
* A managed object composite relationship definition which represents
* a composition of zero or more managed objects.
*
* @param <C>
* The type of client managed object configuration that this
* relation definition refers to.
* @param <S>
* The type of server managed object configuration that this
* relation definition refers to.
*/
public final class InstantiableRelationDefinition
<C extends ConfigurationClient, S extends Configuration>
extends RelationDefinition<C, S> {
/**
* An interface for incrementally constructing instantiable relation
* definitions.
*
* @param <C>
* The type of client managed object configuration that
* this relation definition refers to.
* @param <S>
* The type of server managed object configuration that
* this relation definition refers to.
*/
public static final class Builder
<C extends ConfigurationClient, S extends Configuration>
extends AbstractBuilder<C, S, InstantiableRelationDefinition<C, S>> {
/** The optional naming property definition. */
/** The plural name of the relation. */
/**
* The optional default managed objects associated with this
* instantiable relation definition.
*/
private final Map<String, DefaultManagedObject<? extends C, ? extends S>> defaultManagedObjects = new HashMap<>();
/**
* Creates a new builder which can be used to incrementally build
* an instantiable relation definition.
*
* @param pd
* The parent managed object definition.
* @param name
* The name of the relation.
* @param pluralName
* The plural name of the relation.
* @param cd
* The child managed object definition.
*/
this.pluralName = pluralName;
}
/**
* Adds the named default managed object to this instantiable
* relation definition.
*
* @param name
* The name of the default managed object.
* @param defaultManagedObject
* The default managed object.
*/
DefaultManagedObject<? extends C, ? extends S> defaultManagedObject) {
}
/**
* Sets the naming property for the instantiable relation
* definition.
*
* @param namingPropertyDefinition
* The property of the child managed object definition
* which should be used for naming, or <code>null</code>
* if this relation does not use a property for naming.
*/
public void setNamingProperty(
}
/** {@inheritDoc} */
}
}
/** The optional naming property definition. */
/** The plural name of the relation. */
/**
* The optional default managed objects associated with this
* instantiable relation definition.
*/
/** Private constructor. */
super(common);
this.pluralName = pluralName;
}
/** {@inheritDoc} */
return v.visitInstantiable(this, p);
}
/**
* Gets the named default managed object associated with this
* instantiable relation definition.
*
* @param name
* The name of the default managed object.
* @return Returns the named default managed object.
* @throws IllegalArgumentException
* If there is no default managed object associated with
* the provided name.
*/
throw new IllegalArgumentException(
}
}
/**
* Gets the names of the default managed objects associated with
* this instantiable relation definition.
*
* @return Returns an unmodifiable set containing the names of the
* default managed object.
*/
}
/**
* Get the property of the child managed object definition which
* should be used for naming children.
*
* @return Returns the property of the child managed object
* definition which should be used for naming, or
* <code>null</code> if this relation does not use a
* property for naming.
*/
return namingPropertyDefinition;
}
/**
* Get the plural name of the relation.
*
* @return Returns the plural name of the relation.
*/
return pluralName;
}
/**
* Gets the user friendly plural name of this relation definition in
* the default locale.
*
* @return Returns the user friendly plural name of this relation
* definition in the default locale.
*/
}
/**
* Gets the user friendly plural name of this relation definition in
* the specified locale.
*
* @param locale
* The locale.
* @return Returns the user friendly plural name of this relation
* definition in the specified locale.
*/
}
/** {@inheritDoc} */
}
/** {@inheritDoc} */
dmo.initialize();
}
}
}