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 Object[]actions(package private) static StringDEFAULT_MESSAGE_TITLEprotected AzureStringmessage(package private) static DataStore.Field<AzureMessage.Context>MESSAGE_CONTEXTprotected 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()private static List<IAzureOperation<?>>getAncestorOperationsUtilAction(IAzureOperation<?> current)protected StringgetCause(Throwable throwable)StringgetContent()static AzureMessage.ContextgetContext()protected StringgetDetailItem(IAzureOperation<?> o)StringgetDetails()private static List<Object>getExceptionActions(Throwable throwable)private static List<IAzureOperation<?>>getExceptionOperations(Throwable throwable)protected StringgetExceptionTips(Throwable throwable)protected List<IAzureOperation<?>>getOperations()private static ThrowablegetRecognizableCause(Throwable throwable)StringgetTitle()AzureMessagesetActions(Object[] actions)private Action<?>toAction(Object action)-
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
-
MESSAGE_CONTEXT
static final DataStore.Field<AzureMessage.Context> MESSAGE_CONTEXT
-
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 protected List<IAzureOperation<?>> getOperations()
-
getAncestorOperationsUtilAction
@Nonnull private static List<IAzureOperation<?>> getAncestorOperationsUtilAction(IAzureOperation<?> current)
-
getExceptionOperations
@Nonnull private static List<IAzureOperation<?>> getExceptionOperations(@Nonnull Throwable throwable)
-
getExceptionActions
@Nonnull private static List<Object> getExceptionActions(@Nonnull Throwable throwable)
-
getTitle
@Nonnull public String getTitle()
- Specified by:
getTitlein interfaceIAzureMessage
-
getActions
@Nonnull public Action<?>[] getActions()
- Specified by:
getActionsin interfaceIAzureMessage
-
setActions
public AzureMessage setActions(Object[] actions)
-
getActionContext
@Nonnull public static AzureMessage.Context getActionContext()
-
getContext
@Nonnull public static AzureMessage.Context getContext()
-
-