summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/Lookup.java
blob: 026ad19999d484bbf1a3c87f7355280a31835f62 (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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
package com.c2kernel.lookup;

import java.security.NoSuchAlgorithmException;
import java.util.Iterator;

import com.c2kernel.common.ObjectAlreadyExistsException;
import com.c2kernel.common.ObjectCannotBeUpdated;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.process.auth.Authenticator;
import com.c2kernel.property.PropertyDescriptionList;

public interface Lookup {
	
	public void initializeDirectory() throws ObjectNotFoundException;
	
	public void open(Authenticator user);

	public void close();

	// Path resolution
	
	public Class<?> getItemClass(Path path) throws ObjectNotFoundException;

	public ItemPath resolvePath(DomainPath domainPath) throws InvalidItemPathException, ObjectNotFoundException;	

	public org.omg.CORBA.Object resolve(Path path) throws ObjectNotFoundException;

	// Path management
	
	public void add(Path newPath) throws ObjectCannotBeUpdated, ObjectAlreadyExistsException;

	public void delete(Path path) throws ObjectCannotBeUpdated;

	// Path finding and searching
	
	public boolean exists(Path path);
	
	public Iterator<Path> getChildren(Path path);

	public Iterator<Path> search(Path path, String name);

	public Iterator<Path> search(Path start, String propname, String propvalue);
	
	public Iterator<Path> search(Path start, PropertyDescriptionList props);
	
	public Iterator<Path> searchEntities(Path path);
	
	public Iterator<Path> searchAliases(DomainPath start);

	public Iterator<Path> searchAliases(ItemPath itemPath);
	
	// Role and agent management
	
	public AgentPath getAgentPath(String agentName) throws ObjectNotFoundException;

	public RolePath getRolePath(String roleName) throws ObjectNotFoundException;
	
	public RolePath createRole(String role, boolean b) throws ObjectAlreadyExistsException, ObjectCannotBeUpdated;

	public void addRole(AgentPath agent, RolePath rolePath) throws ObjectCannotBeUpdated, ObjectNotFoundException;

	public AgentPath[] getAgents(RolePath rolePath) throws ObjectNotFoundException;

	public RolePath[] getRoles(AgentPath agentPath);

	public boolean hasRole(AgentPath agentPath, RolePath role);

	public void removeRole(AgentPath agent, RolePath role) throws ObjectCannotBeUpdated, ObjectNotFoundException;

	public String getAgentName(AgentPath agentPath) throws ObjectNotFoundException;
	
	public void setAgentPassword(AgentPath agent, String newPassword) throws ObjectNotFoundException, ObjectCannotBeUpdated, NoSuchAlgorithmException;
	
	public void setHasJobList(RolePath role, boolean hasJobList) throws ObjectNotFoundException, ObjectCannotBeUpdated;


}