Hyperic HQ Plugin API v. 4.4.0.2

org.hyperic.hq.ui.util
Class DashboardUtils

java.lang.Object
  extended by org.hyperic.hq.ui.util.DashboardUtils

public class DashboardUtils
extends java.lang.Object

Utilities class that provides general convenience methods.


Field Summary
static org.apache.commons.logging.Log log
           
static char MULTI_PORTLET_TOKEN
           
 
Constructor Summary
DashboardUtils()
           
 
Method Summary
static boolean addEntityToPreferences(java.lang.String key, ConfigResponse userConfig, AppdefEntityID newId, int max)
           
static void addEntityToPreferences(java.lang.String key, WebUser user, AppdefEntityID newId, int max)
           
static DashboardConfig findDashboard(java.util.ArrayList dashboardList, java.lang.Integer id)
           
static DashboardConfig findDashboard(java.lang.Integer id, WebUser user, org.hyperic.hq.bizapp.shared.AuthzBoss boss)
          Find a given dashboard by its id
static DashboardConfig findDefaultDashboardConfig(WebUser user, org.hyperic.hq.bizapp.shared.AuthzBoss boss)
          Find the user's default dashboard
static java.util.List findEditableDashboardConfigs(WebUser user, org.hyperic.hq.bizapp.shared.AuthzBoss boss)
          Find the user's default dashboard
static java.util.List findEditableDashboards(WebUser user, org.hyperic.hq.bizapp.shared.AuthzBoss boss)
           
static ConfigResponse findUserDashboardConfig(WebUser user, org.hyperic.hq.bizapp.shared.AuthzBoss boss)
          Find the user's dashboard
static java.util.List listAsEntityIds(java.util.List list)
           
static java.util.List listAsResources(java.util.List list, javax.servlet.ServletContext ctx, WebUser user)
           
static java.util.List preferencesAsEntityIds(java.lang.String key, ConfigResponse userConfig)
           
static java.util.List preferencesAsEntityIds(java.lang.String key, WebUser user)
           
static java.util.List preferencesAsResources(java.lang.String key, javax.servlet.ServletContext ctx, WebUser user)
           
static java.util.List preferencesAsResources(java.lang.String key, javax.servlet.ServletContext ctx, WebUser user, ConfigResponse config)
           
static void removePortlet(ConfigResponse config, java.lang.String portlet)
           
static void removePortlet(WebUser user, java.lang.String portlet)
           
static void removeResources(java.lang.String[] ids, java.lang.String key, ConfigResponse userConfg)
           
static void removeResources(java.lang.String[] ids, java.lang.String key, WebUser user)
           
static void verifyResources(java.lang.String key, javax.servlet.ServletContext ctx, ConfigResponse config, WebUser user)
           
static void verifyResources(java.lang.String key, javax.servlet.ServletContext ctx, WebUser user)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MULTI_PORTLET_TOKEN

public static final char MULTI_PORTLET_TOKEN
See Also:
Constant Field Values

log

public static final org.apache.commons.logging.Log log
Constructor Detail

DashboardUtils

public DashboardUtils()
Method Detail

listAsResources

public static java.util.List listAsResources(java.util.List list,
                                             javax.servlet.ServletContext ctx,
                                             WebUser user)
                                      throws java.lang.Exception
Throws:
java.lang.Exception

listAsEntityIds

public static java.util.List listAsEntityIds(java.util.List list)

preferencesAsResources

public static java.util.List preferencesAsResources(java.lang.String key,
                                                    javax.servlet.ServletContext ctx,
                                                    WebUser user)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

preferencesAsResources

public static java.util.List preferencesAsResources(java.lang.String key,
                                                    javax.servlet.ServletContext ctx,
                                                    WebUser user,
                                                    ConfigResponse config)
                                             throws java.lang.Exception
Throws:
java.lang.Exception

preferencesAsEntityIds

public static java.util.List preferencesAsEntityIds(java.lang.String key,
                                                    WebUser user)

preferencesAsEntityIds

