Class AzureMessage
- java.lang.Object
-
- com.microsoft.azure.toolkit.lib.common.messager.AzureMessage
-
- All Implemented Interfaces:
IAzureMessage
- Direct Known Subclasses:
AzureHtmlMessage
public class AzureMessage extends Object implements IAzureMessage
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classAzureMessage.Context-
Nested classes/interfaces inherited from interface com.microsoft.azure.toolkit.lib.common.messager.IAzureMessage
IAzureMessage.Type, IAzureMessage.ValueDecorator
-
-
Field Summary
Fields Modifier and Type Field Description protected Action<?>[]actions(package private) static StringDEFAULT_MESSAGE_TITLEprotected AzureStringmessageprotected Objectpayloadprotected Stringtitleprotected IAzureMessage.Typetypeprotected IAzureMessage.ValueDecoratorvalueDecorator
-
Constructor Summary
Constructors Constructor Description AzureMessage()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringdecorateValue(Object p, java.util.function.Supplier<String> dft)static AzureMessage.ContextgetActionContext()Action<?>[]getActions()protected StringgetCause(Throwable throwable)StringgetContent()static AzureMessage.ContextgetContext()static AzureMessage.ContextgetContext(IAzureOperation operation)private static List<IAzureOperation>getContextOperations()protected StringgetDetailItem(IAzureOperation o)StringgetDetails()protected StringgetErrorAction(Throwable throwable)private static List<IAzureOperation>getExceptionOperations(Throwable throwable)protected List<IAzureOperation>getOperations()private static ThrowablegetRecognizableCause(Throwable throwable)StringgetTitle()-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.microsoft.azure.toolkit.lib.common.messager.IAzureMessage
decorateText, getMessage, getPayload, getType, show, show
-
-
-
-
Field Detail
-
DEFAULT_MESSAGE_TITLE
static final String DEFAULT_MESSAGE_TITLE
- See Also:
- Constant Field Values
-
type
@Nonnull protected final IAzureMessage.Type type
-
message
@Nonnull protected final AzureString message
-
valueDecorator
protected IAzureMessage.ValueDecorator valueDecorator
-
-
Method Detail
-
getContent
@Nonnull public String getContent()
- Specified by:
getContentin interfaceIAzureMessage
-
getDetails
public String getDetails()
-
getDetailItem
protected String getDetailItem(IAzureOperation o)
-
decorateValue
@Nullable public String decorateValue(@Nonnull Object p, @Nullable java.util.function.Supplier<String> dft)
- Specified by:
decorateValuein interfaceIAzureMessage- Returns:
- null if not decoratable
-
getRecognizableCause
@Nullable private static Throwable getRecognizableCause(@Nonnull Throwable throwable)
-
getOperations
@Nonnull @Cacheable(cacheName="message/operations", key="${this.hashCode()}") protected List<IAzureOperation> getOperations()
-
getContextOperations
@Nonnull private static List<IAzureOperation> getContextOperations()
-
getExceptionOperations
@Nonnull private static List<IAzureOperation> getExceptionOperations(@Nonnull Throwable throwable)
-
getTitle
@Nonnull public String getTitle()
- Specified by:
getTitlein interfaceIAzureMessage
-
getActions
@Nonnull public Action<?>[] getActions()
- Specified by:
getActionsin interfaceIAzureMessage
-
getContext
@Nonnull public static AzureMessage.Context getContext()
-
getActionContext
@Nonnull public static AzureMessage.Context getActionContext()
-
getContext
@Nonnull public static AzureMessage.Context getContext(@Nullable IAzureOperation operation)
-
-