Adding support for moderation

This commit is contained in:
Luca Frosini 2021-06-16 14:49:10 +02:00
parent cd9a1069ec
commit 2537406615
2 changed files with 9 additions and 7 deletions

View File

@ -11,13 +11,13 @@ public enum CMItemVisibility {
RESTRICTED("restricted"),
PUBLIC("public");
protected static final Map<String,CMItemStatus> CM_ITEM_VISIBILITY_FROM_VALUE;
protected static final Map<String,CMItemVisibility> CM_ITEM_VISIBILITY_FROM_VALUE;
static {
CM_ITEM_VISIBILITY_FROM_VALUE = new HashMap<>();
for(CMItemStatus s : CMItemStatus.values()) {
CM_ITEM_VISIBILITY_FROM_VALUE.put(s.getValue(), s);
for(CMItemVisibility v : CMItemVisibility.values()) {
CM_ITEM_VISIBILITY_FROM_VALUE.put(v.getValue(), v);
}
}
@ -31,7 +31,7 @@ public enum CMItemVisibility {
return value;
}
public static CMItemStatus getCMItemStatusFromValue(String value) {
public static CMItemVisibility getCMItemStatusFromValue(String value) {
return CM_ITEM_VISIBILITY_FROM_VALUE.get(value);
}
}

View File

@ -20,7 +20,8 @@ public class GCatConstants {
public static final String ORGANIZATION_PARAMETER = "organization";
public static final String Q_KEY = "q";
public static final String SOCIAL_POST_PARAMETER = "social_post";
public static final String SOCIAL_POST_QUERY_PARAMETER = "social_post";
public static final String ORGANIZATION_FILTER_TEMPLATE = ORGANIZATION_PARAMETER + ":%s";
@ -30,7 +31,8 @@ public class GCatConstants {
public static final String CATALOGUE_MODERATOR = "Catalogue-Moderator";
/* Content Moderation fields */
public static final String CM_ITEM_STATUS = "system:cm_item_status";
public static final String CM_ITEM_VISIBILITY = "system:cm_item_visibility";
public static final String CM_ITEM_STATUS_QUERY_PARAMETER = "cm_item_status";
public static final String SYSTEM_CM_ITEM_STATUS = "system:cm_item_status";
public static final String SYSTEM_CM_ITEM_VISIBILITY = "system:cm_item_visibility";
}