|
|||||||||
| 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
| 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)
|
void |
deleteUser(String name)
Removes the user from the list of groups. |
List<Group> |
findGroupsForUser(String user)
|
Group |
getGroup(String name)
Get a group using its name |
List<String> |
getGroupNames()
|
Map<String,Group> |
getGroups()
Get the groups |
Role |
getRole(String roleName)
|
String[] |
getRoleNames()
|
Collection<Role> |
getRoles()
|
OwnedIntervalSequence |
getRoleScheduleEntries(String roleid,
Date start,
Date end)
|
List<Schedule> |
getSchedulesForRoleAt(String roleId,
Date time)
|
List<Schedule> |
getUserSchedulesForRole(String userId,
String roleId)
|
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)
|
protected void |
parseXml(Reader reader)
|
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()
|
void |
saveRole(Role role)
|
protected abstract void |
saveXml(String data)
|
void |
setGroups(Map<String,Group> grp)
Set the groups data |
protected abstract void |
update()
|
boolean |
userHasRole(String userId,
String roleid)
|
| 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 |
|---|
protected void parseXml(Reader reader)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
reader -
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic void setGroups(Map<String,Group> grp)
public Map<String,Group> getGroups()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
protected abstract void update()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.ValidationException
org.exolab.castor.xml.MarshalException
IOException
public boolean hasGroup(String groupName)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public List<String> getGroupNames()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
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
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public void saveGroups()
throws Exception
Exception
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
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
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
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
protected abstract void saveXml(String data)
throws IOException
data -
IOException
public void saveGroup(String name,
Group details)
throws Exception
Exception
public void saveRole(Role role)
throws Exception
Exception
public void deleteUser(String name)
throws Exception
Exception
public void deleteGroup(String name)
throws Exception
Exception
public void deleteRole(String name)
throws Exception
Exception
public void renameGroup(String oldName,
String newName)
throws Exception
Exception
public void renameUser(String oldName,
String newName)
throws Exception
Exceptionpublic String[] getRoleNames()
public Collection<Role> getRoles()
public Role getRole(String roleName)
public boolean userHasRole(String userId,
String roleid)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
public List<Schedule> getSchedulesForRoleAt(String roleId,
Date time)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
public List<Schedule> getUserSchedulesForRole(String userId,
String roleId)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
public boolean isUserScheduledForRole(String userId,
String roleId,
Date time)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOException
public OwnedIntervalSequence getRoleScheduleEntries(String roleid,
Date start,
Date end)
throws org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException,
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
IOExceptionpublic List<Group> findGroupsForUser(String user)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||