|
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 |
java.lang.Objectorg.hyperic.hq.ui.util.BizappUtils
public class BizappUtils
Utilities class that provides convenience methods for operating on bizapp objects.
Constructor Summary | |
---|---|
BizappUtils()
|
Method Summary | |
---|---|
static java.util.List |
buildAIResourceIds(AIAppdefResourceValue[] aiResources,
boolean ignored)
builds a list of ids of ai resources for resources which are not ignored. |
static java.util.List |
buildAppdefEntityIds(java.util.List entityIds)
This method builds a list of AppdefEntityID objects from [entityType]:[resourceTypeId] strings |
static PageList |
buildAppdefOptionList(java.util.List resourceTypes,
boolean useHyphen)
builds the value objects in the form: [entity type id]:[resource type id] |
static java.util.List |
buildAppdefResources(int sessionId,
org.hyperic.hq.bizapp.shared.AppdefBoss boss,
AppdefEntityID[] entities)
This method builds a list of AppdefResourceValue objects from a list of AppdefEntityID. |
static AppdefResourceTypeValue[] |
buildfilteredAIServerTypes(AppdefResourceTypeValue[] supportedResTypes,
AIServerValue[] sValues)
build a list of server types extracted from the ai server list |
static PageList |
buildGroupResources(org.hyperic.hq.bizapp.shared.AppdefBoss boss,
int sessionId,
AppdefGroupValue group,
PageControl pc)
builds a list of AppdefResourceValue objects from a list of AppdefEntityID objects stored in the group. |
static java.util.List |
buildGroupTypes(javax.servlet.http.HttpServletRequest request)
build group types and its corresponding resource string respresentations from the ApplicationResources.properties file. |
static java.util.List |
buildLoadConfigOptions(ConfigSchema config,
ConfigResponse oldResponse)
build a list of UI option using a list of ConfigOptions |
static java.util.List |
buildLoadConfigOptions(java.lang.String prefix,
ConfigSchema config,
ConfigResponse oldResponse)
build a list of UI option using a list of ConfigOptions |
static ConfigResponse |
buildSaveConfigOptions(javax.servlet.http.HttpServletRequest request,
ConfigResponse oldResponse,
ConfigSchema config,
org.apache.struts.action.ActionErrors errors)
|
static ConfigResponse |
buildSaveConfigOptions(java.lang.String prefix,
javax.servlet.http.HttpServletRequest request,
ConfigResponse oldResponse,
ConfigSchema config,
org.apache.struts.action.ActionErrors errors)
|
static java.util.List |
buildServerTypesFromServerSig(AppdefResourceTypeValue[] sTypes,
java.util.Iterator sigIterator)
builds a list of server types from ServerSignature objects |
static AppdefResourceTypeValue[] |
buildSupportedAIServerTypes(javax.servlet.ServletContext ctx,
javax.servlet.http.HttpServletRequest request,
java.lang.String platType)
build a list of supported server types for ai subsystem |
static boolean |
canAdminHQ(java.lang.Integer sessionId,
org.hyperic.hq.bizapp.shared.AuthzBoss boss)
Check in the permissions map to see if the user can administer HQ. |
static java.util.List |
filterAIResourcesByServerType(java.util.List resources,
java.lang.String name)
filter on a list of AIAppdefResourceValue by Server Type. |
static java.util.List |
filterAIResourcesByStatus(java.util.List resources,
java.lang.Integer status)
filter on a list of AIAppdefResourceValue. |
static StringifiedException |
findLastError(ScanStateCore scanState)
|
static AppdefResourceTypeValue |
findResourceTypeValue(AppdefResourceTypeValue[] resourceTypes,
java.lang.String name)
find a ResourceTypeValue object from a list of ResourceTypeValue obects. |
static Agent |
getAgentConnection(int sessionId,
org.hyperic.hq.bizapp.shared.AppdefBoss appdefBoss,
javax.servlet.http.HttpServletRequest request,
PlatformForm form)
|
static java.lang.String |
getBaselineText(java.lang.String baselineOption,
Measurement m)
|
static java.util.List |
grepSubjects(java.util.List all,
java.util.List matches)
Return a List of AuthzSubjectValue
objects from a list that do not appear in
a list of matches. |
static boolean |
isAutoApprovedServer(int sessionId,
org.hyperic.hq.bizapp.shared.AppdefBoss appdefBoss,
AIServerValue aiServer)
|
static java.lang.String |
makeSubjectFullName(AuthzSubject subject)
Return the full name of the subject. |
static java.lang.String |
makeSubjectFullName(java.lang.String fname,
java.lang.String lname)
Return the full name of the subject. |
static double |
parseMeasurementValue(java.lang.String value,
java.lang.String unit)
Parse a measurement value and units string. |
static void |
populateAgentConnections(int sessionId,
org.hyperic.hq.bizapp.shared.AppdefBoss appdefBoss,
javax.servlet.http.HttpServletRequest request,
PlatformForm form,
java.lang.String usedIpPort)
|
static java.lang.Boolean |
populateConfig(javax.servlet.http.HttpServletRequest request,
java.lang.String prefix,
ConfigSchema schema,
ConfigResponse config,
ConfigResponse oldConfig)
Populate a config response with values. |
static java.lang.String |
replacePlatform(java.lang.String inStr,
AppdefEntityID id)
Replace the word 'platform' in the input string with the correct object type as specified by the entity ID. |
static void |
setRuntimeAIMessage(int sessionId,
javax.servlet.http.HttpServletRequest request,
ServerValue server,
org.hyperic.hq.bizapp.shared.AppdefBoss appdefBoss)
When displaying the config options (both in the ViewXXX and EditXXX tiles), we display a message "Auto-Discover foo, bar, and other services?" next to the checkbox. |
static java.util.List |
sortAIResource(java.util.List resource)
|
static java.util.List |
sortAppdefResource(java.util.List appdefList,
PageControl pc)
This method sorts list of AppdefResourceValue objects |
static java.util.List |
sortAppdefResourceType(java.util.List resourceType)
|
static void |
startAutoScan(javax.servlet.ServletContext ctx,
int sessionId,
AppdefEntityID entityId)
|
static java.lang.String[] |
stringifyEntityIds(AppdefEntityID[] eids)
Gut the String[] appdef key values for the passed-in
entity ids. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public BizappUtils()
Method Detail |
---|
public static java.lang.String replacePlatform(java.lang.String inStr, AppdefEntityID id)
public static java.lang.String makeSubjectFullName(java.lang.String fname, java.lang.String lname)
fname
- the subject's first namelname
- the subject's last namepublic static java.util.List filterAIResourcesByStatus(java.util.List resources, java.lang.Integer status)
resources
- List of AIAppdefResources to filterpublic static java.util.List filterAIResourcesByServerType(java.util.List resources, java.lang.String name)
public static void setRuntimeAIMessage(int sessionId, javax.servlet.http.HttpServletRequest request, ServerValue server, org.hyperic.hq.bizapp.shared.AppdefBoss appdefBoss) throws SessionTimeoutException, SessionNotFoundException, java.rmi.RemoteException
SessionTimeoutException
SessionNotFoundException
java.rmi.RemoteException
public static java.util.List buildAIResourceIds(AIAppdefResourceValue[] aiResources, boolean ignored)
public static AppdefResourceTypeValue[] buildSupportedAIServerTypes(javax.servlet.ServletContext ctx, javax.servlet.http.HttpServletRequest request, java.lang.String platType) throws java.lang.Exception
java.lang.Exception
public static AppdefResourceTypeValue[] buildfilteredAIServerTypes(AppdefResourceTypeValue[] supportedResTypes, AIServerValue[] sValues)
public static java.util.List sortAppdefResourceType(java.util.List resourceType)
public static java.util.List sortAIResource(java.util.List resource)
public static java.util.List buildServerTypesFromServerSig(AppdefResourceTypeValue[] sTypes, java.util.Iterator sigIterator)
public static AppdefResourceTypeValue findResourceTypeValue(AppdefResourceTypeValue[] resourceTypes, java.lang.String name)
public static java.util.List buildAppdefResources(int sessionId, org.hyperic.hq.bizapp.shared.AppdefBoss boss, AppdefEntityID[] entities) throws ObjectNotFoundException, java.rmi.RemoteException, SessionTimeoutException, SessionNotFoundException, PermissionException
ObjectNotFoundException
java.rmi.RemoteException
SessionTimeoutException
SessionNotFoundException
PermissionException
public static java.util.List sortAppdefResource(java.util.List appdefList, PageControl pc)
public static java.util.List buildAppdefEntityIds(java.util.List entityIds)
entityIds
- list of [entityType]:[resourceTypeId] stringspublic static PageList buildAppdefOptionList(java.util.List resourceTypes, boolean useHyphen) throws InvalidAppdefTypeException
resourceTypes
-
InvalidAppdefTypeException
public static java.lang.String makeSubjectFullName(AuthzSubject subject)
subject
- the subjectpublic static java.util.List buildGroupTypes(javax.servlet.http.HttpServletRequest request)
public static PageList buildGroupResources(org.hyperic.hq.bizapp.shared.AppdefBoss boss, int sessionId, AppdefGroupValue group, PageControl pc) throws ObjectNotFoundException, java.rmi.RemoteException, SessionTimeoutException, SessionNotFoundException
group
- AppdefGroupValue which contains the list of resourcespc
- TODO
ObjectNotFoundException
java.rmi.RemoteException
SessionTimeoutException
SessionNotFoundException
public static boolean canAdminHQ(java.lang.Integer sessionId, org.hyperic.hq.bizapp.shared.AuthzBoss boss)
public static java.util.List grepSubjects(java.util.List all, java.util.List matches)
List
of AuthzSubjectValue
objects from a list that do not appear in
a list of matches.
all
- the list to operate onmatches
- the list to grep outpublic static java.lang.String getBaselineText(java.lang.String baselineOption, Measurement m)
public static java.util.List buildLoadConfigOptions(ConfigSchema config, ConfigResponse oldResponse)
public static java.util.List buildLoadConfigOptions(java.lang.String prefix, ConfigSchema config, ConfigResponse oldResponse)
public static StringifiedException findLastError(ScanStateCore scanState)
public static ConfigResponse buildSaveConfigOptions(javax.servlet.http.HttpServletRequest request, ConfigResponse oldResponse, ConfigSchema config, org.apache.struts.action.ActionErrors errors) throws InvalidOptionException, InvalidOptionValueException, InvalidOptionValsFoundException
InvalidOptionException
InvalidOptionValueException
InvalidOptionValsFoundException
public static ConfigResponse buildSaveConfigOptions(java.lang.String prefix, javax.servlet.http.HttpServletRequest request, ConfigResponse oldResponse, ConfigSchema config, org.apache.struts.action.ActionErrors errors) throws InvalidOptionException, InvalidOptionValueException, InvalidOptionValsFoundException
InvalidOptionException
InvalidOptionValueException
InvalidOptionValsFoundException
public static java.lang.String[] stringifyEntityIds(AppdefEntityID[] eids)
String[]
appdef key values for the passed-in
entity ids.
eids
- the appdef entity ids
public static java.lang.Boolean populateConfig(javax.servlet.http.HttpServletRequest request, java.lang.String prefix, ConfigSchema schema, ConfigResponse config, ConfigResponse oldConfig) throws InvalidOptionException, InvalidOptionValueException
request
- The servlet requestprefix
- Only parameters with this prefix will be considered. The
prefix will be stripped before inserting it as a key into the config.schema
- The config schema that will supply the keys we'll look for
in the requestParamsconfig
- The ConfigResponse to populate with valuesoldConfig
- The existing configuration, used for comparison to see
if anything has changed.
InvalidOptionException
InvalidOptionValueException
public static double parseMeasurementValue(java.lang.String value, java.lang.String unit) throws java.text.ParseException
value
- The string to parsemtv
- The measurement template being parsed
java.text.ParseException
public static boolean isAutoApprovedServer(int sessionId, org.hyperic.hq.bizapp.shared.AppdefBoss appdefBoss, AIServerValue aiServer)
public static void populateAgentConnections(int sessionId, org.hyperic.hq.bizapp.shared.AppdefBoss appdefBoss, javax.servlet.http.HttpServletRequest request, PlatformForm form, java.lang.String usedIpPort) throws java.rmi.RemoteException, SessionTimeoutException, SessionNotFoundException
java.rmi.RemoteException
SessionTimeoutException
SessionNotFoundException
public static Agent getAgentConnection(int sessionId, org.hyperic.hq.bizapp.shared.AppdefBoss appdefBoss, javax.servlet.http.HttpServletRequest request, PlatformForm form) throws java.rmi.RemoteException, SessionTimeoutException, SessionNotFoundException, AgentNotFoundException
java.rmi.RemoteException
SessionTimeoutException
SessionNotFoundException
AgentNotFoundException
public static void startAutoScan(javax.servlet.ServletContext ctx, int sessionId, AppdefEntityID entityId)
|
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 |