All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.liferay.portlet.dynamicdatamapping.service.DDMTemplateService Maven / Gradle / Ivy

/**
 * Copyright (c) 2000-2013 Liferay, Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or modify it under
 * the terms of the GNU Lesser General Public License as published by the Free
 * Software Foundation; either version 2.1 of the License, or (at your option)
 * any later version.
 *
 * This library is distributed in the hope that it will be useful, but WITHOUT
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
 * FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
 * details.
 */

package com.liferay.portlet.dynamicdatamapping.service;

import aQute.bnd.annotation.ProviderType;

import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.jsonwebservice.JSONWebService;
import com.liferay.portal.kernel.transaction.Isolation;
import com.liferay.portal.kernel.transaction.Propagation;
import com.liferay.portal.kernel.transaction.Transactional;
import com.liferay.portal.security.ac.AccessControlled;
import com.liferay.portal.service.BaseService;

/**
 * Provides the remote service interface for DDMTemplate. Methods of this
 * service are expected to have security checks based on the propagated JAAS
 * credentials because this service can be accessed remotely.
 *
 * @author Brian Wing Shun Chan
 * @see DDMTemplateServiceUtil
 * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMTemplateServiceBaseImpl
 * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl
 * @generated
 */
@ProviderType
@AccessControlled
@JSONWebService
@Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
	PortalException.class, SystemException.class})
