diff options
Diffstat (limited to 'source/com/c2kernel/lookup/RolePath.java')
| -rw-r--r-- | source/com/c2kernel/lookup/RolePath.java | 38 |
1 files changed, 21 insertions, 17 deletions
diff --git a/source/com/c2kernel/lookup/RolePath.java b/source/com/c2kernel/lookup/RolePath.java index 672bdbf..e6593ea 100644 --- a/source/com/c2kernel/lookup/RolePath.java +++ b/source/com/c2kernel/lookup/RolePath.java @@ -33,10 +33,10 @@ public class RolePath extends DomainPath */
private boolean hasJobList = false;
-
+
public RolePath(String roleName) {
super(new DomainPath("agent"), roleName);
- }
+ }
public RolePath(String roleName, boolean jobList) {
this(roleName);
@@ -56,19 +56,21 @@ public class RolePath extends DomainPath this.hasJobList = hasJobList;
}
-
- public void checkType() {
+
+ @Override
+ public void checkType() {
mType = CONTEXT;
}
-
- public Enumeration getChildren() {
+
+ @Override
+ public Enumeration<AgentPath> getChildren() {
AgentPath[] agents = getAgentsWithRole();
Vector<AgentPath> children = new Vector<AgentPath>(agents.length);
for (int i = 0; i < agents.length; i++)
children.add(i, agents[i]);
return children.elements();
}
-
+
public AgentPath[] getAgentsWithRole() {
try {
return Gateway.getLDAPLookup().getRoleManager().getAgents(this);
@@ -77,20 +79,21 @@ public class RolePath extends DomainPath return new AgentPath[0];
}
}
-
+
public void addAgent(AgentPath agent) throws ObjectCannotBeUpdated, ObjectNotFoundException {
Gateway.getLDAPLookup().getRoleManager().addRole(agent, this);
}
-
+
public void removeAgent(AgentPath agent) throws ObjectCannotBeUpdated, ObjectNotFoundException {
Gateway.getLDAPLookup().getRoleManager().removeRole(agent, this);
}
-
- public String dump() {
+
+ @Override
+ public String dump() {
StringBuffer comp = new StringBuffer("Components: { ");
- for (int i=0; i<mPath.length; i++)
- comp.append("'").append(mPath[i]).append("' ");
-
+ for (String element : mPath)
+ comp.append("'").append(element).append("' ");
+
return "Path - dump(): "+
comp.toString()+
"}\n dn="+
@@ -102,9 +105,10 @@ public class RolePath extends DomainPath "\n name="+
getName()+
"\n ";
- }
-
- public LDAPAttributeSet createAttributeSet()
+ }
+
+ @Override
+ public LDAPAttributeSet createAttributeSet()
{
LDAPAttributeSet attrs = new LDAPAttributeSet();
attrs.add(new LDAPAttribute("objectclass","cristalrole"));
|
