-
- All Known Implementing Classes:
BasicVacmConfigurator
public interface VacmConfigurator
TheVacmConfigurator
defines an easy to use interface forMutableVACM
configuration. Implementations of this class can provide role/group based VACM security configurations that hide all theVACM
details. Each implementation of this interface defines a role and their security settings.- Since:
- 3.0
- Author:
- Frank Fock
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
VacmConfigurator.VacmConfigResult
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description VacmConfigurator.VacmConfigResult
addUser(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, String role)
Add a new user to a group.String[]
getSupportedRoles()
Returns the list of roles supported by this configurator.VacmConfigurator.VacmConfigResult
removeRole(MutableVACM vacm, String role)
Remover all users from the specified security group and then remove the group itself.VacmConfigurator.VacmConfigResult
removeUser(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, String role)
Remove a new user from the specified group.
-
-
-
Method Detail
-
addUser
VacmConfigurator.VacmConfigResult addUser(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, String role)
Add a new user to a group. If the referenced group does not exist, it will be created. If the role identified by the group is not supported by this configurator, an error is returned.- Parameters:
vacm
- theMutableVACM
to modifysecurityName
- the user name of the new user.role
- the group (VACM)/role name associated with the user. Only supported groups must ber provided. SeegetSupportedRoles()
.- Returns:
- the operation result.
-
removeUser
VacmConfigurator.VacmConfigResult removeUser(MutableVACM vacm, org.snmp4j.smi.OctetString securityName, String role)
Remove a new user from the specified group. If the referenced group does not exist, nothing will be changed andVacmConfigurator.VacmConfigResult.userRemovedFromRole
will be returned. If the role identified by the group is not supported by this configurator, an error is returned.- Parameters:
vacm
- theMutableVACM
to modifysecurityName
- the user name of the new user.role
- the group (VACM)/role name associated with the user. Only supported groups must be provided. SeegetSupportedRoles()
.- Returns:
- the operation result.
-
removeRole
VacmConfigurator.VacmConfigResult removeRole(MutableVACM vacm, String role)
Remover all users from the specified security group and then remove the group itself. This operation will only affect theVACM
provided, but not theUSM
.- Parameters:
vacm
- theMutableVACM
to modifyrole
- the group (VACM)/role to be removed from the abovevacm
.- Returns:
- the operation result.
-
getSupportedRoles
String[] getSupportedRoles()
Returns the list of roles supported by this configurator.- Returns:
- a non-empty array of roles/groups supported by this configurator.
-
-