Class OctopusValidator


  • public class OctopusValidator
    extends java.lang.Object
    Validations on input for Octopus Deploy.
    • Constructor Detail

      • OctopusValidator

        public OctopusValidator​(OctopusApi api)
    • Method Detail

      • validateProject

        public hudson.util.FormValidation validateProject​(java.lang.String projectName)
        Provides validation on a Project. Validates: Project is not empty. Project exists in Octopus. Project is appropriate case.
        Parameters:
        projectName - name of the project to validate.
        Returns:
        a form validation.
      • validateChannel

        public hudson.util.FormValidation validateChannel​(java.lang.String channelName,
                                                          java.lang.String projectName)
        Provides validation on a Channel. Validates: Project is not empty. Project exists in Octopus. Project is appropriate case. Channel is either empty or exists in Octopus
        Parameters:
        channelName - name of the channel to validate
        projectName - name of the project to validate.
        Returns:
        a form validation.
      • validateEnvironment

        public hudson.util.FormValidation validateEnvironment​(java.lang.String environmentName)
        Provides validation on an environment. Validates: Environment is not empty. Environment exists in Octopus. Environment is appropriate case.
        Parameters:
        environmentName - the name of the environment to validate.
        Returns:
        a form validation.
      • validateRelease

        public hudson.util.FormValidation validateRelease​(java.lang.String releaseVersion,
                                                          Project project,
                                                          OctopusValidator.ReleaseExistenceRequirement existenceCheckReq)
        Provides validation on releases. Validates: The project is set. The release is not empty. The release conforms to the existence check requirement.
        Parameters:
        releaseVersion - the release version.
        project - the project that this release is for.
        existenceCheckReq - the requirement for the existence of the release.
        Returns:
        FormValidation response
      • validateServerId

        public static hudson.util.FormValidation validateServerId​(java.lang.String serverId)
      • validateDirectory

        public static hudson.util.FormValidation validateDirectory​(java.lang.String directoryPath)
      • validateDeploymentTimeout

        public static hudson.util.FormValidation validateDeploymentTimeout​(java.lang.String deploymentTimeout)
      • isValidTimeSpan

        public static java.lang.Boolean isValidTimeSpan​(java.lang.String deploymentTimeout)
      • isValidDirectory

        public static java.lang.Boolean isValidDirectory​(java.lang.String path)