Package com.day.cq.wcm.commons.status
Class EditorResourceStatus
- java.lang.Object
 - 
- com.day.cq.wcm.commons.status.EditorResourceStatus
 
 
- 
- All Implemented Interfaces:
 ResourceStatus
public class EditorResourceStatus extends java.lang.Object implements ResourceStatus
Implementation of a
ResourceStatusfor resources that are authored in the Editor (such as pages or templates).EditorResourceStatuses are retrieved and displayed in a status bar in the Editor.An
EditorResourceStatusconsists of the following information:- A title describing the module or feature the status is associated with
 - A message containing the status information
 - A priority (see 
ResourceStatus.getPriority()) - A variant describing the nature of the status (see 
EditorResourceStatus.Variant) - An icon (optional, see 
getIcon()) - A list of actions rendered as clickable links (optional, see 
EditorResourceStatus.Action) - Additional data associated with the status (optional)
 
- See Also:
 com.adobe.granite.resourcestatus,ResourceStatus
 
- 
- 
Nested Class Summary
Nested Classes Modifier and Type Class Description static classEditorResourceStatus.ActionDefines an action for anEditorResourceStatus.static classEditorResourceStatus.BuilderBuilder class to buildEditorResourceStatusinstances.static classEditorResourceStatus.VariantDefines the possible variants of statuses, in line with CoralUI.Alert variants. 
- 
Constructor Summary
Constructors Constructor Description EditorResourceStatus(java.lang.String type, java.lang.String title, java.lang.String message, java.lang.Integer priority, EditorResourceStatus.Variant variant, java.lang.String icon, java.util.List<EditorResourceStatus.Action> actions, java.util.Map<java.lang.String,java.lang.Object> data)Creates a status. 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<EditorResourceStatus.Action>getActions()Returns the actions of this status.java.util.Map<java.lang.String,java.lang.Object>getAdditionalData()Returns the additional data defined for this status, corresponding to the data that was added usingEditorResourceStatus.Builder.addData(String, Object).java.util.Map<java.lang.String,java.lang.Object>getData()Returns an unmodifiable map containing the status information and data needed to render this status.java.lang.StringgetIcon()Returns the name of a CoralUI icon to be displayed in the status.java.lang.StringgetMessage()Returns the status message.intgetPriority()Returns the priority of this status corresponding to its importance (Integer.MAX_VALUEbeing the highest priority).java.lang.StringgetResourceSuperType()Returns the resource super type to render this status.java.lang.StringgetResourceType()Returns the resource type to render this status.java.lang.StringgetTitle()Returns the title of this status, which describes the module or feature the status is associated with.java.lang.StringgetType()Returns the type of this status defining the module or feature this status is associated with.EditorResourceStatus.VariantgetVariant()Returns the variant of this status. 
 - 
 
- 
- 
Constructor Detail
- 
EditorResourceStatus
public EditorResourceStatus(@Nonnull java.lang.String type, @Nonnull java.lang.String title, @Nonnull java.lang.String message, @Nullable java.lang.Integer priority, @Nullable EditorResourceStatus.Variant variant, @Nullable java.lang.String icon, @Nullable java.util.List<EditorResourceStatus.Action> actions, @Nullable java.util.Map<java.lang.String,java.lang.Object> data)Creates a status.- Parameters:
 type- the status type (seeResourceStatus.getType())title- the titlemessage- the messagepriority- the priority ornullvariant- the variant ornullicon- the icon ornullactions- a list of actions ornulldata- additional status data ornull- See Also:
 EditorResourceStatus
 
 - 
 
- 
Method Detail
- 
getType
@Nonnull public java.lang.String getType()
Description copied from interface:ResourceStatusReturns the type of this status defining the module or feature this status is associated with.- Specified by:
 getTypein interfaceResourceStatus- Returns:
 - the status type
 - See Also:
 ResourceStatusProvider.getType()
 
- 
getPriority
public int getPriority()
Description copied from interface:ResourceStatusReturns the priority of this status corresponding to its importance (Integer.MAX_VALUEbeing the highest priority).- Specified by:
 getPriorityin interfaceResourceStatus- Returns:
 - the status priority
 
 
- 
getData
@Nullable public java.util.Map<java.lang.String,java.lang.Object> getData()
Description copied from interface:ResourceStatusReturns an unmodifiable map containing the status information and data needed to render this status.- Specified by:
 getDatain interfaceResourceStatus- Returns:
 - a map containing key/value pairs
 
 
- 
getResourceType
@Nullable public java.lang.String getResourceType()
Description copied from interface:ResourceStatusReturns the resource type to render this status.- Specified by:
 getResourceTypein interfaceResourceStatus- Returns:
 - a resource type or 
null 
 
- 
getResourceSuperType
@Nullable public java.lang.String getResourceSuperType()
Description copied from interface:ResourceStatusReturns the resource super type to render this status.- Specified by:
 getResourceSuperTypein interfaceResourceStatus- Returns:
 - a resource super type or 
null 
 
- 
getTitle
@Nonnull public java.lang.String getTitle()
Returns the title of this status, which describes the module or feature the status is associated with. In contrast to the the status type (seegetType()), the title is meant to be displayed in the user interface.- Returns:
 - the status title
 
 
- 
getMessage
public java.lang.String getMessage()
Returns the status message.- Returns:
 - the status message
 
 
- 
getVariant
@Nonnull public EditorResourceStatus.Variant getVariant()
Returns the variant of this status.- Returns:
 - the status variant
 - See Also:
 EditorResourceStatus.Variant
 
- 
getIcon
@Nullable public java.lang.String getIcon()
Returns the name of a CoralUI icon to be displayed in the status. If no icon is set, then a default icon is assumed (depending on the specifiedEditorResourceStatus.Variant).- Returns:
 - the status icon or 
null 
 
- 
getAdditionalData
@Nonnull public java.util.Map<java.lang.String,java.lang.Object> getAdditionalData()
Returns the additional data defined for this status, corresponding to the data that was added usingEditorResourceStatus.Builder.addData(String, Object). In contrast,getData()returns a map containing all information defining this status (i.e. including title, message etc).- Returns:
 - the additional data of this status
 
 
- 
getActions
@Nonnull public java.util.List<EditorResourceStatus.Action> getActions()
Returns the actions of this status.- Returns:
 - a list of actions
 - See Also:
 EditorResourceStatus.Action
 
 - 
 
 -