Package icc.util
Class ArchiveFileHelper
- java.lang.Object
-
- icc.util.ArchiveFileHelper
-
public class ArchiveFileHelper extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ArchiveFileHelper()
-
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 nameboolean
deleteOldestArchive(java.lang.String pathStr, int maxSize)
Deletes the oldest file in the given directory if the amount of files exceeds the given intstatic ArchiveFileHelper
getInstance()
-
-
-
Method Detail
-
getInstance
public static ArchiveFileHelper getInstance()
-
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
- SailPointContextappName
- 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 directorymaxSize
- maximum amount of files- Returns:
- true if deletion was successful, false if limit wasn't reached or deletion failed
- Throws:
java.io.IOException
-
-