Package com.adobe.granite.xss

Examples of com.adobe.granite.xss.XSSAPI


    }

    @Override
    protected void doGet(SlingHttpServletRequest request, SlingHttpServletResponse response) throws ServletException,
            IOException {
        XSSAPI xssAPI = request.adaptTo(XSSAPI.class);
        try {
            JSONObject result = new JSONObject();
            JSONArray list = new JSONArray();
            result.put("list", list);

            ServiceReference[] services = tracker.getServiceReferences();
            if (services != null) {
                for (ServiceReference service : services) {
                    String displayName = PropertiesUtil.toString(service.getProperty("displayName"), null);
                    String[] schemes = PropertiesUtil.toStringArray(service.getProperty(Importer.SCHEME_PROPERTY));
                    if (displayName != null && schemes != null) {
                        for (String scheme : schemes) {
                            JSONObject obj = new JSONObject();
                            obj.put("qtip", "");
                            obj.put("text", displayName);
                            obj.put("text_xss", xssAPI.encodeForJSString(displayName));
                            obj.put("value", scheme);
                            list.put(obj);
                        }
                    }
                }
View Full Code Here

TOP

Related Classes of com.adobe.granite.xss.XSSAPI

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.