Class DDMTemplateServiceWrapper

java.lang.Object
com.liferay.dynamic.data.mapping.service.DDMTemplateServiceWrapper
All Implemented Interfaces:
DDMTemplateService, com.liferay.portal.kernel.service.BaseService, com.liferay.portal.kernel.service.ServiceWrapper<DDMTemplateService>

public class DDMTemplateServiceWrapper extends Object implements DDMTemplateService, com.liferay.portal.kernel.service.ServiceWrapper<DDMTemplateService>
Provides a wrapper for DDMTemplateService.
See Also:
Generated:
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    addTemplate(String externalReferenceCode, long groupId, long classNameId, long classPK, long resourceClassNameId, String templateKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a template with additional parameters.
    addTemplate(String externalReferenceCode, long groupId, long classNameId, long classPK, long resourceClassNameId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Adds a template.
    copyTemplate(long sourceTemplateId, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    copyTemplate(long sourceTemplateId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Copies the template, creating a new template with all the values extracted from the original one.
    copyTemplates(long classNameId, long sourceClassPK, long resourceClassNameId, long targetClassPK, String type, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Copies all the templates matching the class name ID, class PK, and type.
    void
    deleteTemplate(long templateId)
    Deletes the template and its resources.
    deleteTemplate(String externalReferenceCode, long groupId)
     
    fetchTemplate(long groupId, long classNameId, String templateKey)
    Returns the template matching the group and template key.
    Returns the OSGi service identifier.
    getTemplate(long templateId)
    Returns the template with the ID.
    getTemplate(long groupId, long classNameId, String templateKey)
    Returns the template matching the group and template key.
    getTemplate(long groupId, long classNameId, String templateKey, boolean includeAncestorTemplates)
    Returns the template matching the group and template key, optionally searching ancestor sites (that have sharing enabled) and global scoped sites.
    getTemplateByExternalReferenceCode(String externalReferenceCode, long groupId)
     
    getTemplates(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
     
    getTemplates(long companyId, long groupId, long classNameId, long resourceClassNameId, int status)
     
    getTemplates(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, boolean includeAncestorTemplates, int status)
     
    getTemplates(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, int status)
     
    getTemplates(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String type, int status)
    Returns all the templates matching the group, class name ID, class PK, resource class name ID, and type.
    getTemplates(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String type, String mode, int status)
     
    getTemplatesByClassPK(long companyId, long groupId, long classPK, long resourceClassNameId, int status)
    Returns all the templates matching the group, class PK, and resource class name ID.
    getTemplatesByStructureClassNameId(long groupId, long structureClassNameId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group and structure class name ID and all the generic templates matching the group.
    int
    getTemplatesByStructureClassNameIdCount(long groupId, long structureClassNameId, int status)
    Returns the number of templates matching the group and structure class name ID plus the number of generic templates matching the group.
    int
    getTemplatesCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId)
     
     
    void
    revertTemplate(long templateId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext)
     
    search(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String keywords, String type, String mode, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group IDs, class name IDs, class PK, type, and mode, and matching the keywords in the template names and descriptions.
    search(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group IDs, class name IDs, class PK, name keyword, description keyword, type, mode, and language.
    search(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String keywords, String type, String mode, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group, class name ID, class PK, type, and mode, and matching the keywords in the template names and descriptions.
    search(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
    Returns an ordered range of all the templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, and language.
    int
    searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String keywords, String type, String mode, int status)
    Returns the number of templates matching the group IDs, class name IDs, class PK, type, and mode, and matching the keywords in the template names and descriptions.
    int
    searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator)
    Returns the number of templates matching the group IDs, class name IDs, class PK, name keyword, description keyword, type, mode, and language.
    int
    searchCount(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String keywords, String type, String mode, int status)
    Returns the number of templates matching the group, class name ID, class PK, type, and mode, and matching the keywords in the template names and descriptions.
    int
    searchCount(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator)
    Returns the number of templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, and language.
    void
     
    updateTemplate(long templateId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Updates the template matching the ID.
    updateTemplate(long templateId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, com.liferay.portal.kernel.service.ServiceContext serviceContext)
    Updates the template matching the ID.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • DDMTemplateServiceWrapper

      public DDMTemplateServiceWrapper()
    • DDMTemplateServiceWrapper

      public DDMTemplateServiceWrapper(DDMTemplateService ddmTemplateService)
  • Method Details

    • addTemplate

      public DDMTemplate addTemplate(String externalReferenceCode, long groupId, long classNameId, long classPK, long resourceClassNameId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a template.
      Specified by:
      addTemplate in interface DDMTemplateService
      Parameters:
      externalReferenceCode - the template's external reference code
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      nameMap - the template's locales and localized names
      descriptionMap - the template's locales and localized descriptions
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      script - the template's script
      serviceContext - the service context to be applied. Must have the ddmResource attribute to check permissions. Can set the UUID, creation date, modification date, guest permissions, and group permissions for the template.
      Returns:
      the template
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • addTemplate

      public DDMTemplate addTemplate(String externalReferenceCode, long groupId, long classNameId, long classPK, long resourceClassNameId, String templateKey, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Adds a template with additional parameters.
      Specified by:
      addTemplate in interface DDMTemplateService
      Parameters:
      externalReferenceCode - the template's external reference code
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      templateKey - the unique string identifying the template (optionally null)
      nameMap - the template's locales and localized names
      descriptionMap - the template's locales and localized descriptions
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      script - the template's script
      cacheable - whether the template is cacheable
      smallImage - whether the template has a small image
      smallImageURL - the template's small image URL (optionally null)
      smallImageFile - the template's small image file (optionally null)
      serviceContext - the service context to be applied. Must have the ddmResource attribute to check permissions. Can set the UUID, creation date, modification date, guest permissions, and group permissions for the template.
      Returns:
      the template
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyTemplate

      public DDMTemplate copyTemplate(long sourceTemplateId, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Copies the template, creating a new template with all the values extracted from the original one. This method supports defining a new name and description.
      Specified by:
      copyTemplate in interface DDMTemplateService
      Parameters:
      sourceTemplateId - the primary key of the template to be copied
      nameMap - the new template's locales and localized names
      descriptionMap - the new template's locales and localized descriptions
      serviceContext - the service context to be applied. Must have the ddmResource attribute to check permissions. Can set the UUID, creation date, modification date, guest permissions, and group permissions for the template.
      Returns:
      the new template
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyTemplate

      public DDMTemplate copyTemplate(long sourceTemplateId, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      copyTemplate in interface DDMTemplateService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • copyTemplates

      public List<DDMTemplate> copyTemplates(long classNameId, long sourceClassPK, long resourceClassNameId, long targetClassPK, String type, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Copies all the templates matching the class name ID, class PK, and type. This method creates new templates, extracting all the values from the old ones and updating their class PKs.
      Specified by:
      copyTemplates in interface DDMTemplateService
      Parameters:
      classNameId - the primary key of the class name for template's related model
      sourceClassPK - the primary key of the old template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      targetClassPK - the primary key of the new template's related entity
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      serviceContext - the service context to be applied. Must have the ddmResource attribute to check permissions. Can set the UUID, creation date, modification date, guest permissions, and group permissions for the template.
      Returns:
      the new template
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteTemplate

      public void deleteTemplate(long templateId) throws com.liferay.portal.kernel.exception.PortalException
      Deletes the template and its resources.
      Specified by:
      deleteTemplate in interface DDMTemplateService
      Parameters:
      templateId - the primary key of the template to be deleted
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • deleteTemplate

      public DDMTemplate deleteTemplate(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      deleteTemplate in interface DDMTemplateService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • fetchTemplate

      public DDMTemplate fetchTemplate(long groupId, long classNameId, String templateKey) throws com.liferay.portal.kernel.exception.PortalException
      Returns the template matching the group and template key.
      Specified by:
      fetchTemplate in interface DDMTemplateService
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      templateKey - the unique string identifying the template
      Returns:
      the matching template, or null if a matching template could not be found
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getOSGiServiceIdentifier

      public String getOSGiServiceIdentifier()
      Returns the OSGi service identifier.
      Specified by:
      getOSGiServiceIdentifier in interface DDMTemplateService
      Returns:
      the OSGi service identifier
    • getTemplate

      public DDMTemplate getTemplate(long templateId) throws com.liferay.portal.kernel.exception.PortalException
      Returns the template with the ID.
      Specified by:
      getTemplate in interface DDMTemplateService
      Parameters:
      templateId - the primary key of the template
      Returns:
      the template with the ID
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTemplate

      public DDMTemplate getTemplate(long groupId, long classNameId, String templateKey) throws com.liferay.portal.kernel.exception.PortalException
      Returns the template matching the group and template key.
      Specified by:
      getTemplate in interface DDMTemplateService
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      templateKey - the unique string identifying the template
      Returns:
      the matching template
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTemplate

      public DDMTemplate getTemplate(long groupId, long classNameId, String templateKey, boolean includeAncestorTemplates) throws com.liferay.portal.kernel.exception.PortalException
      Returns the template matching the group and template key, optionally searching ancestor sites (that have sharing enabled) and global scoped sites.

      This method first searches in the group. If the template is still not found and includeAncestorTemplates is set to true, this method searches the group's ancestor sites (that have sharing enabled) and lastly searches global scoped sites.

      Specified by:
      getTemplate in interface DDMTemplateService
      Parameters:
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      templateKey - the unique string identifying the template
      includeAncestorTemplates - whether to include ancestor sites (that have sharing enabled) and include global scoped sites in the search
      Returns:
      the matching template
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTemplateByExternalReferenceCode

      public DDMTemplate getTemplateByExternalReferenceCode(String externalReferenceCode, long groupId) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getTemplateByExternalReferenceCode in interface DDMTemplateService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTemplates

      public List<DDMTemplate> getTemplates(long companyId, long groupId, long classNameId, long resourceClassNameId, int status)
      Specified by:
      getTemplates in interface DDMTemplateService
    • getTemplates

      public List<DDMTemplate> getTemplates(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, boolean includeAncestorTemplates, int status) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      getTemplates in interface DDMTemplateService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getTemplates

      public List<DDMTemplate> getTemplates(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, int status)
      Specified by:
      getTemplates in interface DDMTemplateService
    • getTemplates

      public List<DDMTemplate> getTemplates(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String type, int status)
      Returns all the templates matching the group, class name ID, class PK, resource class name ID, and type.
      Specified by:
      getTemplates in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for the template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for the template's resource model
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      Returns:
      the matching templates
    • getTemplates

      public List<DDMTemplate> getTemplates(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String type, String mode, int status)
      Specified by:
      getTemplates in interface DDMTemplateService
    • getTemplates

      public List<DDMTemplate> getTemplates(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Specified by:
      getTemplates in interface DDMTemplateService
    • getTemplatesByClassPK

      public List<DDMTemplate> getTemplatesByClassPK(long companyId, long groupId, long classPK, long resourceClassNameId, int status)
      Returns all the templates matching the group, class PK, and resource class name ID.
      Specified by:
      getTemplatesByClassPK in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for the template's resource model
      Returns:
      the matching templates
    • getTemplatesByStructureClassNameId

      public List<DDMTemplate> getTemplatesByStructureClassNameId(long groupId, long structureClassNameId, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group and structure class name ID and all the generic templates matching the group.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Specified by:
      getTemplatesByStructureClassNameId in interface DDMTemplateService
      Parameters:
      groupId - the primary key of the group
      structureClassNameId - the primary key of the class name for the template's related structure (optionally 0). Specify 0 to return generic templates only.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the range of matching templates ordered by the comparator
    • getTemplatesByStructureClassNameIdCount

      public int getTemplatesByStructureClassNameIdCount(long groupId, long structureClassNameId, int status)
      Returns the number of templates matching the group and structure class name ID plus the number of generic templates matching the group.
      Specified by:
      getTemplatesByStructureClassNameIdCount in interface DDMTemplateService
      Parameters:
      groupId - the primary key of the group
      structureClassNameId - the primary key of the class name for the template's related structure (optionally 0). Specify 0 to count generic templates only.
      Returns:
      the number of matching templates plus the number of matching generic templates
    • getTemplatesCount

      public int getTemplatesCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId)
      Specified by:
      getTemplatesCount in interface DDMTemplateService
    • revertTemplate

      public void revertTemplate(long templateId, String version, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Specified by:
      revertTemplate in interface DDMTemplateService
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • search

      public List<DDMTemplate> search(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String keywords, String type, String mode, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group, class name ID, class PK, type, and mode, and matching the keywords in the template names and descriptions.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Specified by:
      search in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      keywords - the keywords (space separated), which may occur in the template's name or description (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the matching templates ordered by the comparator
    • search

      public List<DDMTemplate> search(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, and language.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Specified by:
      search in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      name - the name keywords (optionally null)
      description - the description keywords (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      andOperator - whether every field must match its keywords, or just one field.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the matching templates ordered by the comparator
    • search

      public List<DDMTemplate> search(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String keywords, String type, String mode, int status, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group IDs, class name IDs, class PK, type, and mode, and matching the keywords in the template names and descriptions.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Specified by:
      search in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupIds - the primary keys of the groups
      classNameIds - the primary keys of the entity's instances the templates are related to
      classPKs - the primary keys of the template's related entities
      resourceClassNameId - the primary key of the class name for template's resource model
      keywords - the keywords (space separated), which may occur in the template's name or description (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the matching templates ordered by the comparator
    • search

      public List<DDMTemplate> search(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator<DDMTemplate> orderByComparator)
      Returns an ordered range of all the templates matching the group IDs, class name IDs, class PK, name keyword, description keyword, type, mode, and language.

      Useful when paginating results. Returns a maximum of end - start instances. start and end are not primary keys, they are indexes in the result set. Thus, 0 refers to the first result in the set. Setting both start and end to QueryUtil#ALL_POS will return the full result set.

      Specified by:
      search in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupIds - the primary keys of the groups
      classNameIds - the primary keys of the entity's instances the templates are related to
      classPKs - the primary keys of the template's related entities
      resourceClassNameId - the primary key of the class name for template's resource model
      name - the name keywords (optionally null)
      description - the description keywords (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      andOperator - whether every field must match its keywords, or just one field.
      start - the lower bound of the range of templates to return
      end - the upper bound of the range of templates to return (not inclusive)
      orderByComparator - the comparator to order the templates (optionally null)
      Returns:
      the matching templates ordered by the comparator
    • searchCount

      public int searchCount(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String keywords, String type, String mode, int status)
      Returns the number of templates matching the group, class name ID, class PK, type, and mode, and matching the keywords in the template names and descriptions.
      Specified by:
      searchCount in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      keywords - the keywords (space separated), which may occur in the template's name or description (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      Returns:
      the number of matching templates
    • searchCount

      public int searchCount(long companyId, long groupId, long classNameId, long classPK, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator)
      Returns the number of templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, and language.
      Specified by:
      searchCount in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupId - the primary key of the group
      classNameId - the primary key of the class name for template's related model
      classPK - the primary key of the template's related entity
      resourceClassNameId - the primary key of the class name for template's resource model
      name - the name keywords (optionally null)
      description - the description keywords (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      andOperator - whether every field must match its keywords, or just one field.
      Returns:
      the number of matching templates
    • searchCount

      public int searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String keywords, String type, String mode, int status)
      Returns the number of templates matching the group IDs, class name IDs, class PK, type, and mode, and matching the keywords in the template names and descriptions.
      Specified by:
      searchCount in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupIds - the primary keys of the groups
      classNameIds - the primary keys of the entity's instances the templates are related to
      classPKs - the primary keys of the template's related entities
      resourceClassNameId - the primary key of the class name for template's resource model
      keywords - the keywords (space separated), which may occur in the template's name or description (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      Returns:
      the number of matching templates
    • searchCount

      public int searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, long resourceClassNameId, String name, String description, String type, String mode, String language, int status, boolean andOperator)
      Returns the number of templates matching the group IDs, class name IDs, class PK, name keyword, description keyword, type, mode, and language.
      Specified by:
      searchCount in interface DDMTemplateService
      Parameters:
      companyId - the primary key of the template's company
      groupIds - the primary keys of the groups
      classNameIds - the primary keys of the entity's instances the templates are related to
      classPKs - the primary keys of the template's related entities
      resourceClassNameId - the primary key of the class name for template's resource model
      name - the name keywords (optionally null)
      description - the description keywords (optionally null)
      type - the template's type (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language (optionally null). For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      andOperator - whether every field must match its keywords, or just one field.
      Returns:
      the number of matching templates
    • updateTemplate

      public DDMTemplate updateTemplate(long templateId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, boolean smallImage, String smallImageURL, File smallImageFile, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the template matching the ID.
      Specified by:
      updateTemplate in interface DDMTemplateService
      Parameters:
      templateId - the primary key of the template
      classPK - the primary key of the template's related entity
      nameMap - the template's new locales and localized names
      descriptionMap - the template's new locales and localized description
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      script - the template's script
      cacheable - whether the template is cacheable
      smallImage - whether the template has a small image
      smallImageURL - the template's small image URL (optionally null)
      smallImageFile - the template's small image file (optionally null)
      serviceContext - the service context to be applied. Can set the modification date.
      Returns:
      the updated template
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • updateTemplate

      public DDMTemplate updateTemplate(long templateId, long classPK, Map<Locale,String> nameMap, Map<Locale,String> descriptionMap, String type, String mode, String language, String script, boolean cacheable, com.liferay.portal.kernel.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException
      Updates the template matching the ID.
      Specified by:
      updateTemplate in interface DDMTemplateService
      Parameters:
      templateId - the primary key of the template
      classPK - the primary key of the template's related entity
      nameMap - the template's new locales and localized names
      descriptionMap - the template's new locales and localized description
      type - the template's type. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      mode - the template's mode. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      language - the template's script language. For more information, see DDMTemplateConstants in the dynamic-data-mapping-api module.
      script - the template's script
      cacheable - whether the template is cacheable
      serviceContext - the service context to be applied. Can set the modification date.
      Returns:
      the updated template
      Throws:
      com.liferay.portal.kernel.exception.PortalException
    • getWrappedService

      public DDMTemplateService getWrappedService()
      Specified by:
      getWrappedService in interface com.liferay.portal.kernel.service.ServiceWrapper<DDMTemplateService>
    • setWrappedService

      public void setWrappedService(DDMTemplateService ddmTemplateService)
      Specified by:
      setWrappedService in interface com.liferay.portal.kernel.service.ServiceWrapper<DDMTemplateService>