public static class AuthenticationManager.Department extends RecordPackWrapper
AuthenticationManager.getDepartments()
Modifier and Type | Method and Description |
---|---|
AuthenticationManager.Department |
addSubDepartment(java.lang.String subDepartment)
Add another child department.
|
java.util.Set<java.lang.String> |
getAllNames()
Returns a set of all used department names starting from this department tree node.
|
int |
getID()
Returns the id for this department.
|
java.lang.String |
getName()
Return the name of this department or null if this is the root department.
|
java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> |
getParentHierarchy(java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> result,
java.util.Set<java.lang.Integer> parentIDs)
Returns a map of all department ids pointing to their set of parent department ids.
|
java.util.List<AuthenticationManager.Department> |
getSubDepartments()
Returns the direct children of this department.
|
void |
installNoValue()
Overrides this department to be the
no value department |
void |
installNoValue(java.util.Locale locale)
Overrides this department to be the
no value department |
boolean |
isRoot()
Returns whether this is the placeholder department representing the root node for the department tree.
|
boolean |
isValidName(java.lang.String departmentName)
Returns whether the given name can be used for a new department.
|
void |
removeSubDepartment(AuthenticationManager.Department subDepartment)
Remove the given child department.
|
void |
setName(java.lang.String name)
Rename this department to the given new name.
|
toXMLString
public boolean isRoot()
public java.lang.String getName()
isRoot()
public void setName(java.lang.String name)
name
- new name to use for this departmentpublic int getID()
public java.util.List<AuthenticationManager.Department> getSubDepartments()
public AuthenticationManager.Department addSubDepartment(java.lang.String subDepartment)
subDepartment
- name for the new departmentpublic void removeSubDepartment(AuthenticationManager.Department subDepartment)
subDepartment
- the child to removepublic void installNoValue()
no value
departmentpublic void installNoValue(java.util.Locale locale)
no value
departmentlocale
- locale to use for the virtual non-existent 'No department assigned' departmentpublic java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> getParentHierarchy(java.util.Map<java.lang.Integer,java.util.Set<java.lang.Integer>> result, java.util.Set<java.lang.Integer> parentIDs)
result
- provide null hereparentIDs
- provide null herepublic java.util.Set<java.lang.String> getAllNames()
public boolean isValidName(java.lang.String departmentName)
departmentName
- name to checkwww.canto.com
Canto, the Canto logo, the Cumulus logo, and Cumulus are registered trademarks of Canto GmbH, registered in the U.S. and other countries.