WebUser (Hyperic HQ Plugin API)
Keywords: org.hyperic.hq.ui.WebUser class

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hyperic.hq.ui
Class WebUser

    java.lang.Object
      org.hyperic.hq.ui.WebUser

    public class WebUser

extends java.lang.Object

A representation of the person currently interacting with the application.

Field Summary
`static java.lang.String` | `PREF_FAV_RESOURCE_METRICS_PREFIX`
`static java.lang.String` | `PREF_LIST_DELIM`
`static java.lang.String` | `PREF_METRIC_RANGE`
`static java.lang.String` | `PREF_METRIC_RANGE_LASTN`
`static java.lang.String` | `PREF_METRIC_RANGE_RO`
`static java.lang.String` | `PREF_METRIC_RANGE_UNIT`
`static java.lang.String` | `PREF_METRIC_THRESHOLD`

Constructor Summary
`WebUser()`
`WebUser(AuthzSubject subject, java.lang.Integer sessionId, ConfigResponse preferences, boolean hasPrincipal)`
`WebUser(AuthzSubjectValue subject)`
`WebUser(AuthzSubjectValue subject, java.lang.Integer sessionId, ConfigResponse preferences, boolean hasPrincipal)`

Method Summary
`boolean` | `getActive()`
`java.lang.String` | `getAuthDsn()`
`boolean` | `getBooleanPref(java.lang.String key, boolean ifNull)` Get the value of a preference as a boolean.
`java.lang.String` | `getDepartment()`
`java.lang.String` | `getEmailAddress()`
`java.lang.String` | `getFirstName()`
`boolean` | `getHasPrincipal()`
`java.lang.Integer` | `getId()`
`int` | `getIntPref(java.lang.String key, int ifNull)` Get the value of a preference as an int.
`java.lang.String` | `getLastName()`
`java.util.Map` | `getMetricRangePreference()`
`java.util.Map` | `getMetricRangePreference(boolean defaultRange)` Returns a Map of pref values: `MonitorUtils.RO`: Boolean `MonitorUtils.LASTN`: Integer `MonitorUtils.UNIT`: Unit `MonitorUtils.BEGIN`: Long `MonitorUtils.END`: Long
`java.lang.Integer` | `getMetricThresholdPreference()` Returns a list of metric ids saved as favorites for a particular appdef type
`java.lang.String` | `getName()`
`java.lang.String` | `getPhoneNumber()`
`java.lang.String` | `getPreference(java.lang.String key)`
`java.lang.String` | `getPreference(java.lang.String key, java.lang.String def)`
`java.util.List` | `getPreferenceAsList(java.lang.String key)` Break the named preference into tokens delimited by `PREF_LIST_DELIM`.
`java.util.List` | `getPreferenceAsList(java.lang.String key, java.lang.String delimiter)` Break the named preference
`ConfigResponse` | `getPreferences()`
`java.lang.String` | `getResourceFavoriteMetricsKey(java.lang.String appdefTypeName)` Method getResourceFavoriteMetricsKey.
`java.util.List` | `getResourceFavoriteMetricsPreference(java.lang.String appdefTypeName)` Returns a list of metric ids saved as favorites for a particular appdef type
`java.lang.Integer` | `getSessionId()` Return the BizApp session id as an Integer for this web user
`java.lang.String` | `getSmsaddress()`
`AuthzSubjectValue` | `getSubject()` Return the AuthzSubjectValue represented by this web user.
`java.lang.String` | `getUsername()`
`boolean` | `isHtmlEmail()`
`void` | `setActive(boolean active)`
`void` | `setAuthDsn(java.lang.String phoneNumber)`
`void` | `setDepartment(java.lang.String department)`
`void` | `setEmailAddress(java.lang.String emailAddress)`
`void` | `setFirstName(java.lang.String name)`
`void` | `setHasPrincipal(boolean hasPrincipal)`
`void` | `setHtmlEmail(boolean htmlEmail)`
`void` | `setLastName(java.lang.String name)`
`void` | `setPhoneNumber(java.lang.String phoneNumber)`
`void` | `setPreference(java.lang.String key, java.util.List values)`
`void` | `setPreference(java.lang.String key, java.util.List values, java.lang.String delim)`
`void` | `setPreference(java.lang.String key, java.lang.Object value)`
`void` | `setPreferences(ConfigResponse preferences)`
`void` | `setSessionId(java.lang.Integer sessionId)` Set the BizApp session id as an Integer for this web user
`void` | `setSmsaddress(java.lang.String s)`
`void` | `setUsername(java.lang.String username)`
`java.lang.String` | `toString()` Return a human readable serialization of this object
`void` | `unsetPreference(java.lang.String key)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### PREF_FAV_RESOURCE_METRICS_PREFIX

    public static final java.lang.String PREF_FAV_RESOURCE_METRICS_PREFIX

See Also:
  Constant Field Values

### PREF_METRIC_RANGE

    public static final java.lang.String PREF_METRIC_RANGE

See Also:
  Constant Field Values

### PREF_METRIC_RANGE_LASTN

    public static final java.lang.String PREF_METRIC_RANGE_LASTN

See Also:
  Constant Field Values

### PREF_METRIC_RANGE_UNIT

    public static final java.lang.String PREF_METRIC_RANGE_UNIT

See Also:
  Constant Field Values

### PREF_METRIC_RANGE_RO

    public static final java.lang.String PREF_METRIC_RANGE_RO

See Also:
  Constant Field Values

### PREF_METRIC_THRESHOLD

    public static final java.lang.String PREF_METRIC_THRESHOLD

See Also:
  Constant Field Values

### PREF_LIST_DELIM

    public static final java.lang.String PREF_LIST_DELIM

See Also:
  Constant Field Values

Constructor Detail

### WebUser

    public WebUser()

### WebUser

    public WebUser(AuthzSubjectValue subject)

### WebUser

    public WebUser(AuthzSubject subject,
                   java.lang.Integer sessionId,
                   ConfigResponse preferences,
                   boolean hasPrincipal)

### WebUser

    public WebUser(AuthzSubjectValue subject,
                   java.lang.Integer sessionId,
                   ConfigResponse preferences,
                   boolean hasPrincipal)

Method Detail

### getSubject

    public AuthzSubjectValue getSubject()

  Return the AuthzSubjectValue represented by this web user.

### getId

    public java.lang.Integer getId()

### getSessionId

    public java.lang.Integer getSessionId()

  Return the BizApp session id as an Integer for this web user

### setSessionId

    public void setSessionId(java.lang.Integer sessionId)

  Set the BizApp session id as an Integer for this web user

  Parameters:
    `sessionId` - the new session id

### getUsername

    public java.lang.String getUsername()

### setUsername

    public void setUsername(java.lang.String username)

### getName

    public java.lang.String getName()

### getSmsaddress

    public java.lang.String getSmsaddress()

### setSmsaddress

    public void setSmsaddress(java.lang.String s)

### getFirstName

    public java.lang.String getFirstName()

### setFirstName

    public void setFirstName(java.lang.String name)

### getLastName

    public java.lang.String getLastName()

### setLastName

    public void setLastName(java.lang.String name)

### getEmailAddress

    public java.lang.String getEmailAddress()

### setEmailAddress

    public void setEmailAddress(java.lang.String emailAddress)

### isHtmlEmail

    public boolean isHtmlEmail()

### setHtmlEmail

    public void setHtmlEmail(boolean htmlEmail)

### getAuthDsn

    public java.lang.String getAuthDsn()

### setAuthDsn

    public void setAuthDsn(java.lang.String phoneNumber)

### getPhoneNumber

    public java.lang.String getPhoneNumber()

### setPhoneNumber

    public void setPhoneNumber(java.lang.String phoneNumber)

### getDepartment

    public java.lang.String getDepartment()

### setDepartment

    public void setDepartment(java.lang.String department)

### getActive

    public boolean getActive()

### setActive

    public void setActive(boolean active)

### toString

    public java.lang.String toString()

  Return a human readable serialization of this object

  Overrides:
    `toString` in class `java.lang.Object`

### getHasPrincipal

    public boolean getHasPrincipal()

### setHasPrincipal

    public void setHasPrincipal(boolean hasPrincipal)

### getPreferences

    public ConfigResponse getPreferences()

### setPreferences

    public void setPreferences(ConfigResponse preferences)

### getPreference

    public java.lang.String getPreference(java.lang.String key)
                                   throws InvalidOptionException

  Throws:
    `InvalidOptionException`

### getPreference

    public java.lang.String getPreference(java.lang.String key,
                                          java.lang.String def)

### getPreferenceAsList

    public java.util.List getPreferenceAsList(java.lang.String key)
                                       throws InvalidOptionException

  Break the named preference into tokens delimited by `PREF_LIST_DELIM`.

  Parameters:
    `key` - the name of the preference
  Returns:
    `List` of `String` tokens
  Throws:
    `InvalidOptionException`

### getPreferenceAsList

    public java.util.List getPreferenceAsList(java.lang.String key,
                                              java.lang.String delimiter)
                                       throws InvalidOptionException

  Break the named preference

  Parameters:
    `delimiter` - the delimeter to break it up by
    `key` - the name of the preference
  Returns:
    `List` of `String` tokens
  Throws:
    `InvalidOptionException`

### setPreference

    public void setPreference(java.lang.String key,
                              java.util.List values)
                       throws InvalidOptionValueException,
                              InvalidOptionException

  Throws:
    `InvalidOptionValueException`
    `InvalidOptionException`

### setPreference

    public void setPreference(java.lang.String key,
                              java.util.List values,
                              java.lang.String delim)
                       throws InvalidOptionValueException,
                              InvalidOptionException

  Throws:
    `InvalidOptionValueException`
    `InvalidOptionException`

### setPreference

    public void setPreference(java.lang.String key,
                              java.lang.Object value)
                       throws InvalidOptionValueException,
                              InvalidOptionException

  Throws:
    `InvalidOptionValueException`
    `InvalidOptionException`

### unsetPreference

    public void unsetPreference(java.lang.String key)

### getResourceFavoriteMetricsPreference

    public java.util.List getResourceFavoriteMetricsPreference(java.lang.String appdefTypeName)
                                                        throws InvalidOptionException

  Returns a list of metric ids saved as favorites for a particular appdef type

  Throws:
    `InvalidOptionException`

### getResourceFavoriteMetricsKey

    public java.lang.String getResourceFavoriteMetricsKey(java.lang.String appdefTypeName)

  Method getResourceFavoriteMetricsKey. Encapsulates the logic for how the favorite metrics key for a particular appdef type is calculated

  Parameters:
    `appdefTypeName` - i.e. application, platform, server, service
  Returns:
    String the calculated preferences key

### getMetricRangePreference

    public java.util.Map getMetricRangePreference(boolean defaultRange)
                                           throws InvalidOptionException

  Returns a Map of pref values:
  - `MonitorUtils.RO`: Boolean
  - `MonitorUtils.LASTN`: Integer
  - `MonitorUtils.UNIT`: Unit
  - `MonitorUtils.BEGIN`: Long
  - `MonitorUtils.END`: Long

  Throws:
    `InvalidOptionException`

### getMetricRangePreference

    public java.util.Map getMetricRangePreference()
                                           throws InvalidOptionException

  Throws:
    `InvalidOptionException`

### getMetricThresholdPreference

    public java.lang.Integer getMetricThresholdPreference()
                                                   throws InvalidOptionException

  Returns a list of metric ids saved as favorites for a particular appdef type

  Throws:
    `InvalidOptionException`

### getBooleanPref

    public boolean getBooleanPref(java.lang.String key,
                                  boolean ifNull)

  Get the value of a preference as a boolean.

  Parameters:
    `key` - the preference to get
    `ifNull` - if the pref is undefined, return this value instead
  Returns:
    the boolean value of 'key', or if key is null, returns the 'ifNull' value.

### getIntPref

    public int getIntPref(java.lang.String key,
                          int ifNull)

  Get the value of a preference as an int.

  Parameters:
    `key` - the preference to get
    `ifNull` - if the pref is null, return this value instead
  Returns:
    the int value of 'key', or if key is null, returns the 'ifNull' value.

Overview | Package | Class | Tree | Deprecated | Index | Help
| Hyperic HQ Plugin API v. 4.4.0.2
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

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