Class NotificationFunctions

java.lang.Object
flexagon.fd.model2.notification.functions.NotificationFunctions

public class NotificationFunctions extends Object
  • Constructor Details

    • NotificationFunctions

      public NotificationFunctions()
  • Method Details

    • toPascalCase

      public String toPascalCase(String pInputString)
      Parameters:
      pInputString -
      Returns:
    • getEmailApprovalByReplySection

      public String getEmailApprovalByReplySection(NotificationPayload pPayload)
      This method is used to generate the Approval reply links for an event to attach to the event template
      Parameters:
      pPayload - Notification payload
      Returns:
      HTML for email approval links section
    • getEmailApprovalByReplySectionForManualStep

      public String getEmailApprovalByReplySectionForManualStep(NotificationPayload pPayload) throws SQLException
      Throws:
      SQLException
    • getDescriptionForInputField

      public String getDescriptionForInputField(InputField pInputField)
    • getPartialDeployProjectEnvironmentState

      public List<NotifProjectState> getPartialDeployProjectEnvironmentState(NotifProjectVersion pProjectVersion, Long pProjectId, Long pEnvironmentId, NotifPipelineStageExecInfo pNotifPipelineStageExecInfo) throws SQLException
      Gets the current project state for a particular partial deploy project version and environment
      Throws:
      SQLException
    • getFullDeployProjectEnvironmentState

      public List<NotifProjectState> getFullDeployProjectEnvironmentState(NotifProjectVersion pProjectVersion, Long pProjectId, Long pEnvironmentId, NotifPipelineStageExecInfo pNotifPipelineStageExecInfo) throws SQLException
      Gets the current project state for a particular full deploy project version and environment
      Throws:
      SQLException
    • formatDateTime

      public String formatDateTime(Timestamp pTimestamp)
      Returns date in format dd MMM, yyyy HH:mm a z
    • getFlexDeployBaseUrl

      public String getFlexDeployBaseUrl()
      Returns base FlexDeploy URL as configured in system settings
    • getFlexDeployHostname

      public String getFlexDeployHostname()
      Returns the FlexDeploy Server host name. This relies on the Server base url being configured in System Settings.
      Returns:
      The hostname of the current FlexDeploy service.
      Since:
      9.0.0.3
    • getAllEnvironments

      public List<NotifEnvironment> getAllEnvironments()
      Returns list of all environments in topology
    • getEnvironmentById

      public NotifEnvironment getEnvironmentById(Long pEnvironmentId)
      Returns environment object for environment with supplied id, or null if environment is not found
    • getEnvironmentByCode

      public NotifEnvironment getEnvironmentByCode(String pEnvironmentCode)
      Returns environment object for environment with supplied code, or null if environment is not found
    • getBuildEnvironments

      public List<NotifEnvironment> getBuildEnvironments()
      Returns list of all build environments
    • getActiveEnvironments

      public List<NotifEnvironment> getActiveEnvironments()
      Returns list of all active environments
    • getActiveBuildEnvironments

      public List<NotifEnvironment> getActiveBuildEnvironments()
      Returns list of all active build environments
    • getInstanceById

      public NotifInstance getInstanceById(Long pInstanceId)
      Returns instance object for instance with supplied id, or null if instance is not found
    • getInstanceByCode

      public NotifInstance getInstanceByCode(String pInstanceCode)
      Returns instance object for instance with supplied code, or null if instance is not found
    • isAttachLogsAlways

      public boolean isAttachLogsAlways()
      Returns true if the Attach Logs system setting is set to Always
    • isAttachLogsOnFailure

      public boolean isAttachLogsOnFailure()
      Returns true if the Attach Logs system setting is set to On Failure
    • isAttachLogsNever

      public boolean isAttachLogsNever()
      Returns true if the Attach Logs system setting is set to Never