diff options
Diffstat (limited to 'source/com/c2kernel/lookup/DomainPath.java')
| -rw-r--r--[-rwxr-xr-x] | source/com/c2kernel/lookup/DomainPath.java | 43 |
1 files changed, 24 insertions, 19 deletions
diff --git a/source/com/c2kernel/lookup/DomainPath.java b/source/com/c2kernel/lookup/DomainPath.java index ad314ee..ce849ce 100755..100644 --- a/source/com/c2kernel/lookup/DomainPath.java +++ b/source/com/c2kernel/lookup/DomainPath.java @@ -30,15 +30,15 @@ public class DomainPath extends Path public DomainPath()
{
- super(Path.UNKNOWN);
+ super(Path.UNKNOWN);
}
public DomainPath(short type)
{
- super();
+ super();
mType = type;
}
-
+
public DomainPath(String[] path)
{
super(path, Path.UNKNOWN);
@@ -54,7 +54,7 @@ public class DomainPath extends Path super(path, Path.UNKNOWN);
setEntity(entity);
}
-
+
public DomainPath(DomainPath parent, String child) {
super(parent, child);
}
@@ -62,47 +62,50 @@ public class DomainPath extends Path /* the root of domain paths is /domain
* clearly
*/
- public String getRoot() {
+ @Override
+ public String getRoot() {
return "domain";
}
-
+
public DomainPath getParent() {
if (mPath.length == 0)
return null;
-
+
String[] parentPath = new String[mPath.length-1];
System.arraycopy(mPath, 0, parentPath, 0, parentPath.length);
return new DomainPath(parentPath);
}
-
+
public void setEntity(EntityPath newTarget) {
if (newTarget == null) { // clear
target = null;
mType = Path.CONTEXT;
return;
}
-
+
target = newTarget;
mType = Path.ENTITY;
}
-
- public EntityPath getEntity() throws ObjectNotFoundException {
+
+ @Override
+ public EntityPath getEntity() throws ObjectNotFoundException {
if (mType == UNKNOWN) { // must decide
checkType();
}
-
+
if (target == null)
throw new ObjectNotFoundException("Path is a context", "");
return target;
}
-
- public short getType() {
+
+ @Override
+ public short getType() {
if (mType == UNKNOWN) { // must decide
checkType();
}
return mType;
}
-
+
public void checkType() {
try {
setEntity(Gateway.getLDAPLookup().resolvePath(this));
@@ -114,7 +117,7 @@ public class DomainPath extends Path }
}
-
+
/**
* Retrieves the domkey of the path
* @return the last path component;
@@ -123,18 +126,20 @@ public class DomainPath extends Path return mPath[mPath.length-1];
}
- public int getSysKey() {
+ @Override
+ public int getSysKey() {
if (mType == UNKNOWN) { // must decide
checkType();
}
-
+
if (mType == ENTITY) {
return target.getSysKey();
}
else return INVALID;
}
- public LDAPAttributeSet createAttributeSet() {
+ @Override
+ public LDAPAttributeSet createAttributeSet() {
LDAPAttributeSet attrs = new LDAPAttributeSet();
attrs.add(new LDAPAttribute("cn",getName()));
if (getType() == ENTITY) {
|
