org.rhq.enterprise.gui.legacy.util
Class BizappUtils

java.lang.Object
  extended by org.rhq.enterprise.gui.legacy.util.BizappUtils

Deprecated.

@Deprecated
public class BizappUtils
extends Object

Utilities class that provides convenience methods for operating on bizapp objects.


Constructor Summary
BizappUtils()
          Deprecated.  
 
Method Summary
static List buildGroupTypes(javax.servlet.http.HttpServletRequest request)
          Deprecated. build group types and its corresponding resource string respresentations from the ApplicationResources.properties file.
static boolean canAdminCam(Map roleOps)
          Deprecated. Check in the permissions map to see if the user can administer CAM.
static List filterTypes(List all)
          Deprecated. Return a List of ResourceTypeValue objects from a given list that does not include the root resource type.
static void fixupRoleOperationMap(Map map)
          Deprecated. Update the given role operations map to reflect the gui's permission model.
static String getGroupLabel(javax.servlet.http.HttpServletRequest request, org.rhq.core.domain.resource.group.ResourceGroup group)
          Deprecated. build group types and its corresponding resource string respresentations from the ApplicationResources.properties file.
static List grepSubjects(List all, List matches)
          Deprecated. Return a List of Subject objects from a list that do not appear in a list of matches.
static boolean hasPermission(javax.servlet.http.HttpServletRequest request, org.rhq.core.domain.authz.Permission perm)
          Deprecated. Check in the permissions map to see if the user can administer RHQ with the given permission.
static List loadPermissions(List operations)
          Deprecated.  
static String makeSubjectFullName(String fname, String lname)
          Deprecated. Return the full name of the subject.
static String makeSubjectFullName(org.rhq.core.domain.auth.Subject subject)
          Deprecated. Return the full name of the subject.
static Integer[] mapOperationIds(Map map)
          Deprecated. Return an array of operation ids as String objects corresponding to the operations contained in the input map of resource types to operations.
static List mapOperations(List operations, List ids)
          Deprecated. Return a List of Operation objects corresponding to the input array of operation ids.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BizappUtils

public BizappUtils()
Deprecated. 
Method Detail

makeSubjectFullName

public static String makeSubjectFullName(String fname,
                                         String lname)
Deprecated. 
Return the full name of the subject.

Parameters:
fname - the subject's first name
lname - the subject's last name

makeSubjectFullName

public static String makeSubjectFullName(org.rhq.core.domain.auth.Subject subject)
Deprecated. 
Return the full name of the subject.

Parameters:
subject - the subject

buildGroupTypes

public static List buildGroupTypes(javax.servlet.http.HttpServletRequest request)
Deprecated. 
build group types and its corresponding resource string respresentations from the ApplicationResources.properties file.

Returns:
a list

getGroupLabel

public static String getGroupLabel(javax.servlet.http.HttpServletRequest request,
                                   org.rhq.core.domain.resource.group.ResourceGroup group)
Deprecated. 
build group types and its corresponding resource string respresentations from the ApplicationResources.properties file.

Returns:
a list

mapOperationIds

public static Integer[] mapOperationIds(Map map)
Deprecated. 
Return an array of operation ids as String objects corresponding to the operations contained in the input map of resource types to operations.

Parameters:
map - the Map of resource types to operations

mapOperations

public static List mapOperations(List operations,
                                 List ids)
Deprecated. 
Return a List of Operation objects corresponding to the input array of operation ids.

Parameters:
operations - the List of operations
ids - the operation ids

canAdminCam

public static boolean canAdminCam(Map roleOps)
Deprecated. 
Check in the permissions map to see if the user can administer CAM.

Parameters:
A - Map of Lists that contains the different groups of permissions.
Returns:
Whether or not the admin cam is contained in the type map.

hasPermission

public static boolean hasPermission(javax.servlet.http.HttpServletRequest request,
                                    org.rhq.core.domain.authz.Permission perm)
Deprecated. 
Check in the permissions map to see if the user can administer RHQ with the given permission.

Parameters:
request - contains the attribute that has the user operations
Returns:
true if the current user is allowed to administer RHQ

fixupRoleOperationMap

public static void fixupRoleOperationMap(Map map)
Deprecated. 
Update the given role operations map to reflect the gui's permission model. Specifically, copy each operation on the root resource type into the list for the resource type that the is display-wise associated with. For instance, the "addSubject" operation is associated in the Bizapp with the root resource type, but we we need it to be associated with the subject resource type for display purposes.

Parameters:
map - the Map of role operations

loadPermissions

public static List loadPermissions(List operations)
Deprecated. 

grepSubjects

public static List grepSubjects(List all,
                                List matches)
Deprecated. 
Return a List of Subject objects from a list that do not appear in a list of matches.

Parameters:
all - the list to operate on
matches - the list to grep out

filterTypes

public static List filterTypes(List all)
Deprecated. 
Return a List of ResourceTypeValue objects from a given list that does not include the root resource type.

Parameters:
all - the list to operate on
matches - the list to grep out


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