Class ActifyDocumentProcessor


  • @Service
    public class ActifyDocumentProcessor
    extends Object
    A processor of documents with 3D images or CAD for the Actify tool. The CAD documents imported in Silverpeas are treated by this processor so that Actify can convert them into the 3D format. This 3D documents produced by Actify are then imported by Silverpeas.
    Author:
    mmoquillon
    • Constructor Detail

      • ActifyDocumentProcessor

        protected ActifyDocumentProcessor()
    • Method Detail

      • isActifySupportEnabled

        public static boolean isActifySupportEnabled()
        Is the support of CAD documents processing is enabled? If it is enabled, the Actify tool must be installed, well configured and ran on the server.
        Returns:
        true if Actify is running and ready to work with Silverpeas. False otherwise.
      • getCRONForActifyImport

        public static String getCRONForActifyImport()
        Gets the CRON instruction to schedule the import of 3D documents generated by Actify into Silverpeas.
        Returns:
        a CRON rule.
      • getCRONForActifyPurge

        public static String getCRONForActifyPurge()
        Gets the CRON instruction to schedule the purge of CAD documents scanned by Actify to generate the 3D documents.
        Returns:
        a CRON rule.
      • getActifySourcePath

        public static String getActifySourcePath()
        Gets the absolute path of the directory into which the CAD documents are uploaded and from which Actify scans for files to convert in 3D format.
        Returns:
        the absolute path of the directory containing the CAD documents to convert by Actify.
      • getActifyResultPath

        public static String getActifyResultPath()
        Gets the absolute path of the directory containing the 3D documents generated by Actify and to import in Silverpeas.
        Returns:
        the absolute path of the directory containing the 3D documents to import in Silverpeas.
      • getSupportedCADExtensions

        public static String[] getSupportedCADExtensions()
        Gets the CAD file extensions supported by Actify.
        Returns:
        an array of CAD extensions supported by Actify.
      • getDelayBeforeImport

        public static int getDelayBeforeImport()
        Gets the delay before the import of a 3D document. The delay is used to ensure the document is completely generated by Actify.
        Returns:
        the delay in minutes.
      • getDelayBeforePurge

        public static int getDelayBeforePurge()
        Gets the delay before the purge of CAD documents scanned by Actify. The delay is used to ensure the CAD documents are taken in charge by Actify before removing them. completely generated by Actify.
        Returns:
        the delay in minutes.
      • isCADDocumentSupported

        public static boolean isCADDocumentSupported​(String fileName)
        Is the specified file is a CAD document supported by Actify?
        Parameters:
        fileName - the file name.
        Returns:
        true if the file is a CAD document supported by Actify. False otherwise.
      • getProcessor

        public static ActifyDocumentProcessor getProcessor()
        Gets an instance of ActifyDocumentProcessor.
        Returns:
        an ActifyDocumentProcessor instance.
      • process

        public void process​(SimpleDocument document)
                     throws IOException
        Processes the specified CAD document by placing it in the location expected by Actify.
        Parameters:
        document - a CAD document.
        Throws:
        IOException - if an error occurs while putting the document into the expected location.