summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/ldap/LDAPClientReader.java
blob: 1d41ed720e097fd2f955f325368d5cc34e6ede7b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
package com.c2kernel.lookup.ldap;

import com.c2kernel.entity.C2KLocalObject;
import com.c2kernel.lookup.ItemPath;
import com.c2kernel.persistency.ClusterStorageException;

/** Allows clients to directly load properties and collections from the LDAP
*   so no CORBA calls need to be made during normal browsing
*/

public class LDAPClientReader extends LDAPClusterStorage {
     // return all readwrite support as readonly
     @Override
	public short queryClusterSupport(String clusterType) {
        return (short)(super.queryClusterSupport(clusterType) & READ);
     }


	/**
	 * @see com.c2kernel.persistency.ClusterStorage#delete(Integer, String)
	 */
	@Override
	public void delete(ItemPath itemPath, String path)
		throws ClusterStorageException {
		throw new ClusterStorageException("Writing not supported in ClientReader");
	}

	/**
	 * @see com.c2kernel.persistency.ClusterStorage#getName()
	 */
	@Override
	public String getName() {
		return "LDAP Client Cluster Reader";
	}

	/**
	 * @see com.c2kernel.persistency.ClusterStorage#put(Integer, String, C2KLocalObject)
	 */

	public void put(ItemPath itemPath, String path, C2KLocalObject obj)
		throws ClusterStorageException {
		throw new ClusterStorageException("Writing not supported in ClientReader");
	}

}