Package org.rhq.enterprise.gui.legacy.action.resource.ResourceForm

Examples of org.rhq.enterprise.gui.legacy.action.resource.ResourceForm.FormContext


    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
        DefinitionForm defForm = (DefinitionForm) form;
        Map<String, Integer> params = new HashMap<String, Integer>();

        FormContext context = defForm.getContext();
        if (context == FormContext.Type) {
            params.put(ParamConstants.RESOURCE_TYPE_ID_PARAM, defForm.getType());
        } else if (context == FormContext.Resource) {
            params.put(ParamConstants.RESOURCE_ID_PARAM, defForm.getId());
        } else if (context == FormContext.Group) {
View Full Code Here


        Map<String, Integer> params = new HashMap<String, Integer>();
        params.put("ad", operationsForm.getAd());

        Integer id = null;
        FormContext formContext = operationsForm.getContext();
        if (formContext == FormContext.Type) {
            params.put(Constants.RESOURCE_TYPE_ID_PARAM, operationsForm.getType());
            id = operationsForm.getType();
        } else if (formContext == FormContext.Group) {
            params.put(Constants.GROUP_ID_PARAM, operationsForm.getGroupId());
View Full Code Here

    @Override
    @SuppressWarnings("deprecation")
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
        DefinitionForm defForm = (DefinitionForm) form;
        FormContext context = defForm.getContext();
        log.trace("defForm.id=" + defForm.getId());

        Map<String, Integer> params = new HashMap<String, Integer>();
        params.put("ad", defForm.getAd());
View Full Code Here

        Map<String, Integer> params = new HashMap<String, Integer>();
        params.put("ad", operationsForm.getAd());

        Integer id = null;
        FormContext context = operationsForm.getContext();
        if (context == FormContext.Type) {
            params.put(Constants.RESOURCE_TYPE_ID_PARAM, operationsForm.getType());
            id = operationsForm.getType();
        } else if (context == FormContext.Group) {
            params.put(Constants.GROUP_ID_PARAM, operationsForm.getGroupId());
View Full Code Here

        // the top-most "trigger" radio button
        boolean triggerNotSet = defForm.getCondition(0).getTrigger() == null;

        ResourceType type = null;
        Subject overlord = LookupUtil.getSubjectManager().getOverlord();
        FormContext formContext = defForm.getContext();
        if (formContext == FormContext.Type) {
            type = LookupUtil.getResourceTypeManager().getResourceTypeById(overlord, defForm.getType());
        } else if (formContext == FormContext.Resource) {
            type = LookupUtil.getResourceManager().getResourceById(overlord, defForm.getId()).getResourceType();
        } else if (formContext == FormContext.Group) {
View Full Code Here

        AddNotificationsForm addForm = (AddNotificationsForm) form;
        Map<String, Integer> params = new HashMap<String, Integer>();

        params.put(Constants.ALERT_DEFINITION_PARAM, addForm.getAd());

        FormContext context = addForm.getContext();
        if (context == FormContext.Resource) {
            params.put(Constants.RESOURCE_ID_PARAM, addForm.getId());
        } else if (context == FormContext.Group) {
            params.put(Constants.GROUP_ID_PARAM, addForm.getGroupId());
        } else if (context == FormContext.Type) {
View Full Code Here

        Subject subject = RequestUtils.getSubject(request);
        int recordsRemoved = handleRemove(subject, rnForm);

        Map<String, Integer> params = new HashMap<String, Integer>();
        params.put(Constants.ALERT_DEFINITION_PARAM, rnForm.getAd());
        FormContext context = rnForm.getContext();
        if (context == FormContext.Type) {
            params.put(ParamConstants.RESOURCE_TYPE_ID_PARAM, rnForm.getType());
        } else if (context == FormContext.Resource) {
            params.put(ParamConstants.RESOURCE_ID_PARAM, rnForm.getId());
        } else if (context == FormContext.Group) {
View Full Code Here

    @SuppressWarnings("deprecation")
    public ActionForward execute(ActionMapping mapping, ActionForm form, HttpServletRequest request,
        HttpServletResponse response) throws Exception {
        DefinitionForm defForm = (DefinitionForm) form;
        Map<String, Integer> params = new HashMap<String, Integer>();
        FormContext context = defForm.getContext();

        params.put("ad", defForm.getAd());
        if (context == FormContext.Type) {
            params.put(ParamConstants.RESOURCE_TYPE_ID_PARAM, defForm.getType());
        } else if (context == FormContext.Resource) {
View Full Code Here

TOP

Related Classes of org.rhq.enterprise.gui.legacy.action.resource.ResourceForm.FormContext

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.