View Javadoc
1   /*
2    * Copyright (C) 2026 B3Partners B.V.
3    *
4    * SPDX-License-Identifier: MIT
5    */
6   package org.tailormap.api.persistence;
7   
8   import jakarta.persistence.EnumeratedValue;
9   
10  public enum UploadCategory {
11    LEGEND("legend", true),
12    LAYER_ATTACHED_FILE("layer-attached-file", true),
13  
14    APP_LOGO("app-logo", false),
15    HEADER_LOGO("header-logo", false),
16    IMAGE("image", false),
17    PORTAL_IMAGE("portal-image", false),
18    DRAWING_STYLE("drawing-style", false),
19    DRAWING_STYLE_IMAGE("drawing-style-image", false),
20    SSO_IMAGE("sso-image", false),
21    THEME_THEME_LOGO("theme-theme-logo", false),
22    THEME_FAVICON("theme-favicon", false),
23    UNRESTRICTED("unrestricted", false);
24  
25    @EnumeratedValue
26    private final String value;
27  
28    private final boolean restricted;
29  
30    UploadCategory(String value, boolean restricted) {
31      this.value = value;
32      this.restricted = restricted;
33    }
34  
35    public String getValue() {
36      return value;
37    }
38  
39    /**
40     * Returns the string representation of the enum value.
41     *
42     * @return the string representation of the enum value
43     * @see #getValue()
44     */
45    @Override
46    public String toString() {
47      return getValue();
48    }
49  
50    public boolean isRestricted() {
51      return restricted;
52    }
53  }