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_REGULAR = 1;
69
70 public static final String TYPE_REGULAR_LABEL = "regular";
71
72 public static String getTypeLabel(int type) {
73 if (type == TYPE_COMMUNITY) {
74 return TYPE_COMMUNITY_LABEL;
75 }
76 else if (type == TYPE_ORGANIZATION) {
77 return TYPE_ORGANIZATION_LABEL;
78 }
79 else {
80 return TYPE_REGULAR_LABEL;
81 }
82 }
83
84 }