1
14
15 package com.liferay.portal.model;
16
17
22 public class RoleConstants {
23
24 public static final String ADMINISTRATOR = "Administrator";
25
26 public static final String GUEST = "Guest";
27
28 public static final String OWNER = "Owner";
29
30 public static final String POWER_USER = "Power User";
31
32 public static final String USER = "User";
33
34 public static final String[] SYSTEM_ROLES = {
35 ADMINISTRATOR, GUEST, OWNER, POWER_USER, USER
36 };
37
38 public static final String COMMUNITY_ADMINISTRATOR =
39 "Community Administrator";
40
41 public static final String COMMUNITY_MEMBER = "Community Member";
42
43 public static final String COMMUNITY_OWNER = "Community Owner";
44
45 public static final String[] SYSTEM_COMMUNITY_ROLES = {
46 COMMUNITY_ADMINISTRATOR, COMMUNITY_MEMBER, COMMUNITY_OWNER
47 };
48
49 public static final String ORGANIZATION_ADMINISTRATOR =
50 "Organization Administrator";
51
52 public static final String ORGANIZATION_MEMBER = "Organization Member";
53
54 public static final String ORGANIZATION_OWNER = "Organization Owner";
55
56 public static final String[] SYSTEM_ORGANIZATION_ROLES = {
57 ORGANIZATION_ADMINISTRATOR, ORGANIZATION_MEMBER, ORGANIZATION_OWNER
58 };
59
60 public static final int TYPE_COMMUNITY = 2;
61
62 public static final String TYPE_COMMUNITY_LABEL = "community";
63
64 public static final int TYPE_ORGANIZATION = 3;
65
66 public static final String TYPE_ORGANIZATION_LABEL = "organization";
67
68 public static final int TYPE_PROVIDER = 4;
69
70 public static final int TYPE_REGULAR = 1;
71
72 public static final String TYPE_REGULAR_LABEL = "regular";
73
74 public static String getTypeLabel(int type) {
75 if (type == TYPE_COMMUNITY) {
76 return TYPE_COMMUNITY_LABEL;
77 }
78 else if (type == TYPE_ORGANIZATION) {
79 return TYPE_ORGANIZATION_LABEL;
80 }
81 else {
82 return TYPE_REGULAR_LABEL;
83 }
84 }
85
86 }