001
014
015 package com.liferay.portal.model;
016
017
020 public class RoleConstants {
021
022 public static final String ADMINISTRATOR = "Administrator";
023
024 public static final String GUEST = "Guest";
025
026 public static final String OWNER = "Owner";
027
028 public static final String POWER_USER = "Power User";
029
030 public static final String USER = "User";
031
032 public static final String[] SYSTEM_ROLES = {
033 ADMINISTRATOR, GUEST, OWNER, POWER_USER, USER
034 };
035
036 public static final String COMMUNITY_ADMINISTRATOR =
037 "Community Administrator";
038
039 public static final String COMMUNITY_MEMBER = "Community Member";
040
041 public static final String COMMUNITY_OWNER = "Community Owner";
042
043 public static final String[] SYSTEM_COMMUNITY_ROLES = {
044 COMMUNITY_ADMINISTRATOR, COMMUNITY_MEMBER, COMMUNITY_OWNER
045 };
046
047 public static final String ORGANIZATION_ADMINISTRATOR =
048 "Organization Administrator";
049
050 public static final String ORGANIZATION_MEMBER = "Organization Member";
051
052 public static final String ORGANIZATION_OWNER = "Organization Owner";
053
054 public static final String[] SYSTEM_ORGANIZATION_ROLES = {
055 ORGANIZATION_ADMINISTRATOR, ORGANIZATION_MEMBER, ORGANIZATION_OWNER
056 };
057
058 public static final int TYPE_COMMUNITY = 2;
059
060 public static final String TYPE_COMMUNITY_LABEL = "community";
061
062 public static final int TYPE_ORGANIZATION = 3;
063
064 public static final String TYPE_ORGANIZATION_LABEL = "organization";
065
066 public static final int TYPE_PROVIDER = 4;
067
068 public static final int TYPE_REGULAR = 1;
069
070 public static final String TYPE_REGULAR_LABEL = "regular";
071
072 public static String getTypeLabel(int type) {
073 if (type == TYPE_COMMUNITY) {
074 return TYPE_COMMUNITY_LABEL;
075 }
076 else if (type == TYPE_ORGANIZATION) {
077 return TYPE_ORGANIZATION_LABEL;
078 }
079 else {
080 return TYPE_REGULAR_LABEL;
081 }
082 }
083
084 }