public abstract class LabelDebugProvider extends Object
| Modifier and Type | Class and Description |
|---|---|
static interface |
LabelDebugProvider.LabelDebugContinuation
Marker interface for a debug continuation so that label hints can survive reestablishing requests
|
| Modifier and Type | Field and Description |
|---|---|
protected static String |
MASK |
protected static String |
TRACE |
| Constructor and Description |
|---|
LabelDebugProvider() |
| Modifier and Type | Method and Description |
|---|---|
static String |
formatStackTrace(StackTraceElement[] stack,
int startFrame,
int maxFrames) |
static LabelDebugProvider |
get() |
LabelDebugProvider.LabelDebugContinuation |
getContinuation() |
List<LabelDebug> |
getLabelDebugs() |
abstract com.google.common.collect.SetMultimap<String,String> |
getUsedLabels() |
abstract boolean |
isAllowed() |
boolean |
isLabelHintRequest()
Determines if the current Request should show the Label Debugging images.
|
abstract boolean |
isTrackingLabelUsage() |
abstract String |
makeLabelHintIfRequested(String text,
String section,
String key)
Given a label reference, and it's text, possibly modify the hint to provide help
|
void |
setContinuation(LabelDebugProvider.LabelDebugContinuation continuation) |
static void |
setLabelDebugProviderEnabled(boolean enabled)
Set the debug provider to be enabled or disabled
|
static void |
setLabelDebugProviderEnabled(LabelDebugProvider provider)
Set the debug provider to be used.
|
abstract void |
setLabelHintMode(String value)
Set the label hint mode.
|
abstract boolean |
setLabelHintRequest(boolean value)
Sets the value of the current request as to whether it
|
abstract void |
setTrackingLabelUsage(boolean trackUsage)
Set whether we are tracking label usage or not
|
abstract void |
trackLabel(String section,
String key)
Mark the label as being tracked:
|
protected static final String TRACE
protected static final String MASK
public static LabelDebugProvider get()
public static void setLabelDebugProviderEnabled(boolean enabled)
public static void setLabelDebugProviderEnabled(LabelDebugProvider provider)
public abstract String makeLabelHintIfRequested(String text, String section, String key)
text - the text value of the labelsection - the section for the labelkey - the key for the labelpublic abstract boolean isAllowed()
public boolean isLabelHintRequest()
public LabelDebugProvider.LabelDebugContinuation getContinuation()
public void setContinuation(LabelDebugProvider.LabelDebugContinuation continuation)
continuation - the continuation returned from getContinuation to use to establish the request afterwardspublic abstract boolean isTrackingLabelUsage()
public abstract void setTrackingLabelUsage(boolean trackUsage)
trackUsage - whether usage should be tracked
Note: This is not threadsafe, and you should synchronize on the object before setting.public abstract void trackLabel(String section, String key)
section - the section of the labelkey - the key of the labelpublic abstract com.google.common.collect.SetMultimap<String,String> getUsedLabels()
public abstract boolean setLabelHintRequest(boolean value)
value - the value of thepublic abstract void setLabelHintMode(String value)
value - either null, TRACE or MASKpublic List<LabelDebug> getLabelDebugs()
public static String formatStackTrace(StackTraceElement[] stack, int startFrame, int maxFrames)
Copyright (c) 2016-2017, Salesforce.com, Inc. All rights reserved. Licensed under the BSD 3-Clause license. For full license text, see the LICENSE.txt file in the repository.