Package org.opennms.netmgt.config.api
Interface GroupConfig
-
- All Known Implementing Classes:
GroupFactory
,GroupManager
,MockGroupManager
public interface GroupConfig
An interface for GroupManager- Author:
- Ryan Lambeth
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
deleteGroup(String name)
deleteGroupvoid
deleteRole(String name)
deleteRolevoid
deleteUser(String name)
deleteUserList<Group>
findGroupsForUser(String user)
findGroupsForUserGroup
getGroup(String name)
getGroupList<String>
getGroupNames()
getGroupNamesMap<String,Group>
getGroups()
getGroupsOnmsGroup
getOnmsGroup(String groupName)
getOnmsGroupOnmsGroupList
getOnmsGroupList()
getOnmsGroupListRole
getRole(String roleName)
getRoleString[]
getRoleNames()
getRoleNamesCollection<Role>
getRoles()
getRolesOwnedIntervalSequence
getRoleScheduleEntries(String roleid, Date start, Date end)
getRoleScheduleEntriesList<Schedule>
getSchedulesForRoleAt(String roleId, Date time)
getSchedulesForRoleAtList<Schedule>
getUserSchedulesForRole(String userId, String roleId)
getUserSchedulesForRolelong
groupNextOnDuty(String group, Calendar time)
groupNextOnDutyboolean
hasGroup(String groupName)
hasGroupboolean
isGroupOnDuty(String group, Calendar time)
isGroupOnDutyboolean
isUserScheduledForRole(String userId, String roleId, Date time)
isUserScheduledForRolevoid
renameGroup(String oldName, String newName)
renameGroupvoid
renameUser(String oldName, String newName)
renameUservoid
save(OnmsGroup group)
savevoid
saveGroup(String name, Group details)
saveGroupvoid
saveGroups()
saveGroupsvoid
saveRole(Role role)
saveRolevoid
setGroups(Map<String,Group> grp)
setGroupsboolean
userHasRole(String userId, String roleid)
userHasRole
-
-
-
Method Detail
-
getGroups
Map<String,Group> getGroups() throws IOException
getGroups
- Returns:
- a Map
- Throws:
IOException
-
getOnmsGroupList
OnmsGroupList getOnmsGroupList() throws IOException
getOnmsGroupList
- Returns:
- an OnmsGroupList
- Throws:
IOException
-
getOnmsGroup
OnmsGroup getOnmsGroup(String groupName) throws IOException
getOnmsGroup
- Parameters:
a
- String- Returns:
- an OnmsGroup
- Throws:
IOException
-
hasGroup
boolean hasGroup(String groupName) throws IOException
hasGroup
- Parameters:
a
- String- Returns:
- a boolean
- Throws:
IOException
-
getGroupNames
List<String> getGroupNames() throws IOException
getGroupNames
- Returns:
- a List
- Throws:
IOException
-
getGroup
Group getGroup(String name) throws IOException
getGroup
- Parameters:
a
- String- Returns:
- a Group
- Throws:
IOException
-
isGroupOnDuty
boolean isGroupOnDuty(String group, Calendar time) throws IOException
isGroupOnDuty
- Parameters:
a
- Stringa
- Calendar- Returns:
- a boolean
- Throws:
IOException
-
groupNextOnDuty
long groupNextOnDuty(String group, Calendar time) throws IOException
groupNextOnDuty
- Parameters:
a
- Stringa
- Calendar- Returns:
- a long
- Throws:
IOException
-
saveGroup
void saveGroup(String name, Group details) throws Exception
saveGroup
- Parameters:
a
- Stringa
- Group- Throws:
Exception
-
deleteUser
void deleteUser(String name) throws Exception
deleteUser
- Parameters:
a
- String- Throws:
Exception
-
deleteGroup
void deleteGroup(String name) throws Exception
deleteGroup
- Parameters:
a
- String- Throws:
Exception
-
deleteRole
void deleteRole(String name) throws Exception
deleteRole
- Parameters:
a
- String- Throws:
Exception
-
renameGroup
void renameGroup(String oldName, String newName) throws Exception
renameGroup
- Parameters:
a
- Stringa
- String- Throws:
Exception
-
renameUser
void renameUser(String oldName, String newName) throws Exception
renameUser
- Parameters:
a
- Stringa
- String- Throws:
Exception
-
getRoleNames
String[] getRoleNames()
getRoleNames
- Returns:
- a String[]
-
getRoles
Collection<Role> getRoles()
getRoles
- Returns:
- a Collection
-
userHasRole
boolean userHasRole(String userId, String roleid) throws IOException
userHasRole
- Parameters:
a
- Stringa
- String- Returns:
- a boolean
- Throws:
IOException
-
getSchedulesForRoleAt
List<Schedule> getSchedulesForRoleAt(String roleId, Date time) throws IOException
getSchedulesForRoleAt
- Parameters:
a
- Stringa
- String- Returns:
- a List
- Throws:
IOException
-
getUserSchedulesForRole
List<Schedule> getUserSchedulesForRole(String userId, String roleId) throws IOException
getUserSchedulesForRole
- Parameters:
a
- Stringa
- String- Returns:
- a List
- Throws:
IOException
-
isUserScheduledForRole
boolean isUserScheduledForRole(String userId, String roleId, Date time) throws IOException
isUserScheduledForRole
- Parameters:
a
- Stringa
- Stringa
- Date- Returns:
- a boolean
- Throws:
IOException
-
getRoleScheduleEntries
OwnedIntervalSequence getRoleScheduleEntries(String roleid, Date start, Date end) throws IOException
getRoleScheduleEntries
- Parameters:
a
- Stringa
- Datea
- Date- Returns:
- an OwnedIntervalSequence
- Throws:
IOException
-
-