|
Jive Forums API (5.5.20.2-oracle) Developer Javadocs | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jivesoftware.base.admin.AdminConsole
public class AdminConsole
A model for admin tab and sidebar info. This class loads in XML definitions of the data and produces an in-memory model.
This class loads its data from the admin-sidebar.xml file which is assumed to be in the main application jar file. In addition, it will load files from META-INF/admin-sidebar.xml if they're found. This allows developers to extend the functionality of the admin console to provide more options. See the main admin-sidebar.xml file for documentation of its format.
Field Summary | |
---|---|
static java.lang.String |
ADMIN_SESSION_AUTHORIZATION
|
Method Summary | |
---|---|
static void |
addModel(java.lang.String name,
org.dom4j.Element element)
Adds an <adminconsole> Element to the tabs/sidebar model. |
static void |
addModel(java.lang.String name,
java.io.InputStream in)
Adds XML stream to the tabs/sidebar model. |
protected static java.lang.String |
findAccessibleURL(org.dom4j.Element tab,
java.lang.String role)
Searches the sidebar items for the first url it has access to view. |
static java.lang.String |
findFirstAccessibleURL(java.lang.String role)
Searches for the first tab that allows it's role and then returns the first page it has access to view. |
static java.lang.String |
getAdminText(java.lang.String string,
java.lang.String pluginName)
Returns a text element for the admin console, applying the appropriate locale. |
static java.lang.String |
getAppName()
Returns the name of the application. |
static org.dom4j.Element |
getElementByID(java.lang.String id)
Convenience method to select an element from the model by its ID. |
static org.dom4j.Element |
getElementByID(java.lang.String product,
java.lang.String id)
Convenience method to select an element from the model by its ID within a specified product. |
static java.lang.String |
getLoginLogoImage()
Returns the URL of the login image for the admin console. |
static java.lang.String |
getLogoImage()
Returns the URL of the main logo image for the admin console. |
static org.dom4j.Element |
getModel()
Returns the model. |
static java.lang.String |
getVersionString()
Returns the version string displayed in the admin console. |
static boolean |
isAllowedEdition(org.dom4j.Element element)
Used to check to see if the element's required product and element information matches the systems product information. |
static boolean |
isAllowedProduct(java.lang.String prod,
org.dom4j.Element element)
Used to check to see if the element's required product matches the passed in product. |
static boolean |
isAllowedRole(java.lang.String role,
org.dom4j.Element element)
Returns true if the specified role is allowed. |
static void |
removeModel(java.lang.String name)
Removes an <adminconsole> Element from the tabs/sidebar model. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String ADMIN_SESSION_AUTHORIZATION
Method Detail |
---|
public static void addModel(java.lang.String name, java.io.InputStream in) throws java.lang.Exception
name
- the name.in
- the XML input stream.
java.lang.Exception
- if an error occurs when parsing the XML or adding it to the model.public static void addModel(java.lang.String name, org.dom4j.Element element) throws java.lang.Exception
name
- the name.element
- the Element
java.lang.Exception
- if an error occurs.public static void removeModel(java.lang.String name)
name
- the name.public static java.lang.String getAppName()
public static java.lang.String getLogoImage()
public static java.lang.String getLoginLogoImage()
public static java.lang.String getVersionString()
public static org.dom4j.Element getModel()
public static org.dom4j.Element getElementByID(java.lang.String id)
id
- the ID.
public static org.dom4j.Element getElementByID(java.lang.String product, java.lang.String id)
product
- the product stringid
- the ID.
public static boolean isAllowedEdition(org.dom4j.Element element)
element
- element to check
public static boolean isAllowedProduct(java.lang.String prod, org.dom4j.Element element)
element
- element to checkprod
- the product string to validate against
public static boolean isAllowedRole(java.lang.String role, org.dom4j.Element element)
role
- the role to check.
public static java.lang.String getAdminText(java.lang.String string, java.lang.String pluginName)
string
- the String.pluginName
- the name of the plugin that the i18n String can be found in,
or null if the standard Wildfire resource bundle should be used.
protected static java.lang.String findAccessibleURL(org.dom4j.Element tab, java.lang.String role)
public static java.lang.String findFirstAccessibleURL(java.lang.String role)
|
Jive Forums Project Page | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |