001: /*
002: * The contents of this file are subject to the Sapient Public License
003: * Version 1.0 (the "License"); you may not use this file except in compliance
004: * with the License. You may obtain a copy of the License at
005: * http://carbon.sf.net/License.html.
006: *
007: * Software distributed under the License is distributed on an "AS IS" basis,
008: * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
009: * the specific language governing rights and limitations under the License.
010: *
011: * The Original Code is The Carbon Component Framework.
012: *
013: * The Initial Developer of the Original Code is Sapient Corporation
014: *
015: * Copyright (C) 2003 Sapient Corporation. All Rights Reserved.
016: */
017:
018: package org.sape.carbon.services.config.jndi;
019:
020: import org.sape.carbon.core.config.node.link.LinkNodeConfiguration;
021:
022: import org.sape.carbon.services.jndi.InitialContextFactory;
023:
024: /**
025: * <p>This configuration interface defines properties to that describe how to
026: * connect to a JNDI directory that contains a configuration hierachy.
027: * In the basic case, only InitialContextFactory, ProviderUrl, and
028: * InitialContextName need to be specified. If anonymous access to the
029: * directory is not allowed, SecurityPrincipal and SecurityCredentials must
030: * also be specified. If other JNDI environment properties are required based
031: * on the specific JNDI provider, they can be listed in the Map
032: * EnvironmentProperties.</p>
033: *
034: * <p>For advanced control of the names of JNDI attributes and the meaning
035: * of the values used by the JNDI config service, the values of
036: * NodeTypeAttributeName, FolderNodeTypeAttributeValue,
037: * DocumentNodeTypeAttributeValue, DocumentTypeAttributeName,
038: * LinkDocumentTypeAttributeValue, DocumentDocumentTypeAttributeValue,
039: * DocumentContectAttributeName, NodeNameAttributeName, and
040: * AttributeNameValueSeparator.</p>
041: *
042: * Copyright 2003 Sapient
043: * @since carbon 2.0
044: * @author Douglas Voet, March 2003
045: * @version $Revision: 1.7 $($Author: dvoet $ / $Date: 2003/10/30 19:29:58 $)
046: */
047: public interface JNDILinkNodeConfiguration extends
048: LinkNodeConfiguration {
049:
050: InitialContextFactory getInitialContextFactory();
051:
052: void setInitialContextFactory(InitialContextFactory factory);
053:
054: /**
055: * Gets the name of the context that is the target of the link. This
056: * can not be null or empty. An example for an LDAP directory would be
057: * "name=configRoot,dc=sapient,dc=com".
058: *
059: * @return String
060: */
061: String getTargetContextName();
062:
063: /**
064: * Sets the name of the context that is the target of the link. This
065: * can not be null or empty. An example for an LDAP directory would be
066: * "name=configRoot,dc=sapient,dc=com".
067: *
068: * @param name
069: */
070: void setTargetContextName(String name);
071:
072: /** Default value for the NodeTypeAttributeName property */
073: String NodeTypeAttributeName = "objectClass";
074:
075: /**
076: * Gets the name of the attribute that determines if a context is a
077: * Folder or a ConfigurationDocument.
078: * @return String
079: */
080: String getNodeTypeAttributeName();
081:
082: /**
083: * Sets NodeTypeAttributeName.
084: * @see #getNodeTypeAttributeName
085: * @param name
086: */
087: void setNodeTypeAttributeName(String name);
088:
089: /** Default value for the FolderNodeTypeAttributeValue property */
090: String FolderNodeTypeAttributeValue = "configFolder";
091:
092: /**
093: * Gets the value of the attribute named by NodeTypeAttributeName
094: * that denotes that a context represents a Folder.
095: * @return String
096: */
097: String getFolderNodeTypeAttributeValue();
098:
099: /**
100: * Sets FolderNodeTypeAttributeValue.
101: * @see #getFolderNodeTypeAttributeValue
102: * @param value
103: */
104: void setFolderNodeTypeAttributeValue(String value);
105:
106: /** Default value for the DocumentNodeTypeAttributeValue property */
107: String DocumentNodeTypeAttributeValue = "configDocument";
108:
109: /**
110: * Gets the value of the attribute named by NodeTypeAttributeName
111: * that denotes that a context represents a ConfigurationDocument.
112: * @return String
113: */
114: String getDocumentNodeTypeAttributeValue();
115:
116: /**
117: * Sets DocumentNodeTypeAttributeValue.
118: * @see #getDocumentNodeTypeAttributeValue
119: * @param value
120: */
121: void setDocumentNodeTypeAttributeValue(String value);
122:
123: /** Default value for the DocumentTypeAttributeName property */
124: String DocumentTypeAttributeName = "type";
125:
126: /**
127: * Gets the name of the attribute that determines if a document context is a
128: * link or a document.
129: * @return String
130: */
131: String getDocumentTypeAttributeName();
132:
133: /**
134: * Sets DocumentTypeAttributeName.
135: * @see #setDocumentTypeAttributeName
136: * @param name
137: */
138: void setDocumentTypeAttributeName(String name);
139:
140: /** Default value for the LinkDocumentTypeAttributeValue property */
141: String LinkDocumentTypeAttributeValue = "link";
142:
143: /**
144: * Gets the value of the attribute named by DocumentTypeAttributeName
145: * that denotes that a context represents a link.
146: * @return String
147: */
148: String getLinkDocumentTypeAttributeValue();
149:
150: /**
151: * Sets LinkDocumentTypeAttributeValue.
152: * @see #setLinkDocumentTypeAttributeValue
153: * @param value
154: */
155: void setLinkDocumentTypeAttributeValue(String value);
156:
157: /** Default value for the DocumentDocumentTypeAttributeValue property */
158: String DocumentDocumentTypeAttributeValue = "doc";
159:
160: /**
161: * Gets the value of the attribute named by DocumentTypeAttributeName
162: * that denotes that a context represents a document.
163: * @return String
164: */
165: String getDocumentDocumentTypeAttributeValue();
166:
167: /**
168: * Sets DocumentDocumentTypeAttributeValue.
169: * @see #setDocumentDocumentTypeAttributeValue
170: * @param value
171: */
172: void setDocumentDocumentTypeAttributeValue(String value);
173:
174: /** Default value for the DocumentContectAttributeName property */
175: String DocumentContectAttributeName = "content";
176:
177: /**
178: * Gets the name of the attribute that holds a document's content.
179: * @return String
180: */
181: String getDocumentContectAttributeName();
182:
183: /**
184: * Sets DocumentContectAttributeName.
185: * @see #setDocumentContectAttributeName
186: * @param name
187: */
188: void setDocumentContectAttributeName(String name);
189:
190: /** Default value for the NodeNameAttributeName property */
191: String NodeNameAttributeName = "name";
192:
193: /**
194: * Gets the name of the attribute that holds the name of the context.
195: * @return String
196: */
197: String getNodeNameAttributeName();
198:
199: /**
200: * Sets NodeNameAttributeName.
201: * @see #setNodeNameAttributeName
202: * @param name
203: */
204: void setNodeNameAttributeName(String name);
205:
206: /** Default value for the AttributeNameValueSeparator property */
207: String AttributeNameValueSeparator = "=";
208:
209: /**
210: * Gets the String that the directory uses to separate attributes
211: * and their values when they are represented as Strings
212: * @return
213: */
214: String getAttributeNameValueSeparator();
215:
216: /**
217: * Gets AttributeNameValueSeparator.
218: * @see #getAttributeNameValueSeparator
219: * @param separator
220: */
221: void setAttributeNameValueSeparator(String separator);
222: }
|