Class IntegrationDirect

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Grant authenticate​(java.lang.String login, java.lang.String password, int endpoint)
      Authenticate
      void clear​(Grant g)
      Clear cache
      void clearCache​(Grant g, boolean logout, boolean notify, int preCompile)
      Clear cache
      void clearUserCache​(Grant g, java.lang.String login, boolean logout, boolean notify)
      Clear user cache
      Message commitModule​(Grant g, java.lang.String module, java.lang.String format, java.lang.String msg)
      Git commit module
      Message deleteModule​(Grant g, java.lang.String module)
      Delete module
      Message exportModule​(Grant g, java.lang.String module, java.lang.String format, boolean zip, boolean timestamps, boolean inline)
      Export module as XML or ZIP (= XML + attached files)
      Message exportModuleData​(Grant g, java.lang.String module, java.lang.String format, boolean zip)
      Export module's data as XML or ZIP (= XML + attached files)
      Message exportObject​(Grant g, ObjectDB obj, java.lang.String id, boolean father, boolean child, java.util.Map<java.lang.String,​java.lang.String> h, FlowXML flow, int limit, boolean timestamp, boolean zip, boolean inline)
      Export object
      Message exportObject​(Grant g, java.lang.String object, boolean zip)
      Export object
      Message exportObject​(Grant g, java.lang.String object, boolean timestamps, boolean zip, boolean inline)
      Export object
      Message importADP​(Grant g, java.lang.String adp, java.io.InputStream in, java.lang.String origin, java.util.Map<java.lang.String,​java.lang.Object> params)
      Import through an adapter
      Message importCSV​(Grant g, java.lang.String object, java.io.InputStream in, java.lang.String origin, java.util.Map<java.lang.String,​java.lang.Object> params)
      CSV import
      Message importJSON​(Grant g, java.io.InputStream in, java.lang.String origin, java.util.Map<java.lang.String,​java.lang.Object> params)
      JSON import
      Message importModule​(Grant g, java.lang.String module, java.lang.String version, java.io.InputStream in, boolean zip, boolean diff)
      Import module
      Message importSAX​(com.simplicite.objects.System.XMLSupervisor xsp, java.lang.String xspId, java.io.InputStream in, java.lang.String docdir, Grant g, java.util.Map<java.lang.String,​java.lang.String> h)
      Import XML (using SAX parser) with supervision
      Message importSAX​(Grant g, java.io.InputStream in, java.lang.String docdir, java.lang.String origin, java.util.Map<java.lang.String,​java.lang.String> h)
      Import XML (using SAX parser)
      Message importXML​(com.simplicite.objects.System.XMLSupervisor xsp, java.lang.String xspId, FlowXML in, Grant g, java.util.Map<java.lang.String,​java.lang.String> h)
      Import XML with supervision
      Message importXML​(Grant g, java.io.InputStream in, java.lang.String origin, java.lang.String parser, java.util.Map<java.lang.String,​java.lang.String> h)
      Import XML
      Message importYAML​(Grant g, java.io.InputStream in, java.lang.String origin, java.util.Map<java.lang.String,​java.lang.Object> params)
      YAML import
      Message importZIP​(Grant g, java.io.InputStream in, java.lang.String origin, java.lang.String parser, java.util.Map<java.lang.String,​java.lang.String> h)
      Import ZIP
      void indexation​(Grant g, boolean reset)
      Launch (re)indexation
      java.util.Map<java.lang.String,​java.lang.String> moduleContent​(Grant g, java.lang.String id)
      Get module content
      void moduleDelete​(Grant g, java.util.Map<java.lang.String,​java.lang.String> h)
      Module delete
      Message process​(Grant g, java.lang.String service, java.io.InputStream in, java.util.Map<java.lang.String,​java.lang.Object> params, java.lang.String origin)
      Process
      void purgeExports​(Grant g)
      Purge export directory
      void purgeJobs​(Grant g)
      Purge asynchronous jobs
      void purgeLogs​(Grant g)
      Purge database logs
      void purgeRecycleBin​(Grant g)
      Purge recycle bin directory
      void purgeSupervisions​(Grant g)
      Purge import supervisions
      void purgeTempFiles​(Grant g)
      Purge temporary directory
      Message runSQLScript​(Grant g, java.lang.String datasource, java.io.InputStream in, java.lang.String origin, java.util.Map<java.lang.String,​java.lang.Object> params)
      Run SQL script
      java.lang.String runUnitTests​(Grant g, java.lang.String type, java.lang.String name)
      Run unit tests
      Message serviceManager​(Grant g, java.lang.String obj, java.lang.String service, java.lang.Object[] params)
      Service manager
      Message serviceManager​(Grant g, java.lang.String object, java.lang.String action, java.lang.String[] params)
      Service manager
      java.lang.String synchronizeDocs​(Grant g)
      (Re)synchronize documents
      • Methods inherited from class java.lang.Object

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

      • IntegrationDirect

        public IntegrationDirect()
    • Method Detail

      • authenticate

        public Grant authenticate​(java.lang.String login,
                                  java.lang.String password,
                                  int endpoint)
        Description copied from interface: IntegrationInterface
        Authenticate
        Specified by:
        authenticate in interface IntegrationInterface
        Parameters:
        login - Login
        password - Password
        endpoint - Endpoint
        Returns:
        Grant
      • clearCache

        public void clearCache​(Grant g,
                               boolean logout,
                               boolean notify,
                               int preCompile)
        Description copied from interface: IntegrationInterface
        Clear cache
        Specified by:
        clearCache in interface IntegrationInterface
        Parameters:
        g - Grant
        logout - Logout?
        notify - Notify?
        preCompile - Pre compile?
      • clearUserCache

        public void clearUserCache​(Grant g,
                                   java.lang.String login,
                                   boolean logout,
                                   boolean notify)
        Description copied from interface: IntegrationInterface
        Clear user cache
        Specified by:
        clearUserCache in interface IntegrationInterface
        Parameters:
        g - Grant
        login - Login
        logout - Logout?
        notify - Notify?
      • process

        public Message process​(Grant g,
                               java.lang.String service,
                               java.io.InputStream in,
                               java.util.Map<java.lang.String,​java.lang.Object> params,
                               java.lang.String origin)
        Description copied from interface: IntegrationInterface
        Process
        Specified by:
        process in interface IntegrationInterface
        Parameters:
        g - Grant
        service - Service
        in - Input stream
        params - Parameters
        origin - Origin
        Returns:
        Message
      • importXML

        public Message importXML​(Grant g,
                                 java.io.InputStream in,
                                 java.lang.String origin,
                                 java.lang.String parser,
                                 java.util.Map<java.lang.String,​java.lang.String> h)
        Description copied from interface: IntegrationInterface
        Import XML
        Specified by:
        importXML in interface IntegrationInterface
        Parameters:
        g - Grant
        in - XML input stream
        origin - Origin
        parser - Parser
        h - Hash of imported objects
        Returns:
        Message
      • importXML

        public Message importXML​(com.simplicite.objects.System.XMLSupervisor xsp,
                                 java.lang.String xspId,
                                 FlowXML in,
                                 Grant g,
                                 java.util.Map<java.lang.String,​java.lang.String> h)
                          throws ImportException
        Description copied from interface: IntegrationInterface
        Import XML with supervision
        Specified by:
        importXML in interface IntegrationInterface
        Parameters:
        xsp - Supervisoor
        xspId - Supervision ID
        in - XML flow
        g - Grant
        h - Hash of imported objects
        Returns:
        Message
        Throws:
        ImportException - In case of import exception
      • importSAX

        public Message importSAX​(Grant g,
                                 java.io.InputStream in,
                                 java.lang.String docdir,
                                 java.lang.String origin,
                                 java.util.Map<java.lang.String,​java.lang.String> h)
        Description copied from interface: IntegrationInterface
        Import XML (using SAX parser)
        Specified by:
        importSAX in interface IntegrationInterface
        Parameters:
        g - Grant
        in - XML input stream
        docdir - Document directory
        origin - Origin
        h - Hash of imported objects
        Returns:
        Message
      • importSAX

        public Message importSAX​(com.simplicite.objects.System.XMLSupervisor xsp,
                                 java.lang.String xspId,
                                 java.io.InputStream in,
                                 java.lang.String docdir,
                                 Grant g,
                                 java.util.Map<java.lang.String,​java.lang.String> h)
                          throws ImportException
        Description copied from interface: IntegrationInterface
        Import XML (using SAX parser) with supervision
        Specified by:
        importSAX in interface IntegrationInterface
        Parameters:
        xsp - Supervisor
        xspId - Supervision ID
        in - XML input stream
        docdir - Docuemnt directory
        g - Grant
        h - Hash of imported objects
        Returns:
        Message
        Throws:
        ImportException - In cas of import exception
      • importADP

        public Message importADP​(Grant g,
                                 java.lang.String adp,
                                 java.io.InputStream in,
                                 java.lang.String origin,
                                 java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: IntegrationInterface
        Import through an adapter
        Specified by:
        importADP in interface IntegrationInterface
        Parameters:
        g - Grant
        adp - Adapter name
        in - Input stream
        origin - origin
        params - Parameters
        Returns:
        Message
      • importZIP

        public Message importZIP​(Grant g,
                                 java.io.InputStream in,
                                 java.lang.String origin,
                                 java.lang.String parser,
                                 java.util.Map<java.lang.String,​java.lang.String> h)
        Description copied from interface: IntegrationInterface
        Import ZIP
        Specified by:
        importZIP in interface IntegrationInterface
        Parameters:
        g - Grant
        in - ZIP input stream
        origin - Origin
        parser - Parser
        h - Hash of imported objects
        Returns:
        Message
      • importCSV

        public Message importCSV​(Grant g,
                                 java.lang.String object,
                                 java.io.InputStream in,
                                 java.lang.String origin,
                                 java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: IntegrationInterface
        CSV import
        Specified by:
        importCSV in interface IntegrationInterface
        Parameters:
        g - Grant
        object - Object
        in - CSV input stream
        origin - Origin
        params - Parameters
        Returns:
        Message
      • importJSON

        public Message importJSON​(Grant g,
                                  java.io.InputStream in,
                                  java.lang.String origin,
                                  java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: IntegrationInterface
        JSON import
        Specified by:
        importJSON in interface IntegrationInterface
        Parameters:
        g - Grant
        in - JSON input stream
        origin - Origin
        params - Parameters
        Returns:
        Message
      • importYAML

        public Message importYAML​(Grant g,
                                  java.io.InputStream in,
                                  java.lang.String origin,
                                  java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: IntegrationInterface
        YAML import
        Specified by:
        importYAML in interface IntegrationInterface
        Parameters:
        g - Grant
        in - YAML input stream
        origin - Origin
        params - Parameters
        Returns:
        Message
      • runSQLScript

        public Message runSQLScript​(Grant g,
                                    java.lang.String datasource,
                                    java.io.InputStream in,
                                    java.lang.String origin,
                                    java.util.Map<java.lang.String,​java.lang.Object> params)
        Description copied from interface: IntegrationInterface
        Run SQL script
        Specified by:
        runSQLScript in interface IntegrationInterface
        Parameters:
        g - Grant
        datasource - Datasrouce name
        in - SQL script input stream
        origin - Origin
        params - Parameters
        Returns:
        Message
      • exportObject

        public Message exportObject​(Grant g,
                                    ObjectDB obj,
                                    java.lang.String id,
                                    boolean father,
                                    boolean child,
                                    java.util.Map<java.lang.String,​java.lang.String> h,
                                    FlowXML flow,
                                    int limit,
                                    boolean timestamp,
                                    boolean zip,
                                    boolean inline)
        Description copied from interface: IntegrationInterface
        Export object
        Specified by:
        exportObject in interface IntegrationInterface
        Parameters:
        g - Grant
        obj - Object
        id - Row ID
        father - Father object?
        child - Children objects?
        h - Parameters
        flow - XML flow
        limit - Limit
        timestamp - Timestamps?
        zip - ZIP?
        inline - Inline documents?
        Returns:
        Message
      • exportObject

        public Message exportObject​(Grant g,
                                    java.lang.String object,
                                    boolean timestamps,
                                    boolean zip,
                                    boolean inline)
        Description copied from interface: IntegrationInterface
        Export object
        Specified by:
        exportObject in interface IntegrationInterface
        Parameters:
        g - Grant
        object - Object name
        timestamps - Timestamps?
        zip - ZIP?
        inline - Inline documents?
        Returns:
        Message
      • moduleContent

        public java.util.Map<java.lang.String,​java.lang.String> moduleContent​(Grant g,
                                                                                    java.lang.String id)
        Description copied from interface: IntegrationInterface
        Get module content
        Specified by:
        moduleContent in interface IntegrationInterface
        Parameters:
        g - Grant
        id - Module ID
        Returns:
        Module content map
      • moduleDelete

        public void moduleDelete​(Grant g,
                                 java.util.Map<java.lang.String,​java.lang.String> h)
        Description copied from interface: IntegrationInterface
        Module delete
        Specified by:
        moduleDelete in interface IntegrationInterface
        Parameters:
        g - Grant
        h - Module content map
      • exportModule

        public Message exportModule​(Grant g,
                                    java.lang.String module,
                                    java.lang.String format,
                                    boolean zip,
                                    boolean timestamps,
                                    boolean inline)
        Description copied from interface: IntegrationInterface
        Export module as XML or ZIP (= XML + attached files)
        Specified by:
        exportModule in interface IntegrationInterface
        Parameters:
        g - Grant
        module - Module name
        format - Format (one of Integration.FORMAT_*)
        timestamps - Timestamps?
        inline - Inline documents?
        Returns:
        Message
      • exportModuleData

        public Message exportModuleData​(Grant g,
                                        java.lang.String module,
                                        java.lang.String format,
                                        boolean zip)
        Description copied from interface: IntegrationInterface
        Export module's data as XML or ZIP (= XML + attached files)
        Specified by:
        exportModuleData in interface IntegrationInterface
        Parameters:
        g - Grant
        module - Module name
        format - Format (one of Integration.FORMAT_*)
        zip - ZIP?
        Returns:
        Message
      • importModule

        public Message importModule​(Grant g,
                                    java.lang.String module,
                                    java.lang.String version,
                                    java.io.InputStream in,
                                    boolean zip,
                                    boolean diff)
        Description copied from interface: IntegrationInterface
        Import module
        Specified by:
        importModule in interface IntegrationInterface
        Parameters:
        g - Grant
        module - Module name
        version - Module version
        in - Module input stream
        zip - ZIP?
        diff - Apply diff?
        Returns:
        Message
      • commitModule

        public Message commitModule​(Grant g,
                                    java.lang.String module,
                                    java.lang.String format,
                                    java.lang.String msg)
        Description copied from interface: IntegrationInterface
        Git commit module
        Specified by:
        commitModule in interface IntegrationInterface
        Parameters:
        g - Grant
        module - Module name
        format - Format (one of Integration.FORMAT_*)
        msg - Commit message
        Returns:
        Message
      • serviceManager

        public Message serviceManager​(Grant g,
                                      java.lang.String object,
                                      java.lang.String action,
                                      java.lang.String[] params)
        Description copied from interface: IntegrationInterface
        Service manager
        Specified by:
        serviceManager in interface IntegrationInterface
        Parameters:
        g - Grant
        object - Object name
        action - Service name
        params - Service text parameters
        Returns:
        Message
      • serviceManager

        public Message serviceManager​(Grant g,
                                      java.lang.String obj,
                                      java.lang.String service,
                                      java.lang.Object[] params)
        Description copied from interface: IntegrationInterface
        Service manager
        Specified by:
        serviceManager in interface IntegrationInterface
        Parameters:
        g - Grant
        obj - Object name
        service - Service name
        params - Service parameters
        Returns:
        Message
      • runUnitTests

        public java.lang.String runUnitTests​(Grant g,
                                             java.lang.String type,
                                             java.lang.String name)
        Description copied from interface: IntegrationInterface
        Run unit tests
        Specified by:
        runUnitTests in interface IntegrationInterface
        Parameters:
        g - Grant
        type - Type
        name - Name
        Returns:
        Unit test results