|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opennms.netmgt.config.GroupManager
public abstract class GroupManager
Abstract GroupManager class.
| Field Summary | |
|---|---|
protected static HashMap<String,List<DutySchedule>> |
m_dutySchedules
The duty schedules for each group |
| Constructor Summary | |
|---|---|
GroupManager()
|
|
| Method Summary | |
|---|---|
void |
deleteGroup(String name)
Removes the group from the list of groups. |
void |
deleteRole(String name)
deleteRole |
void |
deleteUser(String name)
Removes the user from the list of groups. |
List<Group> |
findGroupsForUser(String user)
findGroupsForUser |
Group |
getGroup(String name)
Get a group using its name |
List<String> |
getGroupNames()
getGroupNames |
Map<String,Group> |
getGroups()
Get the groups |
Role |
getRole(String roleName)
getRole |
String[] |
getRoleNames()
getRoleNames |
Collection<Role> |
getRoles()
getRoles |
OwnedIntervalSequence |
getRoleScheduleEntries(String roleid,
Date start,
Date end)
getRoleScheduleEntries |
List<Schedule> |
getSchedulesForRoleAt(String roleId,
Date time)
getSchedulesForRoleAt |
List<Schedule> |
getUserSchedulesForRole(String userId,
String roleId)
getUserSchedulesForRole |
long |
groupNextOnDuty(String group,
Calendar time)
Determines when a group is next on duty. |
boolean |
hasGroup(String groupName)
Returns a boolean indicating if the group name appears in the xml file |
boolean |
isGroupOnDuty(String group,
Calendar time)
Determines if a group is on duty at a given time. |
boolean |
isUserScheduledForRole(String userId,
String roleId,
Date time)
isUserScheduledForRole |
protected void |
parseXml(InputStream stream)
parseXml |
protected void |
parseXml(Reader reader)
Deprecated. |
void |
renameGroup(String oldName,
String newName)
Renames the group from the list of groups. |
void |
renameUser(String oldName,
String newName)
When this method is called group name is changed, so also is the group name belonging to the view. |
void |
saveGroup(String name,
Group details)
Adds a new user and overwrites the "groups.xml" |
void |
saveGroups()
saveGroups |
void |
saveRole(Role role)
saveRole |
protected abstract void |
saveXml(String data)
saveXml |
void |
setGroups(Map<String,Group> grp)
Set the groups data |
abstract void |
update()
update |
boolean |
userHasRole(String userId,
String roleid)
userHasRole |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static HashMap<String,List<DutySchedule>> m_dutySchedules
| Constructor Detail |
|---|
public GroupManager()
| Method Detail |
|---|
@Deprecated
protected void parseXml(Reader reader)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
parseXml
reader - a Reader object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
protected void parseXml(InputStream stream)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
parseXml
stream - a InputStream object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.public void setGroups(Map<String,Group> grp)
grp - a Map object.
public Map<String,Group> getGroups()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
Map object.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
public abstract void update()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
update
org.exolab.castor.xml.ValidationException - if any.
org.exolab.castor.xml.MarshalException - if any.
IOException - if any.
public boolean hasGroup(String groupName)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
groupName - a String object.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
public List<String> getGroupNames()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
getGroupNames
List object.
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
public Group getGroup(String name)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
name - the name of the group to return
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
public void saveGroups()
throws Exception
saveGroups
Exception - if any.
public boolean isGroupOnDuty(String group,
Calendar time)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
group - the group whose duty schedule we wanttime - the time to check for a duty schedule
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
public long groupNextOnDuty(String group,
Calendar time)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
group - the group whose duty schedule we wanttime - the time to check for a duty schedule
IOException - if any.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
protected abstract void saveXml(String data)
throws IOException
saveXml
data - a String object.
IOException - if any.
public void saveGroup(String name,
Group details)
throws Exception
name - a String object.details - a Group object.
Exception - if any.
public void saveRole(Role role)
throws Exception
saveRole
role - a Role object.
Exception - if any.
public void deleteUser(String name)
throws Exception
name - a String object.
Exception - if any.
public void deleteGroup(String name)
throws Exception
name - a String object.
Exception - if any.
public void deleteRole(String name)
throws Exception
deleteRole
name - a String object.
Exception - if any.
public void renameGroup(String oldName,
String newName)
throws Exception
oldName - a String object.newName - a String object.
Exception - if any.
public void renameUser(String oldName,
String newName)
throws Exception
oldName - a String object.newName - a String object.
Exception - if any.public String[] getRoleNames()
getRoleNames
String objects.public Collection<Role> getRoles()
getRoles
Collection object.public Role getRole(String roleName)
getRole
roleName - a String object.
Role object.
public boolean userHasRole(String userId,
String roleid)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
userHasRole
userId - a String object.roleid - a String object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.
public List<Schedule> getSchedulesForRoleAt(String roleId,
Date time)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
getSchedulesForRoleAt
roleId - a String object.time - a Date object.
List object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.
public List<Schedule> getUserSchedulesForRole(String userId,
String roleId)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
getUserSchedulesForRole
userId - a String object.roleId - a String object.
List object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.
public boolean isUserScheduledForRole(String userId,
String roleId,
Date time)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
isUserScheduledForRole
userId - a String object.roleId - a String object.time - a Date object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.
public OwnedIntervalSequence getRoleScheduleEntries(String roleid,
Date start,
Date end)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
getRoleScheduleEntries
roleid - a String object.start - a Date object.end - a Date object.
OwnedIntervalSequence object.
org.exolab.castor.xml.MarshalException - if any.
org.exolab.castor.xml.ValidationException - if any.
IOException - if any.public List<Group> findGroupsForUser(String user)
findGroupsForUser
user - a String object.
List object.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||