1   /**
2    * Copyright (c) 2000-2010 Liferay, Inc. All rights reserved.
3    *
4    * The contents of this file are subject to the terms of the Liferay Enterprise
5    * Subscription License ("License"). You may not use this file except in
6    * compliance with the License. You can obtain a copy of the License by
7    * contacting Liferay, Inc. See the License for the specific language governing
8    * permissions and limitations under the License, including but not limited to
9    * distribution rights of the Software.
10   *
11   *
12   *
13   */
14  
15  package com.liferay.util.ldap;
16  
17  import javax.naming.Name;
18  import javax.naming.NamingEnumeration;
19  import javax.naming.NamingException;
20  import javax.naming.OperationNotSupportedException;
21  import javax.naming.directory.Attributes;
22  import javax.naming.directory.DirContext;
23  import javax.naming.directory.ModificationItem;
24  import javax.naming.directory.SearchControls;
25  import javax.naming.directory.SearchResult;
26  
27  /**
28   * <a href="DummyDirContext.java.html"><b><i>View Source</i></b></a>
29   *
30   * @author Brian Wing Shun Chan
31   */
32  public class DummyDirContext extends DummyContext implements DirContext {
33  
34      public void bind(Name name, Object obj, Attributes attrs)
35          throws NamingException {
36  
37          throw new OperationNotSupportedException();
38      }
39  
40      public void bind(String name, Object obj, Attributes attrs)
41          throws NamingException {
42  
43          throw new OperationNotSupportedException();
44      }
45  
46      public DirContext createSubcontext(Name name, Attributes attrs)
47          throws NamingException {
48  
49          throw new OperationNotSupportedException();
50      }
51  
52      public DirContext createSubcontext(String name, Attributes attrs)
53          throws NamingException {
54  
55          throw new OperationNotSupportedException();
56      }
57  
58      public Attributes getAttributes(Name name) throws NamingException {
59          throw new OperationNotSupportedException();
60      }
61  
62      public Attributes getAttributes(String name) throws NamingException {
63          throw new OperationNotSupportedException();
64      }
65  
66      public Attributes getAttributes(Name name, String[] attrIds)
67          throws NamingException {
68  
69          throw new OperationNotSupportedException();
70      }
71  
72      public Attributes getAttributes(String name, String[] attrIds)
73          throws NamingException {
74  
75          throw new OperationNotSupportedException();
76      }
77  
78      public DirContext getSchema(Name name) throws NamingException {
79          throw new OperationNotSupportedException();
80      }
81  
82      public DirContext getSchema(String name) throws NamingException {
83          throw new OperationNotSupportedException();
84      }
85  
86      public DirContext getSchemaClassDefinition(Name name)
87          throws NamingException {
88  
89          throw new OperationNotSupportedException();
90      }
91  
92      public DirContext getSchemaClassDefinition(String name)
93          throws NamingException {
94  
95          throw new OperationNotSupportedException();
96      }
97  
98      public void modifyAttributes(
99              Name name, int modificationOp, Attributes attrs)
100         throws NamingException {
101 
102         throw new OperationNotSupportedException();
103     }
104 
105     public void modifyAttributes(
106             String name, int modificationOp, Attributes attrs)
107         throws NamingException {
108 
109         throw new OperationNotSupportedException();
110     }
111 
112     public void modifyAttributes(Name name, ModificationItem[] mods)
113         throws NamingException {
114 
115         throw new OperationNotSupportedException();
116     }
117 
118     public void modifyAttributes(String name, ModificationItem[] mods)
119         throws NamingException {
120 
121         throw new OperationNotSupportedException();
122     }
123 
124     public void rebind(Name name, Object obj, Attributes attrs)
125         throws NamingException {
126 
127         throw new OperationNotSupportedException();
128     }
129 
130     public void rebind(String name, Object obj, Attributes attrs)
131         throws NamingException {
132 
133         throw new OperationNotSupportedException();
134     }
135 
136     public NamingEnumeration<SearchResult> search(
137             Name name, Attributes matchingAttributes,
138             String[] attributesToReturn)
139         throws NamingException {
140 
141         throw new OperationNotSupportedException();
142     }
143 
144     public NamingEnumeration<SearchResult> search(
145             String name, Attributes matchingAttributes,
146             String[] attributesToReturn)
147         throws NamingException {
148 
149         throw new OperationNotSupportedException();
150     }
151 
152     public NamingEnumeration<SearchResult> search(
153             Name name, Attributes matchingAttributes)
154         throws NamingException {
155 
156         throw new OperationNotSupportedException();
157     }
158 
159     public NamingEnumeration<SearchResult> search(
160             String name, Attributes matchingAttributes)
161         throws NamingException {
162 
163         throw new OperationNotSupportedException();
164     }
165 
166     public NamingEnumeration<SearchResult> search(
167             Name name, String filter, SearchControls cons)
168         throws NamingException {
169 
170         throw new OperationNotSupportedException();
171     }
172 
173     public NamingEnumeration<SearchResult> search(
174             String name, String filter, SearchControls cons)
175         throws NamingException {
176 
177         throw new OperationNotSupportedException();
178     }
179 
180     public NamingEnumeration<SearchResult> search(
181             Name name, String filterExpr, Object[] filterArgs,
182             SearchControls cons)
183         throws NamingException {
184 
185         throw new OperationNotSupportedException();
186     }
187 
188     public NamingEnumeration<SearchResult> search(
189             String name, String filterExpr, Object[] filterArgs,
190             SearchControls cons)
191         throws NamingException {
192 
193         throw new OperationNotSupportedException();
194     }
195 
196 }