Interface IDeploymentManagerSPI

  • All Superinterfaces:
    IDeploymentManager
    All Known Implementing Classes:
    DeploymentManager

    public interface IDeploymentManagerSPI
    extends IDeploymentManager
    Interface of Deployment Manager for internal use.
    Since:
    7.1.0
    Version:
    $Revision: 24869 $ $Date: 2022-02-25 18:19:14 -0300 (Fri, 25 Feb 2022) $
    • Method Detail

      • getLastDeployInstallationId

        java.lang.String getLastDeployInstallationId()
                                              throws PortalException
        Returns the last deployment installation identifier.
        Returns:
        the last deployment installation identifier or null if there is no information about last deployment.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0
      • isInstallInProgress

        boolean isInstallInProgress()
                             throws PortalException
        Returns whether a deploy installation is in progress.
        Returns:
        true if a deploy installation is in progress and false otherwise.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0
      • changeModuleResolved

        void changeModuleResolved​(java.lang.String moduleId,
                                  ITransaction transaction)
                           throws PortalException
        Changes the resolved value of the module based on the given module identifier. If the current value is true, calling this method the current value will be changed to false. And if the current value is false, calling this method the current value will be changed to true.
        Parameters:
        moduleId - the module identifier to be changes the signal value.
        transaction - the transaction to be used to change the module signal value.
        Throws:
        PortalException - if any error occurs during the process.
        PortalObjectNotFoundException - if the module cannot be located.
        Since:
        7.1.0
      • changeComponentResolved

        void changeComponentResolved​(java.lang.String componentId,
                                     ITransaction transaction)
                              throws PortalException
        Changes the resolved value of the component based on the given component identifier. If the current value is true, calling this method the current value will be changed to false. And if the current value is false, calling this method the current value will be changed to true.
        Parameters:
        componentId - the component identifier to be changes the signal value.
        transaction - the transaction to be used to change the component signal value.
        Throws:
        PortalException - if any error occurs during the process.
        PortalObjectNotFoundException - if the component cannot be located.
        Since:
        7.1.0
      • getComponents

        java.util.List<IComponent> getComponents()
                                          throws PortalException
        Returns the list of all installed components.
        Returns:
        the list of all installed components.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0
      • updateChannelId

        void updateChannelId​(java.lang.String componentId,
                             java.lang.String channelId)
                      throws PortalException
        Updates the channelId of the given component. If the channelId parameter is assigned to another component, a PortalException will be raised.
        Parameters:
        componentId - the component identifier to be updated.
        channelId - the channelId to be assigned.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        7.1.0
      • updateChannelId

        void updateChannelId​(java.lang.String componentId,
                             java.lang.String channelId,
                             boolean allowUpdateIfChannelBelongsToOtherComponent)
                      throws PortalException
        Updates the channelId of the given component. If the channelId parameter is assigned to another component, a PortalException will be raised only if allowUpdateIfChannelBelongsToOtherComponent is set to false.
        Parameters:
        componentId - the component identifier to be updated.
        channelId - the channelId to be assigned.
        allowUpdateIfChannelBelongsToOtherComponent - true if the update is to be performed even if there is another component associated to the channel. In this case, that component will no longer be associated with the channel.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        8.0.0
      • getChannelComponent

        IComponent getChannelComponent​(java.lang.String channelId)
                                throws PortalException
        Returns the component associated to the channel.
        Parameters:
        channelId - the channel of the component searching for.
        Returns:
        the component object or null if none found.
        Throws:
        PortalException
        Since:
        8.0.0
      • createModuleDeploymentExecutionPlan

        IDeploymentExecutionPlan createModuleDeploymentExecutionPlan​(IFile moduleFolder,
                                                                     boolean forceReprocess,
                                                                     boolean syncStructure)
                                                              throws PortalException
        Creates, validates and returns a module deployment execution plan.
        Parameters:
        moduleFolder - the folder that corresponds to the module root.
        forceReprocess - indicates if must reprocess the module and its components.
        syncStructure - indicates whether the components structures will be synchronized if modified.
        Returns:
        a validated deployment execution plan.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        8.0.0
      • createModuleDeploymentExecutionPlan

        IDeploymentExecutionPlan createModuleDeploymentExecutionPlan​(IFile moduleFolder,
                                                                     boolean forceReprocess,
                                                                     boolean syncStructure,
                                                                     boolean wasClosedModule)
                                                              throws PortalException
        Creates, validates and returns a module deployment execution plan.
        Parameters:
        moduleFolder - the folder that corresponds to the module root.
        forceReprocess - indicates if must reprocess the module and its components.
        syncStructure - indicates whether the components structures will be synchronized if modified.
        wasClosedModule - Indicates whether the given module was closed before calling this method.
        Returns:
        a validated deployment execution plan.
        Throws:
        PortalException - if any error occurs during the process.
        Since:
        10.4.0
      • deployModuleSource

        void deployModuleSource​(IModule module)
                         throws PortalException
        Deploys the module source folder. If the module does not have a source folder an exception is thrown.
        Parameters:
        module - the module that needs to be deployed.
        Throws:
        PortalException
        Since:
        8.0.0
      • deployModuleSource

        void deployModuleSource​(IFile moduleSourceFolder)
                         throws PortalException
        Deploys the module source folder. If the module does not have a source folder an exception is thrown.
        Parameters:
        module - the module that needs to be deployed.
        Throws:
        PortalException
        Since:
        8.0.0
      • deployModuleSource

        void deployModuleSource​(IFile moduleSourceFolder,
                                boolean syncStructure)
                         throws PortalException
        Deploys the module source folder. If the module does not have a source folder an exception is thrown.
        Parameters:
        moduleSourceFolder - the source folder of module that needs to be deployed.
        syncStructure - true if structure should be synchronized
        Throws:
        PortalException
        Since:
        8.0.0
      • getResourceModuleId

        java.lang.String getResourceModuleId​(java.lang.String resource)
                                      throws PortalException
        Returns the module id corresponding to a resource. If no corresponding module is found, null is returned.
        Parameters:
        name -
        Returns:
        Throws:
        PortalException
        Since:
        8.0.0
      • getResources

        java.util.Set<java.lang.String> getResources​(java.net.URI basePath,
                                                     boolean recursively,
                                                     IResourceFilter resourceFilter)
                                              throws PortalException
        Returns the available resources within the given base path.

        It is important to notice that the given base path must include a scheme, which will be used to decide how and where the resources will be searched.

        Parameters:
        basePath - the base path to be used as root of search.
        recursively - indicates whether the search will be recursive.
        resourceFilter - optional resource filter to limit the resources returned.
        Returns:
        the available resources within the given base path.
        Throws:
        java.lang.IllegalArgumentException - if basePath is null.
        PortalException
        Since:
        8.0.0
      • resetDeployment

        void resetDeployment()
                      throws PortalException
        Resets the deployment status (and performs all required actions) to make a new deployment possible.
        This method can make the portal unstable. USE WITH CAUTION!
        Throws:
        PortalException
        Since:
        9.0.0
      • destroy

        void destroy()
        Destroys the Deployment Manager.
        Since:
        10.3.0