1   /**
2    * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
3    *
4    * Permission is hereby granted, free of charge, to any person obtaining a copy
5    * of this software and associated documentation files (the "Software"), to deal
6    * in the Software without restriction, including without limitation the rights
7    * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
8    * copies of the Software, and to permit persons to whom the Software is
9    * furnished to do so, subject to the following conditions:
10   *
11   * The above copyright notice and this permission notice shall be included in
12   * all copies or substantial portions of the Software.
13   *
14   * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15   * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16   * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
17   * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
18   * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
19   * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
20   * SOFTWARE.
21   */
22  
23  package com.liferay.util.ldap;
24  
25  import java.util.Hashtable;
26  
27  import javax.naming.Context;
28  import javax.naming.Name;
29  import javax.naming.NameParser;
30  import javax.naming.NamingEnumeration;
31  import javax.naming.NamingException;
32  import javax.naming.OperationNotSupportedException;
33  
34  /**
35   * <a href="DummyContext.java.html"><b><i>View Source</i></b></a>
36   *
37   * @author Brian Wing Shun Chan
38   *
39   */
40  public class DummyContext implements Context {
41  
42      public Object addToEnvironment(String propName, Object propVal)
43          throws NamingException {
44  
45          throw new OperationNotSupportedException();
46      }
47  
48      public void bind(Name name, Object obj) throws NamingException {
49          throw new OperationNotSupportedException();
50      }
51  
52      public void bind(String name, Object obj) throws NamingException {
53          throw new OperationNotSupportedException();
54      }
55  
56      public void close() throws NamingException {
57          throw new OperationNotSupportedException();
58      }
59  
60      public Name composeName(Name name, Name prefix) throws NamingException {
61          throw new OperationNotSupportedException();
62      }
63  
64      public String composeName(String name, String prefix)
65          throws NamingException {
66  
67          throw new OperationNotSupportedException();
68      }
69  
70      public Context createSubcontext(Name name) throws NamingException {
71          throw new OperationNotSupportedException();
72      }
73  
74      public Context createSubcontext(String name) throws NamingException {
75          throw new OperationNotSupportedException();
76      }
77  
78      public void destroySubcontext(Name name) throws NamingException {
79          throw new OperationNotSupportedException();
80      }
81  
82      public void destroySubcontext(String name) throws NamingException {
83          throw new OperationNotSupportedException();
84      }
85  
86      public Hashtable getEnvironment() throws NamingException {
87          throw new OperationNotSupportedException();
88      }
89  
90      public String getNameInNamespace() throws NamingException {
91          throw new OperationNotSupportedException();
92      }
93  
94      public NameParser getNameParser(Name name) throws NamingException {
95          throw new OperationNotSupportedException();
96      }
97  
98      public NameParser getNameParser(String name) throws NamingException {
99          throw new OperationNotSupportedException();
100     }
101 
102     public NamingEnumeration list(Name name) throws NamingException {
103         throw new OperationNotSupportedException();
104     }
105 
106     public NamingEnumeration list(String name) throws NamingException {
107         throw new OperationNotSupportedException();
108     }
109 
110     public NamingEnumeration listBindings(Name name) 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) throws NamingException {
151         throw new OperationNotSupportedException();
152     }
153 
154     public void rename(String oldName, String newName)
155         throws NamingException {
156 
157         throw new OperationNotSupportedException();
158     }
159 
160     public void unbind(Name name) throws NamingException {
161         throw new OperationNotSupportedException();
162     }
163 
164     public void unbind(String name) throws NamingException {
165         throw new OperationNotSupportedException();
166     }
167 
168 }