Interface IServiceInstanceManagerSPI

    • Method Detail

      • existsRestShortName

        boolean existsRestShortName​(java.lang.String restShortName,
                                    java.lang.String serviceInstanceIdToIgnore,
                                    java.lang.String parentChannelId,
                                    ITransaction transaction)
                             throws PortalException
        Verify if a given name exists.
        Parameters:
        restShortName - rest short name of the service instance.
        serviceInstanceIdToIgnore - service instance id that will not include on the search.
        parentChannelId - the channelId of in which the service instance is/(will be) persisted
        transaction - transaction used to perform the query.
        Returns:
        true if the name exists otherwise false.
        Throws:
        PortalException - if any other error occurs during the process.
      • getByRestShortName

        ServiceInstanceConfig getByRestShortName​(java.lang.String restShortName,
                                                 ITransaction transaction)
                                          throws PortalException
        Get the service's instance by rest short name. This will only return valid rest service instances(i.e. instances in a template channel will be ignored).
        Parameters:
        restShortName - rest short name of the service instance.
        transaction - transaction used to perform the query.
        Returns:
        the serviceInstanceConfig that represents the service instance.
        Throws:
        PortalException - if any other error occurs during the process.
      • serializeFileTransformations

        void serializeFileTransformations​(SessionConfig sessionConfig,
                                          java.lang.String serviceInstanceId,
                                          java.io.OutputStream outputStream,
                                          ITransaction transaction)
                                   throws ManagerException,
                                          PortalException
        serialize a fileTransformation to be used in a new channel created from channel template.
        Parameters:
        sessionConfig - user session information.
        serviceInstanceId - new serviceInstance´s id
        outputStream - the outputstream to serialize the data to.
        transaction - transaction used to perform the query.
        Throws:
        ManagerException - if an error occurs during the process
        PortalException - if an error occurs during the process
        Since:
        6.2.0
      • getServiceInstancesIdsByAutoAdminPageId

        java.util.Collection<java.lang.String> getServiceInstancesIdsByAutoAdminPageId​(java.lang.String pageId,
                                                                                       ITransaction transaction)
                                                                                throws PortalException
        Returns the service instance ids that use the indicated page id as the auto administration page.
        Parameters:
        pageId - to be looked for
        transaction -
        Returns:
        collection of service instance ids that contain the page id as its auto administration page.
        Throws:
        PortalException
        Since:
        7.0.0
      • clearAppropriateAutoAdministrationsPerPageIdCache

        void clearAppropriateAutoAdministrationsPerPageIdCache​(ServiceInstanceConfig serviceInstanceConfig,
                                                               ITransaction transaction)
                                                        throws PortalException
        Clears the entry in the cacheAutoAdministrationPageIds cache if the service config is an instance of a an auto-administration service.
        Parameters:
        serviceInstanceConfig - service instance to be evaluated.
        transaction - under which the method should happen.
        Throws:
        PortalException
        Since:
        7.0.0
      • getMenuXml

        java.lang.String getMenuXml​(java.lang.String serviceInstanceId)
                             throws PortalException
        Returns the configuration menu in XML for a service instance.
        Parameters:
        serviceInstanceId - the service instance identifier.
        Returns:
        the menu in XML.
        Throws:
        PortalException - if the menu could not be generated.
        Since:
        8.2.0
      • getServiceInstancesByServiceAndWebsite

        java.util.Collection<ServiceInstanceConfig> getServiceInstancesByServiceAndWebsite​(java.lang.String serviceId,
                                                                                           java.lang.String websiteId)
                                                                                    throws PortalException
        Returns all instances of a given service inside a given website. If the website's channel has in it's tree another website, the other website's channel tree will be ignored. Also, ignores channel templates trees.
        Parameters:
        serviceId - the service identifier
        websiteId - the website identifier
        Returns:
        all instances of a given service inside a given website.
        Throws:
        PortalException
        Since:
        16.0.0