public interface DDMTemplateService extends BaseService {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link DDMTemplateServiceUtil} to access the d d m template remote service. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
	 */

	/**
	* Returns the Spring bean ID for this bean.
	*
	* @return the Spring bean ID for this bean
	*/
	public java.lang.String getBeanIdentifier();

	/**
	* Sets the Spring bean ID for this bean.
	*
	* @param beanIdentifier the Spring bean ID for this bean
	*/
	public void setBeanIdentifier(java.lang.String beanIdentifier);

	/**
	* Adds a template.
	*
	* @param groupId the primary key of the group
	* @param classNameId the primary key of the class name for template's
	related model
	* @param classPK the primary key of the template's related entity
	* @param nameMap the template's locales and localized names
	* @param descriptionMap the template's locales and localized descriptions
	* @param type the template's type. For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
	* @param mode the template's mode. For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
	* @param language the template's script language. For more information,
	see {@link
	com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
	* @param script the template's script
	* @param 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.
	* @return the template
	* @throws PortalException if the user did not have permission to add the
	template or if a portal exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
		long groupId, long classNameId, long classPK,
		java.util.Map nameMap,
		java.util.Map descriptionMap,
		java.lang.String type, java.lang.String mode,
		java.lang.String language, java.lang.String script,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Adds a template with additional parameters.
	*
	* @param groupId the primary key of the group
	* @param classNameId the primary key of the class name for template's
	related model
	* @param classPK the primary key of the template's related entity
	* @param templateKey the unique string identifying the template
	(optionally null)
	* @param nameMap the template's locales and localized names
	* @param descriptionMap the template's locales and localized descriptions
	* @param type the template's type. For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
	* @param mode the template's mode. For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
	* @param language the template's script language. For more information,
	see {@link
	com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
	* @param script the template's script
	* @param cacheable whether the template is cacheable
	* @param smallImage whether the template has a small image
	* @param smallImageURL the template's small image URL (optionally
	null)
	* @param smallImageFile the template's small image file (optionally
	null)
	* @param 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.
	* @return the template
	* @throws PortalException if the user did not have permission to add the
	template or if a portal exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate addTemplate(
		long groupId, long classNameId, long classPK,
		java.lang.String templateKey,
		java.util.Map nameMap,
		java.util.Map descriptionMap,
		java.lang.String type, java.lang.String mode,
		java.lang.String language, java.lang.String script, boolean cacheable,
		boolean smallImage, java.lang.String smallImageURL,
		java.io.File smallImageFile,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* 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.
	*
	* @param templateId the primary key of the template to be copied
	* @param nameMap the new template's locales and localized names
	* @param descriptionMap the new template's locales and localized
	descriptions
	* @param 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.
	* @return the new template
	* @throws PortalException if the user did not have permission to add the
	template or if a portal exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate(
		long templateId,
		java.util.Map nameMap,
		java.util.Map descriptionMap,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate copyTemplate(
		long templateId,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* 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.
	*
	* @param classNameId the primary key of the class name for template's
	related model
	* @param classPK the primary key of the original template's related entity
	* @param newClassPK the primary key of the new template's related entity
	* @param type the template's type. For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}.
	* @param 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.
	* @return the new template
	* @throws PortalException if the user did not have permission to add the
	template or if a portal exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public java.util.List copyTemplates(
		long classNameId, long classPK, long newClassPK, java.lang.String type,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Deletes the template and its resources.
	*
	* @param templateId the primary key of the template to be deleted
	* @throws PortalException if the user did not have permission to delete the
	template or if a portal exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public void deleteTemplate(long templateId)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the template matching the group and template key.
	*
	* @param groupId the primary key of the group
	* @param classNameId the primary key of the class name for template's
	related model
	* @param templateKey the unique string identifying the template
	* @return the matching template, or null if a matching
	template could not be found
	* @throws PortalException if the user did not have permission to view the
	template
	* @throws SystemException if a system exception occurred
	*/
	@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
	public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate fetchTemplate(
		long groupId, long classNameId, java.lang.String templateKey)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the template with the ID.
	*
	* @param templateId the primary key of the template
	* @return the template with the ID
	* @throws PortalException if the user did not have permission to view the
	template or if a matching template could not be found
	* @throws SystemException if a system exception occurred
	*/
	@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
	public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
		long templateId)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the template matching the group and template key.
	*
	* @param groupId the primary key of the group
	* @param classNameId the primary key of the class name for template's
	related model
	* @param templateKey the unique string identifying the template
	* @return the matching template
	* @throws PortalException if a matching template could not be found
	* @throws SystemException if a system exception occurred
	*/
	@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
	public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate(
		long groupId, long classNameId, java.lang.String templateKey)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException;

	/**
	* Returns the template matching the group and template key, optionally in
	* the global scope.
	*
	* 

* This method first searches in the group. If the template is still not * found and includeGlobalTemplates is set to * true, this method searches the global group. *

* * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's related model * @param templateKey the unique string identifying the template * @param includeGlobalTemplates whether to include the global scope in the search * @return the matching template * @throws PortalException if a matching template could not be found * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate getTemplate( long groupId, long classNameId, java.lang.String templateKey, boolean includeGlobalTemplates) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException; /** * Returns all the templates matching the group and class name ID. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's related model * @return the matching templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getTemplates( long groupId, long classNameId) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns all the templates matching the group, class name ID, and class * PK. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's related model * @param classPK the primary key of the template's related entity * @return the matching templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getTemplates( long groupId, long classNameId, long classPK) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns all the templates matching the class name ID, class PK, type, and * mode. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's related model * @param classPK the primary key of the template's related entity * @param type the template's type. For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @return the matching templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getTemplates( long groupId, long classNameId, long classPK, java.lang.String type) throws com.liferay.portal.kernel.exception.SystemException; @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getTemplates( long groupId, long classNameId, long classPK, java.lang.String type, java.lang.String mode) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns all the templates matching the group and class PK. * * @param groupId the primary key of the group * @param classPK the primary key of the template's related entity * @return the matching templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getTemplatesByClassPK( long groupId, long classPK) throws com.liferay.portal.kernel.exception.SystemException; /** * 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 {@link * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full * result set. *

* * @param groupId the primary key of the group * @param structureClassNameId the primary key of the class name for the template's related structure (optionally 0). Specify 0 to return generic templates only. * @param start the lower bound of the range of templates to return * @param end the upper bound of the range of templates to return (not inclusive) * @param orderByComparator the comparator to order the templates (optionally null) * @return the range of matching templates ordered by the comparator * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List getTemplatesByStructureClassNameId( long groupId, long structureClassNameId, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the number of templates matching the group and structure class * name ID plus the number of generic templates matching the group. * * @param groupId the primary key of the group * @param structureClassNameId the primary key of the class name for the template's related structure (optionally 0). Specify 0 to count generic templates only. * @return the number of matching templates plus the number of matching generic templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int getTemplatesByStructureClassNameIdCount(long groupId, long structureClassNameId) throws com.liferay.portal.kernel.exception.SystemException; /** * 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 {@link * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full * result set. *

* * @param companyId the primary key of the template's company * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's related model * @param classPK the primary key of the template's related entity * @param keywords the keywords (space separated), which may occur in the template's name or description (optionally null) * @param type the template's type (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode (optionally null) For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param start the lower bound of the range of templates to return * @param end the upper bound of the range of templates to return (not inclusive) * @param orderByComparator the comparator to order the templates (optionally null) * @return the matching templates ordered by the comparator * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List search( long companyId, long groupId, long classNameId, long classPK, java.lang.String keywords, java.lang.String type, java.lang.String mode, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * 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 {@link * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full * result set. *

* * @param companyId the primary key of the template's company * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's related model * @param classPK the primary key of the template's related entity * @param name the name keywords (optionally null) * @param description the description keywords (optionally null) * @param type the template's type (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param language the template's script language (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param andOperator whether every field must match its keywords, or just one field. * @param start the lower bound of the range of templates to return * @param end the upper bound of the range of templates to return (not inclusive) * @param orderByComparator the comparator to order the templates (optionally null) * @return the matching templates ordered by the comparator * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List search( long companyId, long groupId, long classNameId, long classPK, java.lang.String name, java.lang.String description, java.lang.String type, java.lang.String mode, java.lang.String language, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * 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 {@link * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full * result set. *

* * @param companyId the primary key of the template's company * @param groupIds the primary keys of the groups * @param classNameIds the primary keys of the entity's instances the templates are related to * @param classPKs the primary keys of the template's related entities * @param keywords the keywords (space separated), which may occur in the template's name or description (optionally null) * @param type the template's type (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param start the lower bound of the range of templates to return * @param end the upper bound of the range of templates to return (not inclusive) * @param orderByComparator the comparator to order the templates (optionally null) * @return the matching templates ordered by the comparator * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List search( long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, java.lang.String keywords, java.lang.String type, java.lang.String mode, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * 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 {@link * com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS} will return the full * result set. *

* * @param companyId the primary key of the template's company * @param groupIds the primary keys of the groups * @param classNameIds the primary keys of the entity's instances the templates are related to * @param classPKs the primary keys of the template's related entities * @param name the name keywords (optionally null) * @param description the description keywords (optionally null) * @param type the template's type (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param language the template's script language (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param andOperator whether every field must match its keywords, or just one field. * @param start the lower bound of the range of templates to return * @param end the upper bound of the range of templates to return (not inclusive) * @param orderByComparator the comparator to order the templates (optionally null) * @return the matching templates ordered by the comparator * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public java.util.List search( long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, java.lang.String name, java.lang.String description, java.lang.String type, java.lang.String mode, java.lang.String language, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException; /** * 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. * * @param companyId the primary key of the template's company * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's related model * @param classPK the primary key of the template's related entity * @param keywords the keywords (space separated), which may occur in the template's name or description (optionally null) * @param type the template's type (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @return the number of matching templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int searchCount(long companyId, long groupId, long classNameId, long classPK, java.lang.String keywords, java.lang.String type, java.lang.String mode) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the number of templates matching the group, class name ID, class * PK, name keyword, description keyword, type, mode, and language. * * @param companyId the primary key of the template's company * @param groupId the primary key of the group * @param classNameId the primary key of the class name for template's related model * @param classPK the primary key of the template's related entity * @param name the name keywords (optionally null) * @param description the description keywords (optionally null) * @param type the template's type (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param language the template's script language (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param andOperator whether every field must match its keywords, or just one field. * @return the number of matching templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int searchCount(long companyId, long groupId, long classNameId, long classPK, java.lang.String name, java.lang.String description, java.lang.String type, java.lang.String mode, java.lang.String language, boolean andOperator) throws com.liferay.portal.kernel.exception.SystemException; /** * 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. * * @param companyId the primary key of the template's company * @param groupIds the primary keys of the groups * @param classNameIds the primary keys of the entity's instances the templates are related to * @param classPKs the primary keys of the template's related entities * @param keywords the keywords (space separated), which may occur in the template's name or description (optionally null) * @param type the template's type (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @return the number of matching templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, java.lang.String keywords, java.lang.String type, java.lang.String mode) throws com.liferay.portal.kernel.exception.SystemException; /** * Returns the number of templates matching the group IDs, class name IDs, * class PK, name keyword, description keyword, type, mode, and language. * * @param companyId the primary key of the template's company * @param groupIds the primary keys of the groups * @param classNameIds the primary keys of the entity's instances the templates are related to * @param classPKs the primary keys of the template's related entities * @param name the name keywords (optionally null) * @param description the description keywords (optionally null) * @param type the template's type (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param language the template's script language (optionally null). For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param andOperator whether every field must match its keywords, or just one field. * @return the number of matching templates * @throws SystemException if a system exception occurred */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int searchCount(long companyId, long[] groupIds, long[] classNameIds, long[] classPKs, java.lang.String name, java.lang.String description, java.lang.String type, java.lang.String mode, java.lang.String language, boolean andOperator) throws com.liferay.portal.kernel.exception.SystemException; /** * Updates the template matching the ID. * * @param templateId the primary key of the template * @param classPK the primary key of the template's related entity * @param nameMap the template's new locales and localized names * @param descriptionMap the template's new locales and localized description * @param type the template's type. For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param mode the template's mode. For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param language the template's script language. For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMTemplateConstants}. * @param script the template's script * @param cacheable whether the template is cacheable * @param smallImage whether the template has a small image * @param smallImageURL the template's small image URL (optionally null) * @param smallImageFile the template's small image file (optionally null) * @param serviceContext the service context to be applied. Can set the modification date. * @return the updated template * @throws PortalException if the user did not have permission to update the template or if a portal exception occurred * @throws SystemException if a system exception occurred */ public com.liferay.portlet.dynamicdatamapping.model.DDMTemplate updateTemplate( long templateId, long classPK, java.util.Map nameMap, java.util.Map descriptionMap, java.lang.String type, java.lang.String mode, java.lang.String language, java.lang.String script, boolean cacheable, boolean smallImage, java.lang.String smallImageURL, java.io.File smallImageFile, com.liferay.portal.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy