| | |
| | | import org.forgerock.opendj.config.PropertyException; |
| | | import org.forgerock.opendj.config.SetRelationDefinition; |
| | | import org.forgerock.opendj.config.client.spi.Driver; |
| | | import org.forgerock.opendj.ldap.ErrorResultException; |
| | | import org.forgerock.opendj.ldap.LdapException; |
| | | |
| | | /** |
| | | * Client management connection context. |
| | |
| | | * client-side or server-side constraint which cannot be |
| | | * satisfied (for example, if it is referenced by another |
| | | * managed object). |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject( |
| | | ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd, String name) |
| | | throws ManagedObjectNotFoundException, OperationRejectedException, |
| | | ErrorResultException { |
| | | LdapException { |
| | | return getDriver().deleteManagedObject(parent, rd, name); |
| | | } |
| | | |
| | |
| | | * client-side or server-side constraint which cannot be |
| | | * satisfied (for example, if it is referenced by another |
| | | * managed object). |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject( |
| | | ManagedObjectPath<?, ?> parent, OptionalRelationDefinition<C, S> rd) throws |
| | | ManagedObjectNotFoundException, OperationRejectedException, ErrorResultException { |
| | | ManagedObjectNotFoundException, OperationRejectedException, LdapException { |
| | | return getDriver().deleteManagedObject(parent, rd); |
| | | } |
| | | |
| | |
| | | * client-side or server-side constraint which cannot be |
| | | * satisfied (for example, if it is referenced by another |
| | | * managed object). |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final <C extends ConfigurationClient, S extends Configuration> boolean deleteManagedObject( |
| | | ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd, String name) |
| | | throws ManagedObjectNotFoundException, OperationRejectedException, |
| | | ErrorResultException { |
| | | throws ManagedObjectNotFoundException, OperationRejectedException, LdapException { |
| | | return getDriver().deleteManagedObject(parent, rd, name); |
| | | } |
| | | |
| | |
| | | * @throws ManagedObjectNotFoundException |
| | | * If the requested managed object could not be found on the |
| | | * server. |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | public final <C extends ConfigurationClient, S extends Configuration> ManagedObject<? extends C> getManagedObject( |
| | | ManagedObjectPath<C, S> path) throws DefinitionDecodingException, ManagedObjectDecodingException, |
| | | ManagedObjectNotFoundException, ErrorResultException { |
| | | ManagedObjectNotFoundException, LdapException { |
| | | // Be careful to handle the root configuration. |
| | | if (path.isEmpty()) { |
| | | return (ManagedObject<C>) getRootConfigurationManagedObject(); |
| | |
| | | * @throws ManagedObjectNotFoundException |
| | | * If the requested managed object could not be found on the |
| | | * server. |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final <P> P getPropertyValue(ManagedObjectPath<?, ?> path, PropertyDefinition<P> pd) |
| | | throws DefinitionDecodingException, ErrorResultException, ManagedObjectNotFoundException { |
| | | throws DefinitionDecodingException, LdapException, ManagedObjectNotFoundException { |
| | | Set<P> values = getPropertyValues(path, pd); |
| | | if (values.isEmpty()) { |
| | | return null; |
| | |
| | | * @throws ManagedObjectNotFoundException |
| | | * If the requested managed object could not be found on the |
| | | * server. |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final <P> SortedSet<P> getPropertyValues(ManagedObjectPath<?, ?> path, PropertyDefinition<P> pd) |
| | | throws DefinitionDecodingException, ErrorResultException, ManagedObjectNotFoundException { |
| | | throws DefinitionDecodingException, LdapException, ManagedObjectNotFoundException { |
| | | return getDriver().getPropertyValues(path, pd); |
| | | } |
| | | |
| | |
| | | * managed object's definition. |
| | | * @throws ManagedObjectNotFoundException |
| | | * If the parent managed object could not be found. |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects( |
| | | ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd) throws |
| | | ManagedObjectNotFoundException, ErrorResultException { |
| | | ManagedObjectNotFoundException, LdapException { |
| | | return listManagedObjects(parent, rd, rd.getChildDefinition()); |
| | | } |
| | | |
| | |
| | | * managed object's definition. |
| | | * @throws ManagedObjectNotFoundException |
| | | * If the parent managed object could not be found. |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects( |
| | | ManagedObjectPath<?, ?> parent, InstantiableRelationDefinition<C, S> rd, |
| | | AbstractManagedObjectDefinition<? extends C, ? extends S> d) throws |
| | | ManagedObjectNotFoundException, ErrorResultException { |
| | | ManagedObjectNotFoundException, LdapException { |
| | | return getDriver().listManagedObjects(parent, rd, d); |
| | | } |
| | | |
| | |
| | | * managed object's definition. |
| | | * @throws ManagedObjectNotFoundException |
| | | * If the parent managed object could not be found. |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final <C extends ConfigurationClient, S extends Configuration> String[] listManagedObjects( |
| | | ManagedObjectPath<?, ?> parent, SetRelationDefinition<C, S> rd) throws |
| | | ManagedObjectNotFoundException, ErrorResultException { |
| | | ManagedObjectNotFoundException, LdapException { |
| | | return getDriver().listManagedObjects(parent, rd, rd.getChildDefinition()); |
| | | } |
| | | |
| | |
| | | * <code>false</code> otherwise. |
| | | * @throws ManagedObjectNotFoundException |
| | | * If the parent managed object could not be found. |
| | | * @throws ErrorResultException |
| | | * @throws LdapException |
| | | * If any other error occurs. |
| | | */ |
| | | public final boolean managedObjectExists(ManagedObjectPath<?, ?> path) throws ManagedObjectNotFoundException, |
| | | ErrorResultException { |
| | | LdapException { |
| | | return getDriver().managedObjectExists(path); |
| | | } |
| | | |