org.rhq.enterprise.gui.util
Class EnterpriseFacesContextUtility

java.lang.Object
  extended by org.rhq.enterprise.gui.util.EnterpriseFacesContextUtility

public class EnterpriseFacesContextUtility
extends Object

Author:
Ian Springer

Constructor Summary
EnterpriseFacesContextUtility()
           
 
Method Summary
static org.rhq.core.domain.resource.Resource getResource()
          Returns the Resource associated with the current request.
static org.rhq.core.domain.resource.group.ResourceGroup getResourceGroup()
          Returns the Resource associated with the current request.
static org.rhq.core.domain.resource.Resource getResourceIfExists()
          Returns the Resource associated with the current request or null if the request is not associated with a resource.
static org.rhq.core.domain.resource.ResourceType getResourceType()
          Returns the ResourceType associated with the current request.
static org.rhq.core.domain.resource.ResourceType getResourceTypeIfExists()
          Returns the ResourceType associated with the current request or null if the request is not associated with a ResourceType.
static org.rhq.core.domain.auth.Subject getSubject()
          Returns information on the user that submitted the currently executing request.
static WebUser getWebUser()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnterpriseFacesContextUtility

public EnterpriseFacesContextUtility()
Method Detail

getWebUser

public static WebUser getWebUser()

getSubject

@NotNull
public static org.rhq.core.domain.auth.Subject getSubject()
Returns information on the user that submitted the currently executing request. If none, an exception is thrown.

Returns:
Subject containing the user information

getResource

@NotNull
public static org.rhq.core.domain.resource.Resource getResource()
Returns the Resource associated with the current request. If none, an exception is thrown.

Returns:
resource associated with the request.

getResourceGroup

@NotNull
public static org.rhq.core.domain.resource.group.ResourceGroup getResourceGroup()
Returns the Resource associated with the current request. If none, an exception is thrown.

Returns:
resource associated with the request.

getResourceIfExists

@Nullable
public static org.rhq.core.domain.resource.Resource getResourceIfExists()
Returns the Resource associated with the current request or null if the request is not associated with a resource.

Returns:
resource associated with the request or null if none

getResourceType

@NotNull
public static org.rhq.core.domain.resource.ResourceType getResourceType()
Returns the ResourceType associated with the current request. If none, an exception is thrown.

Returns:
ResourceType associated with the request.

getResourceTypeIfExists

@Nullable
public static org.rhq.core.domain.resource.ResourceType getResourceTypeIfExists()
Returns the ResourceType associated with the current request or null if the request is not associated with a ResourceType.

Returns:
ResourceType associated with the request or null if none


Copyright © 2008-2012 Red Hat, Inc.. All Rights Reserved.