public static java.util.List preferencesAsEntityIds(java.lang.String key,
                                                    ConfigResponse userConfig)

removePortlet

public static void removePortlet(WebUser user,
                                 java.lang.String portlet)
                          throws InvalidOptionException,
                                 InvalidOptionValueException
Throws:
InvalidOptionException
InvalidOptionValueException

removePortlet

public static void removePortlet(ConfigResponse config,
                                 java.lang.String portlet)
                          throws InvalidOptionException,
                                 InvalidOptionValueException
Throws:
InvalidOptionException
InvalidOptionValueException

removeResources

public static void removeResources(java.lang.String[] ids,
                                   java.lang.String key,
                                   WebUser user)
                            throws java.lang.Exception
Throws:
java.lang.Exception

removeResources

public static void removeResources(java.lang.String[] ids,
                                   java.lang.String key,
                                   ConfigResponse userConfg)
                            throws java.lang.Exception
Throws:
java.lang.Exception

verifyResources

public static void verifyResources(java.lang.String key,
                                   javax.servlet.ServletContext ctx,
                                   WebUser user)
                            throws java.lang.Exception
Throws:
java.lang.Exception

verifyResources

public static void verifyResources(java.lang.String key,
                                   javax.servlet.ServletContext ctx,
                                   ConfigResponse config,
                                   WebUser user)
                            throws java.lang.Exception
Throws:
java.lang.Exception

addEntityToPreferences

public static void addEntityToPreferences(java.lang.String key,
                                          WebUser user,
                                          AppdefEntityID newId,
                                          int max)
                                   throws java.lang.Exception
Throws:
java.lang.Exception

addEntityToPreferences

public static boolean addEntityToPreferences(java.lang.String key,
                                             ConfigResponse userConfig,
                                             AppdefEntityID newId,
                                             int max)

findDashboard

public static DashboardConfig findDashboard(java.util.ArrayList dashboardList,
                                            java.lang.Integer id)

findDashboard

public static DashboardConfig findDashboard(java.lang.Integer id,
                                            WebUser user,
                                            org.hyperic.hq.bizapp.shared.AuthzBoss boss)
Find a given dashboard by its id

Parameters:
id - the id of the dashboard
user - current user
boss - the authzboss
Returns:
the DashboardConfig of the corresponding DashboardId or null if none

findUserDashboardConfig

public static ConfigResponse findUserDashboardConfig(WebUser user,
                                                     org.hyperic.hq.bizapp.shared.AuthzBoss boss)
                                              throws SessionNotFoundException,
                                                     SessionTimeoutException,
                                                     PermissionException,
                                                     java.rmi.RemoteException
Find the user's dashboard

Throws:
SessionNotFoundException
SessionTimeoutException
PermissionException
java.rmi.RemoteException

findDefaultDashboardConfig

public static DashboardConfig findDefaultDashboardConfig(WebUser user,
                                                         org.hyperic.hq.bizapp.shared.AuthzBoss boss)
Find the user's default dashboard


findEditableDashboardConfigs

public static java.util.List findEditableDashboardConfigs(WebUser user,
                                                          org.hyperic.hq.bizapp.shared.AuthzBoss boss)
                                                   throws SessionNotFoundException,
                                                          SessionTimeoutException,
                                                          PermissionException,
                                                          java.rmi.RemoteException
Find the user's default dashboard

Throws:
SessionNotFoundException
SessionTimeoutException
PermissionException
java.rmi.RemoteException

findEditableDashboards

public static java.util.List findEditableDashboards(WebUser user,
                                                    org.hyperic.hq.bizapp.shared.AuthzBoss boss)
                                             throws SessionNotFoundException,
                                                    SessionTimeoutException,
                                                    PermissionException,
                                                    java.rmi.RemoteException
Throws:
SessionNotFoundException
SessionTimeoutException
PermissionException
java.rmi.RemoteException

Hyperic HQ Plugin API v. 4.4.0.2

Copyright © 2004-2006 Hyperic, Inc. support@hyperic.net, All Rights Reserved.