public final class PermissionApiPublisher
extends java.lang.Object
window.MBAPI.permission
window.MBAPI.permission.getPermission(thePermission)
for example)Constructor and Description |
---|
PermissionApiPublisher() |
Modifier and Type | Method and Description |
---|---|
static java.util.Collection<java.lang.String> |
getAvailablePermissions()
Get all permissions that are set
|
static java.util.Collection<java.lang.String> |
getAvailableSystemProperties()
Get all available system properties
|
static java.lang.String |
getSystemProperty(java.lang.String theSystemProperty)
Get a system property
|
static boolean |
isSystemPropertyEnabled(java.lang.String theSystemProperty)
Is a system property enabled?
|
static void |
setSubstitutionSearchProperty(com.google.gwt.core.client.JavaScriptObject thePropertyMap,
com.google.gwt.core.client.JavaScriptObject theCallback)
Sets a search substitution property.
|
static void |
setupJavascriptAPIs() |
public static void setupJavascriptAPIs()
public static void setSubstitutionSearchProperty(com.google.gwt.core.client.JavaScriptObject thePropertyMap, com.google.gwt.core.client.JavaScriptObject theCallback)
function main()
{
context.getUser().addAllToSubstitutionMap({"brands":"Get Set,Lumi,Captain's Gin"});
return JSON.stringify(aReplacementMap);
}
main();
Example javascript call to setup Captain's Gin as the value used to substitute in search when searching for $brands
MBAPI.permission.setSubstitutionSearchProperty({'$brands':'Captain's Gin'})
thePropertyMap
- map of substitutions to use, formatted like: {"$group":"substituted group name","$username":"new boy"}theCallback
- callback method to inform when we've set the appropriate entries both client and server sidepublic static java.lang.String getSystemProperty(java.lang.String theSystemProperty)
theSystemProperty
- the system propertypublic static boolean isSystemPropertyEnabled(java.lang.String theSystemProperty)
theSystemProperty
- public static java.util.Collection<java.lang.String> getAvailablePermissions()
public static java.util.Collection<java.lang.String> getAvailableSystemProperties()
Copyright © 2023 MediaBeacon, Inc. All Rights Reserved.