Package ru.mail.jira.plugins.lf.struct

Examples of ru.mail.jira.plugins.lf.struct.HtmlEntity


        params.put("selectedOptions", qfMgr.getLinkeFieldsOptions(cfId, prId));

        try
        {
            String body = ComponentAccessor.getVelocityManager().getBody("templates/", "setjql.vm", params);
            return Response.ok(new HtmlEntity(body)).build();
        }
        catch (VelocityException vex)
        {
            log.error("QueryFieldsService::initJclDialog - Velocity parsing error", vex);
            return Response.ok(i18n.getText("queryfields.error.internalerror")).status(500).build();
View Full Code Here


                    params.put("i18n", i18n);

                    try
                    {
                        String body = ComponentAccessor.getVelocityManager().getBody("templates/", "conferr.vm", params);
                        return Response.ok(new HtmlEntity(body)).status(500).build();
                    }
                    catch (VelocityException vex)
                    {
                        log.error("QueryFieldsService::setJcl - Velocity parsing error", vex);
                        return Response.ok(i18n.getText("queryfields.error.internalerror")).status(500).build();
                    }
                }

                String proj = reserveData.substring(0, inx);
                String cfName = reserveData.substring(inx + 1);

                jqlQuery = String.format(Consts.TEST_QUERY_PATTERN, proj, cfName);
            }

            SearchService.ParseResult parseResult = searchService.parseQuery(user, jqlQuery);
            if (parseResult.isValid())
            {
                qfMgr.setQueryFieldData(cfId, prId, data);
                if (Utils.isValidStr(jqlnull) && jqlnull.equals("on"))
                {
                    qfMgr.setAddNull(cfId, prId, true);
                }
                else
                {
                    qfMgr.setAddNull(cfId, prId, false);
                }
                if (Utils.isValidStr(autocompleteView) && autocompleteView.equals("on"))
                {
                    qfMgr.setAutocompleteView(cfId, prId, true);
                }
                else
                {
                    qfMgr.setAutocompleteView(cfId, prId, false);
                }
                List<String> optList = new ArrayList<String>();
                if (options != null)
                {
                    for (String option : options)
                    {
                        optList.add(option);
                    }
                }
                qfMgr.setLinkerFieldOptions(cfId, prId, optList);
            }
            else
            {
                MessageSet ms = parseResult.getErrors();
                Set<String> errs = ms.getErrorMessages();
                Map<String, Object> params = new HashMap<String, Object>();
                params.put("errs", errs);
                params.put("i18n", i18n);

                try
                {
                    String body = ComponentAccessor.getVelocityManager().getBody("templates/", "conferr.vm", params);
                    return Response.ok(new HtmlEntity(body)).status(500).build();
                }
                catch (VelocityException vex)
                {
                    log.error("QueryFieldsService::setJcl - Velocity parsing error", vex);
                    return Response.ok(i18n.getText("queryfields.error.internalerror")).status(500).build();
View Full Code Here

TOP

Related Classes of ru.mail.jira.plugins.lf.struct.HtmlEntity

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.