summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/DomainPath.java
diff options
context:
space:
mode:
authorogattaz <olivier@gattaz.com>2014-06-05 16:51:07 +0200
committerogattaz <olivier@gattaz.com>2014-06-05 16:51:07 +0200
commit2fd193d7936084de91eae46e8c2763914d87ab71 (patch)
treeb136ed97e535f11d4b3433d16c26570c89430ce4 /src/main/java/com/c2kernel/lookup/DomainPath.java
parent1225792532f77e6e8f4a9addfc0c0a6cf56e89b8 (diff)
parente73468fd08cc27aa31f76a27c916e45d5987c628 (diff)
Merge branch 'master' of ssh://dev.cccs.uwe.ac.uk:22/var/git/cristal-kernel
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/DomainPath.java')
-rw-r--r--src/main/java/com/c2kernel/lookup/DomainPath.java31
1 files changed, 6 insertions, 25 deletions
diff --git a/src/main/java/com/c2kernel/lookup/DomainPath.java b/src/main/java/com/c2kernel/lookup/DomainPath.java
index ce849ce..706719e 100644
--- a/src/main/java/com/c2kernel/lookup/DomainPath.java
+++ b/src/main/java/com/c2kernel/lookup/DomainPath.java
@@ -13,8 +13,6 @@ package com.c2kernel.lookup;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.process.Gateway;
import com.c2kernel.utils.Logger;
-import com.novell.ldap.LDAPAttribute;
-import com.novell.ldap.LDAPAttributeSet;
/**
@@ -23,7 +21,7 @@ import com.novell.ldap.LDAPAttributeSet;
**/
public class DomainPath extends Path
{
- private EntityPath target = null;
+ private ItemPath target = null;
protected static String mTypeRoot;
/* Very simple extension to Path. Only copies constructors and defines root */
@@ -49,7 +47,7 @@ public class DomainPath extends Path
super(path, Path.UNKNOWN);
}
- public DomainPath(String path, EntityPath entity) throws InvalidEntityPathException
+ public DomainPath(String path, ItemPath entity) throws InvalidItemPathException
{
super(path, Path.UNKNOWN);
setEntity(entity);
@@ -76,7 +74,7 @@ public class DomainPath extends Path
return new DomainPath(parentPath);
}
- public void setEntity(EntityPath newTarget) {
+ public void setEntity(ItemPath newTarget) {
if (newTarget == null) { // clear
target = null;
mType = Path.CONTEXT;
@@ -88,7 +86,7 @@ public class DomainPath extends Path
}
@Override
- public EntityPath getEntity() throws ObjectNotFoundException {
+ public ItemPath getEntity() throws ObjectNotFoundException {
if (mType == UNKNOWN) { // must decide
checkType();
}
@@ -108,8 +106,8 @@ public class DomainPath extends Path
public void checkType() {
try {
- setEntity(Gateway.getLDAPLookup().resolvePath(this));
- } catch (InvalidEntityPathException ex) {
+ setEntity(Gateway.getLookup().resolvePath(this));
+ } catch (InvalidItemPathException ex) {
Logger.error(ex);
mType = CONTEXT;
} catch (ObjectNotFoundException ex) {
@@ -137,22 +135,5 @@ public class DomainPath extends Path
}
else return INVALID;
}
-
- @Override
- public LDAPAttributeSet createAttributeSet() {
- LDAPAttributeSet attrs = new LDAPAttributeSet();
- attrs.add(new LDAPAttribute("cn",getName()));
- if (getType() == ENTITY) {
- String objectclass_values[] = { "alias", "aliasObject" };
- attrs.add(new LDAPAttribute("objectclass",objectclass_values));
- attrs.add(new LDAPAttribute("aliasedObjectName",target.getFullDN()));
- }
-
- else
- {
- attrs.add(new LDAPAttribute("objectclass","cristalcontext"));
- }
- return attrs;
- }
}