Class CNDocumentUploader

    • Constructor Detail

      • CNDocumentUploader

        @DataBoundConstructor
        public CNDocumentUploader​(ConnectionFactory connectionFactory,
                                  String project,
                                  String uploadPath,
                                  String description,
                                  FilePattern[] filePatterns,
                                  boolean includeBuildLog)
        Creates a new CNDocumentUploader object.
        Parameters:
        connectionFactory - connectionFactory
        project - where the build log will be uploaded.
        uploadPath - on the CollabNet server, where the build log should be uploaded.
        description - the description of the document
        filePatterns - array of FilePattern objects
        includeBuildLog - boolean flag
    • Method Detail

      • getUploadPath

        public String getUploadPath()
        Returns:
        the path where the build log is uploaded.
      • getDescription

        public String getDescription()
        Returns:
        the description of the uploaded files.
      • getFilePatterns

        public FilePattern[] getFilePatterns()
        Returns:
        the ant-style file patterns.
      • getIncludeBuildLog

        public boolean getIncludeBuildLog()
        Returns:
        true if the build log should be uploaded.
      • getRequiredMonitorService

        public BuildStepMonitor getRequiredMonitorService()
      • getMimeType

        public static String getMimeType​(FilePath filePath)
        Get the mimetype for the file.
        Parameters:
        filePath - The filePath to return the mimetype for.
        Returns:
        the string representing the mimetype of the file.
      • getMimeType

        public static String getMimeType​(File f)
        Get the mimetype for the file.
        Parameters:
        f - The file to return the mimetype for.
        Returns:
        the string representing the mimetype of the file.
      • logoff

        public void logoff()
        Log out of the collabnet server. Invalidates the cna object.