001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.util.ldap;
022:
023: import javax.naming.Name;
024: import javax.naming.NamingEnumeration;
025: import javax.naming.NamingException;
026: import javax.naming.OperationNotSupportedException;
027: import javax.naming.directory.Attributes;
028: import javax.naming.directory.DirContext;
029: import javax.naming.directory.ModificationItem;
030: import javax.naming.directory.SearchControls;
031:
032: /**
033: * <a href="DummyDirContext.java.html"><b><i>View Source</i></b></a>
034: *
035: * @author Brian Wing Shun Chan
036: *
037: */
038: public class DummyDirContext extends DummyContext implements DirContext {
039:
040: public void bind(Name name, Object obj, Attributes attrs)
041: throws NamingException {
042:
043: throw new OperationNotSupportedException();
044: }
045:
046: public void bind(String name, Object obj, Attributes attrs)
047: throws NamingException {
048:
049: throw new OperationNotSupportedException();
050: }
051:
052: public DirContext createSubcontext(Name name, Attributes attrs)
053: throws NamingException {
054:
055: throw new OperationNotSupportedException();
056: }
057:
058: public DirContext createSubcontext(String name, Attributes attrs)
059: throws NamingException {
060:
061: throw new OperationNotSupportedException();
062: }
063:
064: public Attributes getAttributes(Name name) throws NamingException {
065: throw new OperationNotSupportedException();
066: }
067:
068: public Attributes getAttributes(String name) throws NamingException {
069: throw new OperationNotSupportedException();
070: }
071:
072: public Attributes getAttributes(Name name, String[] attrIds)
073: throws NamingException {
074:
075: throw new OperationNotSupportedException();
076: }
077:
078: public Attributes getAttributes(String name, String[] attrIds)
079: throws NamingException {
080:
081: throw new OperationNotSupportedException();
082: }
083:
084: public DirContext getSchema(Name name) throws NamingException {
085: throw new OperationNotSupportedException();
086: }
087:
088: public DirContext getSchema(String name) throws NamingException {
089: throw new OperationNotSupportedException();
090: }
091:
092: public DirContext getSchemaClassDefinition(Name name)
093: throws NamingException {
094:
095: throw new OperationNotSupportedException();
096: }
097:
098: public DirContext getSchemaClassDefinition(String name)
099: throws NamingException {
100:
101: throw new OperationNotSupportedException();
102: }
103:
104: public void modifyAttributes(Name name, int modificationOp,
105: Attributes attrs) throws NamingException {
106:
107: throw new OperationNotSupportedException();
108: }
109:
110: public void modifyAttributes(String name, int modificationOp,
111: Attributes attrs) throws NamingException {
112:
113: throw new OperationNotSupportedException();
114: }
115:
116: public void modifyAttributes(Name name, ModificationItem[] mods)
117: throws NamingException {
118:
119: throw new OperationNotSupportedException();
120: }
121:
122: public void modifyAttributes(String name, ModificationItem[] mods)
123: throws NamingException {
124:
125: throw new OperationNotSupportedException();
126: }
127:
128: public void rebind(Name name, Object obj, Attributes attrs)
129: throws NamingException {
130:
131: throw new OperationNotSupportedException();
132: }
133:
134: public void rebind(String name, Object obj, Attributes attrs)
135: throws NamingException {
136:
137: throw new OperationNotSupportedException();
138: }
139:
140: public NamingEnumeration search(Name name,
141: Attributes matchingAttributes, String[] attributesToReturn)
142: throws NamingException {
143:
144: throw new OperationNotSupportedException();
145: }
146:
147: public NamingEnumeration search(String name,
148: Attributes matchingAttributes, String[] attributesToReturn)
149: throws NamingException {
150:
151: throw new OperationNotSupportedException();
152: }
153:
154: public NamingEnumeration search(Name name,
155: Attributes matchingAttributes) throws NamingException {
156:
157: throw new OperationNotSupportedException();
158: }
159:
160: public NamingEnumeration search(String name,
161: Attributes matchingAttributes) throws NamingException {
162:
163: throw new OperationNotSupportedException();
164: }
165:
166: public NamingEnumeration search(Name name, String filter,
167: SearchControls cons) throws NamingException {
168:
169: throw new OperationNotSupportedException();
170: }
171:
172: public NamingEnumeration search(String name, String filter,
173: SearchControls cons) throws NamingException {
174:
175: throw new OperationNotSupportedException();
176: }
177:
178: public NamingEnumeration search(Name name, String filterExpr,
179: Object[] filterArgs, SearchControls cons)
180: throws NamingException {
181:
182: throw new OperationNotSupportedException();
183: }
184:
185: public NamingEnumeration search(String name, String filterExpr,
186: Object[] filterArgs, SearchControls cons)
187: throws NamingException {
188:
189: throw new OperationNotSupportedException();
190: }
191:
192: }
|