summaryrefslogtreecommitdiff
path: root/src/main/java/com/c2kernel/lookup/DomainPath.java
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/com/c2kernel/lookup/DomainPath.java')
-rw-r--r--src/main/java/com/c2kernel/lookup/DomainPath.java20
1 files changed, 3 insertions, 17 deletions
diff --git a/src/main/java/com/c2kernel/lookup/DomainPath.java b/src/main/java/com/c2kernel/lookup/DomainPath.java
index 706719e..c8ae751 100644
--- a/src/main/java/com/c2kernel/lookup/DomainPath.java
+++ b/src/main/java/com/c2kernel/lookup/DomainPath.java
@@ -12,7 +12,6 @@ package com.c2kernel.lookup;
import com.c2kernel.common.ObjectNotFoundException;
import com.c2kernel.process.Gateway;
-import com.c2kernel.utils.Logger;
/**
@@ -47,7 +46,7 @@ public class DomainPath extends Path
super(path, Path.UNKNOWN);
}
- public DomainPath(String path, ItemPath entity) throws InvalidItemPathException
+ public DomainPath(String path, ItemPath entity)
{
super(path, Path.UNKNOWN);
setEntity(entity);
@@ -86,13 +85,13 @@ public class DomainPath extends Path
}
@Override
- public ItemPath getEntity() throws ObjectNotFoundException {
+ public ItemPath getItemPath() throws ObjectNotFoundException {
if (mType == UNKNOWN) { // must decide
checkType();
}
if (target == null)
- throw new ObjectNotFoundException("Path is a context", "");
+ throw new ObjectNotFoundException("Path "+toString()+" does not resolve to an Item", "");
return target;
}
@@ -108,7 +107,6 @@ public class DomainPath extends Path
try {
setEntity(Gateway.getLookup().resolvePath(this));
} catch (InvalidItemPathException ex) {
- Logger.error(ex);
mType = CONTEXT;
} catch (ObjectNotFoundException ex) {
mType = CONTEXT;
@@ -123,17 +121,5 @@ public class DomainPath extends Path
public String getName() {
return mPath[mPath.length-1];
}
-
- @Override
- public int getSysKey() {
- if (mType == UNKNOWN) { // must decide
- checkType();
- }
-
- if (mType == ENTITY) {
- return target.getSysKey();
- }
- else return INVALID;
- }
}