|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opennms.netmgt.config.ViewFactory
public class ViewFactory
| Field Summary | |
|---|---|
protected static InputStream |
configIn
An input stream for the views configuration file |
protected static HashMap<String,View> |
m_views
A mapping of views ids to the View objects |
protected static File |
usersFile
File path of views.xml |
| Method Summary | |
|---|---|
void |
deleteUser(String name)
Removes the user from the list of users. |
void |
deleteView(String name)
When this method is called view is to be deleted. |
String |
getCategoryComments(String viewName,
String categoryName)
|
static ViewFactory |
getInstance()
Singleton static call to get the only instance that should exist for the ViewFactory |
View |
getView(String name)
Return a Map of usernames to user instances. |
Map<String,View> |
getViews()
Return a Map of usernames to user instances. |
static void |
init()
|
static void |
reload()
Parses the views.xml via the Castor classes |
void |
renameUser(String oldName,
String newName)
When this method is called users name is changed, so also is the username belonging to the group and the view. |
void |
renameView(String oldName,
String newName)
When this method is called views name is changed. |
void |
saveView(String name,
View details)
Adds a new user and overwrites the "users.xml" |
void |
saveViews(Views views)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static File usersFile
protected static InputStream configIn
protected static HashMap<String,View> m_views
| Method Detail |
|---|
public static void init()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationExceptionpublic static ViewFactory getInstance()
public static void reload()
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public void saveView(String name,
View details)
throws Exception
Exception
public void deleteUser(String name)
throws Exception
Exception
public void renameUser(String oldName,
String newName)
throws Exception
Exception
public void renameView(String oldName,
String newName)
throws Exception
Exception
public void deleteView(String name)
throws Exception
Exception
public void saveViews(Views views)
throws IOException,
org.exolab.castor.xml.MarshalException,
org.exolab.castor.xml.ValidationException
IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public String getCategoryComments(String viewName,
String categoryName)
public View getView(String name)
Map of usernames to user instances.
public Map<String,View> getViews()
Map of usernames to user instances.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||