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
      • isGoogleAnalyticsEnabledLocal

        java.lang.Boolean isGoogleAnalyticsEnabledLocal​(ServiceInstanceConfig serviceInstanceConfig)
                                                 throws PortalException
        Returns whether the Google Analytics is enable in the given service instance or null if this property is inherited.
        Parameters:
        serviceInstanceConfig - the service instance the information will be read from.
        Returns:
        whether the Google Analytics is enable in the given service instance or null if this property is inherited.
        Throws:
        PortalException
        Since:
        8.2.0
      • isGoogleAnalyticsEnabled

        boolean isGoogleAnalyticsEnabled​(ServiceInstanceConfig serviceInstanceConfig)
                                  throws PortalException
        Returns whether the Google Analytics is enable in the given service instance.
        Parameters:
        serviceInstanceConfig - the service instance the information will be read from.
        Returns:
        whether the Google Analytics is enable in the given service instance.
        Throws:
        PortalException
        Since:
        8.2.0
      • setGoogleAnalyticsEnable

        void setGoogleAnalyticsEnable​(java.lang.Boolean enabled,
                                      ServiceInstanceConfig serviceInstanceConfig)
                               throws PortalException
        Sets whether the Google Analytics is enable in the given service instance.
        Parameters:
        enabled - the value or null to indicate the value should be inherited.
        serviceInstanceConfig - the service instance the information will be set to.
        Throws:
        PortalException
        Since:
        8.2.0