Package icc.util

Class ArchiveFileHelper


  • public class ArchiveFileHelper
    extends java.lang.Object
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String archiveFile​(sailpoint.api.SailPointContext context, java.lang.String appName)
      Creates zip archive of the input file of the given application name
      boolean deleteOldestArchive​(java.lang.String pathStr, int maxSize)
      Deletes the oldest file in the given directory if the amount of files exceeds the given int
      static ArchiveFileHelper getInstance()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ArchiveFileHelper

        public ArchiveFileHelper()
    • Method Detail

      • archiveFile

        public java.lang.String archiveFile​(sailpoint.api.SailPointContext context,
                                            java.lang.String appName)
                                     throws java.io.IOException,
                                            sailpoint.tools.GeneralException
        Creates zip archive of the input file of the given application name
        Parameters:
        context - SailPointContext
        appName - Application name
        Returns:
        the path of the created archive
        Throws:
        java.io.IOException
        sailpoint.tools.GeneralException
      • deleteOldestArchive

        public boolean deleteOldestArchive​(java.lang.String pathStr,
                                           int maxSize)
                                    throws java.io.IOException
        Deletes the oldest file in the given directory if the amount of files exceeds the given int
        Parameters:
        pathStr - path of the directory
        maxSize - maximum amount of files
        Returns:
        true if deletion was successful, false if limit wasn't reached or deletion failed
        Throws:
        java.io.IOException