Skip to main content
summaryrefslogtreecommitdiffstats
blob: 9e5df148e1e88adf4253cc34ecf40349c456d2d4 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
/*******************************************************************************
 * Copyright (c) 2018 Remain Software
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     wim.jongman@remainsoftware.com - initial API and implementation
 *******************************************************************************/
package org.eclipse.tips.json.internal;

/**
 * Parser constants for the Json TipProvider.Tip[] Structure
 *
 * <pre>
 * {
 *   "provider": {
 *     "image": "data:image/png;base64,iVBORw0K ... y543==",
 *     "description": "TipProvider Description",
 *     "expression": "&lt;eclipse core expression&gt;",
 *     "tips": [
 *       {
 *         "subject": "Tip Subject",
 *         "date": "YYYY-MM-DD",
 *         "image": "data:image/png;base64,iVBORw0KGgo ... CYII=",
 *         "ratio": 1.5,
 *         "maxHeight": 300,
 *         "maxWidth": 200,
 *         "url": "url or html, not both",
 *         "html": "html or url, not both"
 *     }]
 *   }
 * }
 * </pre>
 */
public class JsonConstants {

	/**
	 * Provider description field
	 */
	public static final String P_DESCRIPTION = "description";

	/**
	 * Provider core expression field
	 */
	public static final String P_EXPRESSION = "expression";

	/**
	 * Provider image field
	 */
	public static final String P_IMAGE = "image";

	/**
	 * Provider provider field
	 */
	public static final String P_PROVIDER = "provider";

	/**
	 * The provider tips array
	 */
	public static final String P_TIPS = "tips";

	/**
	 * Tip date field
	 */
	public static final String T_DATE = "date";

	/**
	 * Tip HTML
	 */
	public static final String T_HTML = "html";

	/**
	 * Tip image field
	 */
	public static final String T_IMAGE = "image";

	/**
	 * Tip image maximum height (int)
	 */
	public static final String T_MAXHEIGHT = "maxHeight";

	/**
	 * Tip image maximum width (int)
	 */
	public static final String T_MAXWIDTH = "maxWidth";

	/**
	 * Tip image ratio field (double)
	 */
	public static final String T_RATIO = "ratio";

	/**
	 * Tip subject field
	 */
	public static final String T_SUBJECT = "subject";

	/**
	 * Tip URL
	 */
	public static final String T_URL = "url";
}

Back to the top