Class PortalArchiveService


  • public class PortalArchiveService
    extends BaseArchiveService
    Provides a portal archive export and import service.
    • Field Detail

      • PORTAL_CONFIG_FILENAME

        public static final String PORTAL_CONFIG_FILENAME
        The portal configuration file name
        See Also:
        Constant Field Values
      • METADATA_PORTAL_NAME

        public static final String METADATA_PORTAL_NAME
        The name of the metadata value storing the portal name of the portal to be imported
        See Also:
        Constant Field Values
    • Constructor Detail

      • PortalArchiveService

        public PortalArchiveService()
    • Method Detail

      • postExport

        protected void postExport​(Object exportObject)
        Description copied from class: BaseArchiveService
        Called after the export has been done, and the file created. Can be used to do service-specific activities such as logging.
        Overrides:
        postExport in class BaseArchiveService
        Parameters:
        exportObject - the object that was passed to exportData
      • processImportFile

        protected void processImportFile​(String fileName,
                                         byte[] fileData)
                                  throws UnsupportedEncodingException
        Description copied from class: BaseArchiveService
        For a given file in the imported archive, the service stores its contents as it sees fit, preserving what it will need to recreate entities later. This operation happens before the database transaction wrapping the actual import to the SFM database.
        Specified by:
        processImportFile in class BaseArchiveService
        Parameters:
        fileName - the full file name of the ZIP file entry (e.g. form/TestForm.pdf)
        fileData - the file data of the ZIP file entry
        Throws:
        UnsupportedEncodingException
      • performImport

        protected void performImport​(ImportAction importAction,
                                     Set<? extends Enum> importOptions,
                                     Map<String,​Object> parameters)
        Description copied from class: BaseArchiveService
        Performs the act of importing the data contained in the archive to the SFM database. When this method will be called, the caller is expected to have established a transaction, and will also handle errors thrown by this method.
        Specified by:
        performImport in class BaseArchiveService
        Parameters:
        importAction - the import action related to this import
        importOptions - the set of import options that should be applied
        parameters - optional parameters to be used during import
      • getEntityName

        protected String getEntityName()
        Description copied from class: BaseArchiveService
        Return the name identifying the individual entity being exported (e.g. for a client, the client's name)
        Specified by:
        getEntityName in class BaseArchiveService
        Returns:
        the entity name
      • exportAuditLogger

        protected void exportAuditLogger​(Object object)
        Create an entry in the audit log when an export is performed
        Specified by:
        exportAuditLogger in class BaseArchiveService
        Parameters:
        object - Object of type Portal that was exported (Optional)
        Since:
        17.10.2
      • importAuditLogger

        protected void importAuditLogger​(ImportAction importAction)
        Create an entry in the audit log when an import is performed
        Specified by:
        importAuditLogger in class BaseArchiveService
        Parameters:
        importAction - ImportAction containing action performed (required)
        Since:
        17.10.2