Package org.openbravo.client.application
Class ApplicationUtils
- java.lang.Object
-
- org.openbravo.client.application.ApplicationUtils
-
public class ApplicationUtils extends Object
Utility class for common operations- Author:
- iperdomo
-
-
Constructor Summary
Constructors Constructor Description ApplicationUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static List<RoleOrganization>
getAdminOrgs()
static List<UserRoles>
getAdminRoles()
static String
getParentProperty(Tab tab, Tab parentTab)
Computes the parent property for a certain tab and its parent tab.static boolean
isClientAdmin()
static boolean
isOrgAdmin()
static boolean
isRoleAdmin()
static boolean
isUIButton(Field field)
Checks whether the reference of a field is button.
-
-
-
Method Detail
-
getParentProperty
public static String getParentProperty(Tab tab, Tab parentTab)
Computes the parent property for a certain tab and its parent tab. The parentProperty is the property in the entity of the tab pointing to the parent tab.- Parameters:
tab
- the child tabparentTab
- the parent tab- Returns:
- the parentproperty in the source entity pointing to the parent
-
isClientAdmin
public static boolean isClientAdmin()
-
isOrgAdmin
public static boolean isOrgAdmin()
-
isRoleAdmin
public static boolean isRoleAdmin()
-
getAdminOrgs
public static List<RoleOrganization> getAdminOrgs()
-
isUIButton
public static boolean isUIButton(Field field)
Checks whether the reference of a field is button. Caution: this check is done by checking hardcoded reference ID 28.- Parameters:
field
- Field to check- Returns:
- true in case it is button, false if not
-
-