Class TroubleInfo

java.lang.Object
com.tccc.kos.commons.core.service.trouble.TroubleInfo

public class TroubleInfo extends Object
Information about how to display a trouble to the user. This is generally provided by an external data file which makes it easy to manage all of these settings from a single place without having to change code.

This information is added to a trouble when it is added to TroubleService using an associated TroubleInfoFactory.

The fields included in this class need not be used, but exist with the following intents, some of which are implemented in the ui SDK:

  • visibleRole: The minimum user role that this trouble is visible to. This allows trouble visibility to be controlled by developer defined roles.
  • actionRole: The minimum user role that can resolve this trouble (if the trouble is resolvable). This allows troubles to be visible to some user rules but only be resolved by higher roles. If not specified, this is assumed to be equal to visibleRole.
  • rank: A rank used for sorting. This is commonly used as a fine grained equivalent to severity.
  • color: A color hint for the trouble. The format of data in this field is application specific.
Since:
1.0
Version:
2022-09-17
  • Constructor Details

    • TroubleInfo

      public TroubleInfo()
  • Method Details

    • getVisibleRole

      public String getVisibleRole()
    • getActionRole

      public String getActionRole()
    • getRank

      public int getRank()
    • getColor

      public String getColor()
    • setVisibleRole

      public void setVisibleRole(String visibleRole)
    • setActionRole

      public void setActionRole(String actionRole)
    • setRank

      public void setRank(int rank)
    • setColor

      public void setColor(String color)