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 java.util.Hashtable;
024:
025: import javax.naming.Context;
026: import javax.naming.Name;
027: import javax.naming.NameParser;
028: import javax.naming.NamingEnumeration;
029: import javax.naming.NamingException;
030: import javax.naming.OperationNotSupportedException;
031:
032: /**
033: * <a href="DummyContext.java.html"><b><i>View Source</i></b></a>
034: *
035: * @author Brian Wing Shun Chan
036: *
037: */
038: public class DummyContext implements Context {
039:
040: public Object addToEnvironment(String propName, Object propVal)
041: throws NamingException {
042:
043: throw new OperationNotSupportedException();
044: }
045:
046: public void bind(Name name, Object obj) throws NamingException {
047: throw new OperationNotSupportedException();
048: }
049:
050: public void bind(String name, Object obj) throws NamingException {
051: throw new OperationNotSupportedException();
052: }
053:
054: public void close() throws NamingException {
055: throw new OperationNotSupportedException();
056: }
057:
058: public Name composeName(Name name, Name prefix)
059: throws NamingException {
060: throw new OperationNotSupportedException();
061: }
062:
063: public String composeName(String name, String prefix)
064: throws NamingException {
065:
066: throw new OperationNotSupportedException();
067: }
068:
069: public Context createSubcontext(Name name) throws NamingException {
070: throw new OperationNotSupportedException();
071: }
072:
073: public Context createSubcontext(String name) throws NamingException {
074: throw new OperationNotSupportedException();
075: }
076:
077: public void destroySubcontext(Name name) throws NamingException {
078: throw new OperationNotSupportedException();
079: }
080:
081: public void destroySubcontext(String name) throws NamingException {
082: throw new OperationNotSupportedException();
083: }
084:
085: public Hashtable getEnvironment() throws NamingException {
086: throw new OperationNotSupportedException();
087: }
088:
089: public String getNameInNamespace() throws NamingException {
090: throw new OperationNotSupportedException();
091: }
092:
093: public NameParser getNameParser(Name name) throws NamingException {
094: throw new OperationNotSupportedException();
095: }
096:
097: public NameParser getNameParser(String name) throws NamingException {
098: throw new OperationNotSupportedException();
099: }
100:
101: public NamingEnumeration list(Name name) throws NamingException {
102: throw new OperationNotSupportedException();
103: }
104:
105: public NamingEnumeration list(String name) throws NamingException {
106: throw new OperationNotSupportedException();
107: }
108:
109: public NamingEnumeration listBindings(Name name)
110: throws NamingException {
111: throw new OperationNotSupportedException();
112: }
113:
114: public NamingEnumeration listBindings(String name)
115: throws NamingException {
116:
117: throw new OperationNotSupportedException();
118: }
119:
120: public Object lookup(Name name) throws NamingException {
121: throw new OperationNotSupportedException();
122: }
123:
124: public Object lookup(String name) throws NamingException {
125: throw new OperationNotSupportedException();
126: }
127:
128: public Object lookupLink(Name name) throws NamingException {
129: throw new OperationNotSupportedException();
130: }
131:
132: public Object lookupLink(String name) throws NamingException {
133: throw new OperationNotSupportedException();
134: }
135:
136: public void rebind(Name name, Object obj) throws NamingException {
137: throw new OperationNotSupportedException();
138: }
139:
140: public void rebind(String name, Object obj) throws NamingException {
141: throw new OperationNotSupportedException();
142: }
143:
144: public Object removeFromEnvironment(String propName)
145: throws NamingException {
146:
147: throw new OperationNotSupportedException();
148: }
149:
150: public void rename(Name oldName, Name newName)
151: throws NamingException {
152: throw new OperationNotSupportedException();
153: }
154:
155: public void rename(String oldName, String newName)
156: throws NamingException {
157:
158: throw new OperationNotSupportedException();
159: }
160:
161: public void unbind(Name name) throws NamingException {
162: throw new OperationNotSupportedException();
163: }
164:
165: public void unbind(String name) throws NamingException {
166: throw new OperationNotSupportedException();
167: }
168:
169: }
|