001 /* 002 * CDDL HEADER START 003 * 004 * The contents of this file are subject to the terms of the 005 * Common Development and Distribution License, Version 1.0 only 006 * (the "License"). You may not use this file except in compliance 007 * with the License. 008 * 009 * You can obtain a copy of the license at 010 * trunk/opends/resource/legal-notices/OpenDS.LICENSE 011 * or https://OpenDS.dev.java.net/OpenDS.LICENSE. 012 * See the License for the specific language governing permissions 013 * and limitations under the License. 014 * 015 * When distributing Covered Code, include this CDDL HEADER in each 016 * file and include the License file at 017 * trunk/opends/resource/legal-notices/OpenDS.LICENSE. If applicable, 018 * add the following below this CDDL HEADER, with the fields enclosed 019 * by brackets "[]" replaced with your own identifying information: 020 * Portions Copyright [yyyy] [name of copyright owner] 021 * 022 * CDDL HEADER END 023 * 024 * 025 * Copyright 2008 Sun Microsystems, Inc. 026 */ 027 package org.opends.server.admin; 028 029 030 031 /** 032 * A strategy for serializing managed object paths. 033 * <p> 034 * This interface provides a generic means for serializing managed 035 * object paths into application specific forms. For example, a JNDI 036 * client would use this interface to construct <code>LdapName</code> 037 * objects from a path. Similarly, on the server side, a serialization 038 * strategy is used to construct <code>DN</code> instances from a 039 * path. 040 * <p> 041 * During serialization the serializer is invoked for each element in 042 * the managed object path in big-endian order, starting from the root 043 * and proceeding down to the leaf element. 044 */ 045 public interface ManagedObjectPathSerializer { 046 047 /** 048 * Append a managed object path element identified by an 049 * instantiable relation and an instance name. 050 * 051 * @param <C> 052 * The type of client managed object configuration that 053 * this path element references. 054 * @param <S> 055 * The type of server managed object configuration that 056 * this path element references. 057 * @param r 058 * The instantiable relation. 059 * @param d 060 * The managed object definition. 061 * @param name 062 * The instance name. 063 */ 064 <C extends ConfigurationClient, S extends Configuration> 065 void appendManagedObjectPathElement( 066 InstantiableRelationDefinition<? super C, ? super S> r, 067 AbstractManagedObjectDefinition<C, S> d, String name); 068 069 070 071 /** 072 * Append a managed object path element identified by an optional 073 * relation. 074 * 075 * @param <C> 076 * The type of client managed object configuration that 077 * this path element references. 078 * @param <S> 079 * The type of server managed object configuration that 080 * this path element references. 081 * @param r 082 * The optional relation. 083 * @param d 084 * The managed object definition. 085 */ 086 <C extends ConfigurationClient, S extends Configuration> 087 void appendManagedObjectPathElement( 088 OptionalRelationDefinition<? super C, ? super S> r, 089 AbstractManagedObjectDefinition<C, S> d); 090 091 092 093 /** 094 * Append a managed object path element identified by a singleton 095 * relation. 096 * 097 * @param <C> 098 * The type of client managed object configuration that 099 * this path element references. 100 * @param <S> 101 * The type of server managed object configuration that 102 * this path element references. 103 * @param r 104 * The singleton relation. 105 * @param d 106 * The managed object definition. 107 */ 108 <C extends ConfigurationClient, S extends Configuration> 109 void appendManagedObjectPathElement( 110 SingletonRelationDefinition<? super C, ? super S> r, 111 AbstractManagedObjectDefinition<C, S> d); 112 113 }