001/**
002 * Copyright (C) 2006-2022 Talend Inc. - www.talend.com
003 *
004 * Licensed under the Apache License, Version 2.0 (the "License");
005 * you may not use this file except in compliance with the License.
006 * You may obtain a copy of the License at
007 *
008 * http://www.apache.org/licenses/LICENSE-2.0
009 *
010 * Unless required by applicable law or agreed to in writing, software
011 * distributed under the License is distributed on an "AS IS" BASIS,
012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 * See the License for the specific language governing permissions and
014 * limitations under the License.
015 */
016package org.talend.sdk.component.api.component;
017
018import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
019import static java.lang.annotation.ElementType.PACKAGE;
020import static java.lang.annotation.ElementType.TYPE;
021import static java.lang.annotation.RetentionPolicy.RUNTIME;
022
023import java.lang.annotation.Retention;
024import java.lang.annotation.Target;
025
026import org.talend.sdk.component.api.meta.Documentation;
027
028import lombok.Getter;
029import lombok.RequiredArgsConstructor;
030
031@Documentation("Associate an icon to a component, "
032        + "only supported on components - `@PartitionMapper`, `@Processor`, `@Emitter` - and "
033        + "configurations - classes.")
034@Target({ TYPE, PACKAGE, ANNOTATION_TYPE })
035@Retention(RUNTIME)
036public @interface Icon {
037
038    /**
039     * @return the icon to associate to the component.
040     */
041    IconType value() default IconType.CUSTOM;
042
043    /**
044     * @return the custom icon key (not in {@link IconType}) to use if {@link Icon#value()} is {@link IconType#CUSTOM}.
045     */
046    String custom() default "";
047
048    /**
049     * Icons from http://talend.surge.sh/icons/.
050     * It is recommended for custom components to use vendor specific icons and not reuse Talend built-in icons.
051     */
052    @RequiredArgsConstructor
053    enum IconType {
054
055        @Deprecated
056        ACTIVEMQ("activemq"),
057        @Deprecated
058        ACTIVITY("activity"),
059        @Deprecated
060        AGGREGATE("aggregate"),
061        @Deprecated
062        APACHE("apache"),
063        @Deprecated
064        API_DESIGNER_COLORED("api-designer-colored"),
065        @Deprecated
066        API_DESIGNER_NEGATIVE("api-designer-negative"),
067        @Deprecated
068        API_DESIGNER_POSITIVE("api-designer-positive"),
069        @Deprecated
070        API_TESTER_COLORED("api-tester-colored"),
071        @Deprecated
072        API_TESTER_NEGATIVE("api-tester-negative"),
073        @Deprecated
074        API_TESTER_POSITIVE("api-tester-positive"),
075        @Deprecated
076        ARROW_LEFT("arrow-left"),
077        @Deprecated
078        ARROW_RIGHT("arrow-right"),
079        @Deprecated
080        AWS_KINESIS("aws-kinesis"),
081        @Deprecated
082        AZURE_EVENT_HUBS("azure-event-hubs"),
083        @Deprecated
084        BADGE("badge"),
085        @Deprecated
086        BADGE_OUTLINE("badge-outline"),
087        @Deprecated
088        BEAM("beam"),
089        @Deprecated
090        BELL("bell"),
091        @Deprecated
092        BELL_NOTIFICATION("bell-notification"),
093        @Deprecated
094        BIGQUERY("bigquery"),
095        @Deprecated
096        BLOCK("block"),
097        @Deprecated
098        BOARD("board"),
099        @Deprecated
100        BUBBLES("bubbles"),
101        @Deprecated
102        BURGER("burger"),
103        @Deprecated
104        CALENDAR_MOVE("calendar-move"),
105        @Deprecated
106        CAMPAIGNS("campaigns"),
107        @Deprecated
108        CARET_DOWN("caret-down"),
109        @Deprecated
110        CARRIAGE_RETURN("carriage-return"),
111        @Deprecated
112        CASSANDRA("cassandra"),
113        @Deprecated
114        CHAIN("chain"),
115        @Deprecated
116        CHARACTER("character"),
117        @Deprecated
118        CHARTS("charts"),
119        @Deprecated
120        CHECK("check"),
121        @Deprecated
122        CHECK_CIRCLE("check-circle"),
123        @Deprecated
124        CHECK_PLUS("check-plus"),
125        @Deprecated
126        CHEVRON_END("chevron-end"),
127        @Deprecated
128        CHEVRON_LEFT("chevron-left"),
129        @Deprecated
130        CLOCK("clock"),
131        @Deprecated
132        CLOUD_ENGINE("cloud-engine"),
133        @Deprecated
134        CLOUD_UPGRADE("cloud-upgrade"),
135        @Deprecated
136        CLUSTER("cluster"),
137        @Deprecated
138        COG("cog"),
139        @Deprecated
140        COLUMN_CHOOSER("column-chooser"),
141        @Deprecated
142        COMPONENT_KIT_NEGATIVE("component-kit-negative"),
143        @Deprecated
144        COMPONENT_KIT_POSITIVE("component-kit-positive"),
145        @Deprecated
146        COMPONENT_NEGATIVE("component-negative"),
147        @Deprecated
148        COMPONENT_POSITIVE("component-positive"),
149        @Deprecated
150        CONNECTIONS("connections"),
151        @Deprecated
152        CONTAINS("contains"),
153        @Deprecated
154        COUCHBASE("couchbase"),
155        @Deprecated
156        CREDITS_ENGINE("credits-engine"),
157        @Deprecated
158        CROSS("cross"),
159        @Deprecated
160        CROSSHAIRS("crosshairs"),
161        @Deprecated
162        DATAGRID("datagrid"),
163        @Deprecated
164        DATAPREP("dataprep"),
165        @Deprecated
166        DATASETS("datasets"),
167        @Deprecated
168        DATASTORE("datastore"),
169        @Deprecated
170        DATASTREAMS_COLORED("datastreams-colored"),
171        @Deprecated
172        DATASTREAMS_NEGATIVE("datastreams-negative"),
173        @Deprecated
174        DATASTREAMS_POSITIVE("datastreams-positive"),
175        @Deprecated
176        DATA_FABRIC_COLORED("data-fabric-colored"),
177        @Deprecated
178        DATA_MODELS("data-models"),
179        @Deprecated
180        DB_INPUT("db-input"),
181        @Deprecated
182        DOWNLOAD("download"),
183        @Deprecated
184        DRAG("drag"),
185        @Deprecated
186        DRAG_AND_DROP("drag-and-drop"),
187        @Deprecated
188        DROPPER("dropper"),
189        @Deprecated
190        ELASTIC("elastic"),
191        @Deprecated
192        ELLIPSIS("ellipsis"),
193        @Deprecated
194        EMPTY_CALENDAR("empty-calendar"),
195        @Deprecated
196        EMPTY_CELL("empty-cell"),
197        @Deprecated
198        EMPTY_CHAR("empty-char"),
199        @Deprecated
200        EMPTY_SPACE("empty-space"),
201        @Deprecated
202        ENVIRONMENT("environment"),
203        @Deprecated
204        EQUAL("equal"),
205        @Deprecated
206        EXPANDED("expanded"),
207        @Deprecated
208        EXPORT_HISTORY("export-history"),
209        @Deprecated
210        EYE("eye"),
211        @Deprecated
212        EYE_SLASH("eye-slash"),
213        @Deprecated
214        FIELDGLASS("fieldglass"),
215        @Deprecated
216        FIELD_SELECTOR("field-selector"),
217        @Deprecated
218        FILES_O("files-o"),
219        @Deprecated
220        FILE_COG("file-cog"),
221        @Deprecated
222        FILE_COMPRESSED("file-compressed"),
223        @Deprecated
224        FILE_CONNECT_O("file-connect-o"),
225        @Deprecated
226        FILE_CSV_O("file-csv-o"),
227        @Deprecated
228        FILE_DATABASE_O("file-database-o"),
229        @Deprecated
230        FILE_HDFS_O("file-hdfs-o"),
231        @Deprecated
232        FILE_JOB_O("file-job-o"),
233        @Deprecated
234        FILE_JSON_O("file-json-o"),
235        @Deprecated
236        FILE_MOVE("file-move"),
237        @Deprecated
238        FILE_O("file-o"),
239        @Deprecated
240        FILE_S3_O("file-s3-o"),
241        @Deprecated
242        FILE_SALESFORCE("file-salesforce"),
243        @Deprecated
244        FILE_TXT_O("file-txt-o"),
245        @Deprecated
246        FILE_XLSX_O("file-xlsx-o"),
247        @Deprecated
248        FILE_XLS_O("file-xls-o"),
249        @Deprecated
250        FILE_XML_O("file-xml-o"),
251        @Deprecated
252        FILTER("filter"),
253        @Deprecated
254        FILTER_COLUMN("filter-column"),
255        @Deprecated
256        FILTER_ROW("filter-row"),
257        @Deprecated
258        FLINK("flink"),
259        @Deprecated
260        FLINK_O("flink-o"),
261        @Deprecated
262        FLOW("flow"),
263        @Deprecated
264        FLOW_O("flow-o"),
265        @Deprecated
266        FLOW_SOURCE_O("flow-source-o"),
267        @Deprecated
268        FLOW_STEP_O("flow-step-o"),
269        @Deprecated
270        FLOW_TARGET_O("flow-target-o"),
271        @Deprecated
272        FLOW_UNDER_PLAN("flow-under-plan"),
273        @Deprecated
274        FLOW_UNFINISHED("flow-unfinished"),
275        @Deprecated
276        FOLDER("folder"),
277        @Deprecated
278        FOLDER_CLOSED("folder-closed"),
279        @Deprecated
280        FOLDER_SHARED("folder-shared"),
281        @Deprecated
282        FOLDER_SHARED_OWNER("folder-shared-owner"),
283        @Deprecated
284        FOLDER_SHARED_USER("folder-shared-user"),
285        @Deprecated
286        FULLSCREEN("fullscreen"),
287        @Deprecated
288        GOOGLE_DATAFLOW("google-dataflow"),
289        @Deprecated
290        GROUP_CIRCLE("group-circle"),
291        @Deprecated
292        HADOOP("hadoop"),
293        @Deprecated
294        HAND_POINTER("hand-pointer"),
295        @Deprecated
296        HIERARCHICAL_VIEW("hierarchical-view"),
297        @Deprecated
298        HOME("home"),
299        @Deprecated
300        INFO_CIRCLE("info-circle"),
301        @Deprecated
302        JMS("jms"),
303        @Deprecated
304        KAFKA("kafka"),
305        @Deprecated
306        LAUNCH("launch"),
307        @Deprecated
308        LAUNCHER("launcher"),
309        @Deprecated
310        LESS_THAN("less-than"),
311        @Deprecated
312        LESS_THAN_EQUAL("less-than-equal"),
313        @Deprecated
314        LICENSE("license"),
315        @Deprecated
316        LINK("link"),
317        @Deprecated
318        LOCAL_STORAGE("local-storage"),
319        @Deprecated
320        LOCK("lock"),
321        @Deprecated
322        LOCKED("locked"),
323        @Deprecated
324        LOGO("logo"),
325        @Deprecated
326        LOGO_COLORED("logo-colored"),
327        @Deprecated
328        LOGO_SQUARE("logo-square"),
329        @Deprecated
330        MARKETO("marketo"),
331        @Deprecated
332        MDM_COLORED("mdm-colored"),
333        @Deprecated
334        MDM_NEGATIVE("mdm-negative"),
335        @Deprecated
336        MDM_POSITIVE("mdm-positive"),
337        @Deprecated
338        MINUS_CIRCLE("minus-circle"),
339        @Deprecated
340        MONGODB("mongodb"),
341        @Deprecated
342        MORE_THAN("more-than"),
343        @Deprecated
344        MORE_THAN_EQUAL("more-than-equal"),
345        @Deprecated
346        MOST_TRUSTED("most-trusted"),
347        @Deprecated
348        NETSUITE("netsuite"),
349        @Deprecated
350        NETWORK("network"),
351        @Deprecated
352        NORMALIZE("normalize"),
353        @Deprecated
354        NOTE("note"),
355        @Deprecated
356        NOT_EQUAL("not-equal"),
357        @Deprecated
358        OPENER("opener"),
359        @Deprecated
360        OVERVIEW("overview"),
361        @Deprecated
362        PANEL_OPENER_BOTTOM("panel-opener-bottom"),
363        @Deprecated
364        PANEL_OPENER_RIGHT("panel-opener-right"),
365        @Deprecated
366        PENCIL("pencil"),
367        @Deprecated
368        PHONE("phone"),
369        @Deprecated
370        PIE_CHARTS("pie-charts"),
371        @Deprecated
372        PIN("pin"),
373        @Deprecated
374        PLACEHOLDER("placeholder"),
375        @Deprecated
376        PLAY("play"),
377        @Deprecated
378        PLUS("plus"),
379        @Deprecated
380        PLUS_CIRCLE("plus-circle"),
381        @Deprecated
382        POSTGRESQL("postgresql"),
383        @Deprecated
384        POWER_OFF("power-off"),
385        @Deprecated
386        PROJECTS("projects"),
387        @Deprecated
388        PROMOTION_PIPELINES("promotion-pipelines"),
389        @Deprecated
390        PUBSUB("pubsub"),
391        @Deprecated
392        PYTHON("python"),
393        @Deprecated
394        QUESTION_CIRCLE("question-circle"),
395        @Deprecated
396        QUOTES("quotes"),
397        @Deprecated
398        RAW_DATA("raw-data"),
399        @Deprecated
400        REDO("redo"),
401        @Deprecated
402        REFRESH("refresh"),
403        @Deprecated
404        REMOTE_ENGINE("remote-engine"),
405        @Deprecated
406        REPLICATE("replicate"),
407        @Deprecated
408        REST("rest"),
409        @Deprecated
410        ROLES("roles"),
411        @Deprecated
412        SAMPLE("sample"),
413        @Deprecated
414        SCHEDULER("scheduler"),
415        @Deprecated
416        SEARCH("search"),
417        @Deprecated
418        SEMANTIC("semantic"),
419        @Deprecated
420        SEND("send"),
421        @Deprecated
422        SHARE_ALT("share-alt"),
423        @Deprecated
424        SHARING_DEFAULT("sharing-default"),
425        @Deprecated
426        SHARING_OWNER("sharing-owner"),
427        @Deprecated
428        SHARING_USER("sharing-user"),
429        @Deprecated
430        SHIELD("shield"),
431        @Deprecated
432        SHIELD_FULL("shield-full"),
433        @Deprecated
434        SHIELD_FULL_CHECK("shield-full-check"),
435        @Deprecated
436        SHOW_UNASSIGNED_TASKS("show_unassigned_tasks"),
437        @Deprecated
438        SLIDERS("sliders"),
439        @Deprecated
440        SMILEY_ANGRY("smiley-angry"),
441        @Deprecated
442        SMILEY_ENTHUSIAST("smiley-enthusiast"),
443        @Deprecated
444        SMILEY_NEUTRAL("smiley-neutral"),
445        @Deprecated
446        SMILEY_SATISFIED("smiley-satisfied"),
447        @Deprecated
448        SMILEY_SLEEP("smiley-sleep"),
449        @Deprecated
450        SMILEY_UNHAPPY("smiley-unhappy"),
451        @Deprecated
452        SORT("sort"),
453        @Deprecated
454        SORT_19("sort-19"),
455        @Deprecated
456        SORT_91("sort-91"),
457        @Deprecated
458        SORT_ASC("sort-asc"),
459        @Deprecated
460        SORT_AZ("sort-az"),
461        @Deprecated
462        SORT_DESC("sort-desc"),
463        @Deprecated
464        SORT_ZA("sort-za"),
465        @Deprecated
466        SPARK("spark"),
467
468        STAR("star"), // used by the starter and not really vendor specific so ok to keep
469
470        @Deprecated
471        STOP("stop"),
472        @Deprecated
473        STREAMS("streams"),
474        @Deprecated
475        TABLE("table"),
476        @Deprecated
477        TAGS("tags"),
478        @Deprecated
479        TASKS("tasks"),
480        @Deprecated
481        TDC_COLORED("tdc-colored"),
482        @Deprecated
483        TDC_NEGATIVE("tdc-negative"),
484        @Deprecated
485        TDC_POSITIVE("tdc-positive"),
486        @Deprecated
487        TDP_COLORED("tdp-colored"),
488        @Deprecated
489        TDP_NEGATIVE("tdp-negative"),
490        @Deprecated
491        TDP_POSITIVE("tdp-positive"),
492        @Deprecated
493        TDS_COLORED("tds-colored"),
494        @Deprecated
495        TDS_NEGATIVE("tds-negative"),
496        @Deprecated
497        TDS_POSITIVE("tds-positive"),
498        @Deprecated
499        TIC_COLORED("tic-colored"),
500        @Deprecated
501        TIC_NEGATIVE("tic-negative"),
502        @Deprecated
503        TIC_POSITIVE("tic-positive"),
504        @Deprecated
505        TILES("tiles"),
506        @Deprecated
507        TMC_COLORED("tmc-colored"),
508        @Deprecated
509        TMC_NEGATIVE("tmc-negative"),
510        @Deprecated
511        TMC_POSITIVE("tmc-positive"),
512        @Deprecated
513        TRANSFORMER_WINDOW("transformer-window"),
514        @Deprecated
515        TRASH("trash"),
516        @Deprecated
517        TYPE_CONVERTER("type-converter"),
518        @Deprecated
519        UNDO("undo"),
520        @Deprecated
521        UNION("union"),
522        @Deprecated
523        UNLOCKED("unlocked"),
524        @Deprecated
525        UPLOAD("upload"),
526        @Deprecated
527        USER_CIRCLE("user-circle"),
528        @Deprecated
529        VERSIONING("versioning"),
530        @Deprecated
531        WARNING("warning"),
532        @Deprecated
533        WEBHOOK("webhook"),
534        @Deprecated
535        WINDOW("window"),
536        @Deprecated
537        WORD("word"),
538        @Deprecated
539        WORKSPACES("workspaces"),
540        @Deprecated
541        WORLD("world"),
542        @Deprecated
543        ZOOMIN("zoomin"),
544        @Deprecated
545        ZOOMOUT("zoomout"),
546
547        CUSTOM("custom"), // default and only recommended mode now
548
549        @Deprecated // use a specific icon as much as possible
550        DEFAULT("default");
551
552        @Getter
553        private final String key;
554    }
555}