diff options
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/DomainPath.java')
| -rw-r--r-- | src/main/java/com/c2kernel/lookup/DomainPath.java | 31 |
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;
- }
}
|
