1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 package org.opencastproject.security.api;
23
24 import java.util.Collections;
25 import java.util.HashMap;
26 import java.util.Map;
27
28
29
30
31 public class DefaultOrganization extends JaxbOrganization {
32
33
34 public static final Map<String, String> DEFAULT_PROPERTIES;
35
36
37 public static final Map<String, Integer> DEFAULT_SERVERS;
38
39 static {
40 Map<String, String> properties = new HashMap<String, String>();
41 properties.put("logo_large", "/admin/img/logo/opencast.svg");
42 properties.put("logo_small", "/admin/img/logo/opencast-icon.svg");
43 DEFAULT_PROPERTIES = Collections.unmodifiableMap(properties);
44
45 Map<String, Integer> servers = new HashMap<String, Integer>();
46 servers.put("http://localhost", 80);
47 DEFAULT_SERVERS = Collections.unmodifiableMap(servers);
48 }
49
50
51 public static final String DEFAULT_ORGANIZATION_ID = "mh_default_org";
52
53
54 public static final String DEFAULT_ORGANIZATION_NAME = "Opencast Project";
55
56
57 public static final String DEFAULT_ORGANIZATION_ADMIN = "ROLE_ADMIN";
58
59
60 public static final String DEFAULT_ORGANIZATION_ANONYMOUS = "ROLE_ANONYMOUS";
61
62
63
64
65 public DefaultOrganization() {
66 super(DefaultOrganization.DEFAULT_ORGANIZATION_ID, DefaultOrganization.DEFAULT_ORGANIZATION_NAME, DEFAULT_SERVERS,
67 DefaultOrganization.DEFAULT_ORGANIZATION_ADMIN, DefaultOrganization.DEFAULT_ORGANIZATION_ANONYMOUS,
68 DEFAULT_PROPERTIES);
69 }
70
71 public DefaultOrganization(Map<String, Integer> override) {
72 super(DefaultOrganization.DEFAULT_ORGANIZATION_ID, DefaultOrganization.DEFAULT_ORGANIZATION_NAME,
73 null != override ? override : DEFAULT_SERVERS,
74 DefaultOrganization.DEFAULT_ORGANIZATION_ADMIN, DefaultOrganization.DEFAULT_ORGANIZATION_ANONYMOUS,
75 DEFAULT_PROPERTIES);
76 }
77
78 }