|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opennms.netmgt.config.ViewFactory
Field Summary | |
protected static java.io.InputStream |
configIn
An input stream for the views configuration file |
private static boolean |
initialized
Boolean indicating if the init() method has been called |
private static ViewFactory |
instance
The static singleton instance of the ViewFactory |
protected static java.util.HashMap |
m_views
A mapping of views ids to the View objects |
private static Header |
oldHeader
|
protected static java.io.File |
usersFile
File path of views.xml |
Constructor Summary | |
(package private) |
ViewFactory()
Initializes the factory |
Method Summary | |
void |
deleteUser(java.lang.String name)
Removes the user from the list of users. |
void |
deleteView(java.lang.String name)
When this method is called view is to be deleted. |
java.lang.String |
getCategoryComments(java.lang.String viewName,
java.lang.String categoryName)
|
static ViewFactory |
getInstance()
Singleton static call to get the only instance that should exist for the ViewFactory |
View |
getView(java.lang.String name)
Return a Map of usernames to user instances. |
java.util.Map |
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(java.lang.String oldName,
java.lang.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(java.lang.String oldName,
java.lang.String newName)
When this method is called views name is changed. |
void |
saveView(java.lang.String name,
View details)
Adds a new user and overwrites the "users.xml" |
void |
saveViews(Views views)
|
private java.lang.String |
stripWhiteSpace(java.lang.String comment)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static ViewFactory instance
protected static java.io.File usersFile
protected static java.io.InputStream configIn
protected static java.util.HashMap m_views
private static boolean initialized
private static Header oldHeader
Constructor Detail |
ViewFactory()
Method Detail |
public static void init() throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public static ViewFactory getInstance()
public static void reload() throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public void saveView(java.lang.String name, View details) throws java.lang.Exception
java.lang.Exception
public void deleteUser(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void renameUser(java.lang.String oldName, java.lang.String newName) throws java.lang.Exception
java.lang.Exception
public void renameView(java.lang.String oldName, java.lang.String newName) throws java.lang.Exception
java.lang.Exception
public void deleteView(java.lang.String name) throws java.lang.Exception
java.lang.Exception
public void saveViews(Views views) throws java.io.IOException, org.exolab.castor.xml.MarshalException, org.exolab.castor.xml.ValidationException
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException
public java.lang.String getCategoryComments(java.lang.String viewName, java.lang.String categoryName)
private java.lang.String stripWhiteSpace(java.lang.String comment)
public View getView(java.lang.String name)
Map
of usernames to user instances.
public java.util.Map getViews()
Map
of usernames to user instances.
|
OpenNMS API 1.2.3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |