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

com.liferay.dynamic.data.mapping.service.DDMStructureLocalService Maven / Gradle / Ivy

There is a newer version: 7.4.3.112-ga112
Show newest version
/**
 * Copyright (c) 2000-present 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.dynamic.data.mapping.service;

import aQute.bnd.annotation.ProviderType;

import com.liferay.dynamic.data.mapping.model.DDMForm;
import com.liferay.dynamic.data.mapping.model.DDMFormLayout;
import com.liferay.dynamic.data.mapping.model.DDMStructure;

import com.liferay.exportimport.kernel.lar.PortletDataContext;

import com.liferay.portal.kernel.dao.orm.ActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.DynamicQuery;
import com.liferay.portal.kernel.dao.orm.ExportActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.IndexableActionableDynamicQuery;
import com.liferay.portal.kernel.dao.orm.Projection;
import com.liferay.portal.kernel.exception.PortalException;
import com.liferay.portal.kernel.exception.SystemException;
import com.liferay.portal.kernel.model.PersistedModel;
import com.liferay.portal.kernel.model.SystemEventConstants;
import com.liferay.portal.kernel.search.Indexable;
import com.liferay.portal.kernel.search.IndexableType;
import com.liferay.portal.kernel.service.BaseLocalService;
import com.liferay.portal.kernel.service.PersistedModelLocalService;
import com.liferay.portal.kernel.service.ServiceContext;
import com.liferay.portal.kernel.service.permission.ModelPermissions;
import com.liferay.portal.kernel.spring.aop.Skip;
import com.liferay.portal.kernel.systemevent.SystemEvent;
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.kernel.util.OrderByComparator;

import java.io.Serializable;

import java.util.List;
import java.util.Locale;
import java.util.Map;

/**
 * Provides the local service interface for DDMStructure. Methods of this
 * service will not have security checks based on the propagated JAAS
 * credentials because this service can only be accessed from within the same
 * VM.
 *
 * @author Brian Wing Shun Chan
 * @see DDMStructureLocalServiceUtil
 * @see com.liferay.dynamic.data.mapping.service.base.DDMStructureLocalServiceBaseImpl
 * @see com.liferay.dynamic.data.mapping.service.impl.DDMStructureLocalServiceImpl
 * @generated
 */
@ProviderType
@Transactional(isolation = Isolation.PORTAL, rollbackFor =  {
	PortalException.class, SystemException.class})
public interface DDMStructureLocalService extends BaseLocalService,
	PersistedModelLocalService {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify or reference this interface directly. Always use {@link DDMStructureLocalServiceUtil} to access the ddm structure local service. Add custom service methods to {@link com.liferay.dynamic.data.mapping.service.impl.DDMStructureLocalServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
	 */

	/**
	* Adds the ddm structure to the database. Also notifies the appropriate model listeners.
	*
	* @param ddmStructure the ddm structure
	* @return the ddm structure that was added
	*/
	@Indexable(type = IndexableType.REINDEX)
	public DDMStructure addDDMStructure(DDMStructure ddmStructure);

	public DDMStructure addStructure(long userId, long groupId,
		long parentStructureId, long classNameId, String structureKey,
		Map nameMap, Map descriptionMap,
		DDMForm ddmForm, DDMFormLayout ddmFormLayout, String storageType,
		int type, ServiceContext serviceContext) throws PortalException;

	/**
	* Adds a structure referencing its parent structure.
	*
	* @param userId the primary key of the structure's creator/owner
	* @param groupId the primary key of the group
	* @param parentStructureId the primary key of the parent structure
	(optionally {@link
	DDMStructureConstants#DEFAULT_PARENT_STRUCTURE_ID})
	* @param classNameId the primary key of the class name for the
	structure's related model
	* @param structureKey the unique string identifying the structure
	(optionally null)
	* @param nameMap the structure's locales and localized names
	* @param descriptionMap the structure's locales and localized
	descriptions
	* @param definition the structure's XML schema definition
	* @param storageType the structure's storage type. It can be "xml" or
	"expando". For more information, see {@link StorageType}.
	* @param type the structure's type. For more information, see {@link
	DDMStructureConstants}.
	* @param serviceContext the service context to be applied. Can set the
	UUID, creation date, modification date, guest permissions,
	and group permissions for the structure.
	* @return the structure
	* @deprecated As of Wilberforce (7.0.x), replaced by {@link
	#addStructure(long, long, long, long, String, Map, Map,
	DDMForm, DDMFormLayout, String, int, ServiceContext)}
	*/
	@Deprecated
	public DDMStructure addStructure(long userId, long groupId,
		long parentStructureId, long classNameId, String structureKey,
		Map nameMap, Map descriptionMap,
		String definition, String storageType, int type,
		ServiceContext serviceContext) throws PortalException;

	public DDMStructure addStructure(long userId, long groupId,
		long classNameId, Map nameMap,
		Map descriptionMap, DDMForm ddmForm,
		DDMFormLayout ddmFormLayout, String storageType,
		ServiceContext serviceContext) throws PortalException;

	/**
	* Adds a structure referencing a default parent structure, using the portal
	* property dynamic.data.lists.storage.type storage type and
	* default structure type.
	*
	* @param userId the primary key of the structure's creator/owner
	* @param groupId the primary key of the group
	* @param classNameId the primary key of the class name for the
	structure's related model
	* @param nameMap the structure's locales and localized names
	* @param descriptionMap the structure's locales and localized
	descriptions
	* @param definition the structure's XML schema definition
	* @param serviceContext the service context to be applied. Can set the
	UUID, creation date, modification date, guest permissions,
	and group permissions for the structure.
	* @return the structure
	* @deprecated As of Wilberforce (7.0.x), replaced by {@link
	#addStructure(long, long, long, Map, Map, DDMForm,
	DDMFormLayout, ServiceContext)}
	*/
	@Deprecated
	public DDMStructure addStructure(long userId, long groupId,
		long classNameId, Map nameMap,
		Map descriptionMap, String definition,
		ServiceContext serviceContext) throws PortalException;

	public DDMStructure addStructure(long userId, long groupId,
		String parentStructureKey, long classNameId, String structureKey,
		Map nameMap, Map descriptionMap,
		DDMForm ddmForm, DDMFormLayout ddmFormLayout, String storageType,
		int type, ServiceContext serviceContext) throws PortalException;

	/**
	* Adds a structure referencing a default parent structure if the parent
	* structure is not found.
	*
	* @param userId the primary key of the structure's creator/owner
	* @param groupId the primary key of the group
	* @param parentStructureKey the unique string identifying the parent
	structure (optionally null)
	* @param classNameId the primary key of the class name for the
	structure's related model
	* @param structureKey the unique string identifying the structure
	(optionally null)
	* @param nameMap the structure's locales and localized names
	* @param descriptionMap the structure's locales and localized
	descriptions
	* @param definition the structure's XML schema definition
	* @param storageType the structure's storage type. It can be "xml" or
	"expando". For more information, see {@link StorageType}.
	* @param type the structure's type. For more information, see {@link
	DDMStructureConstants}.
	* @param serviceContext the service context to be applied. Can set the
	UUID, creation date, modification date, guest permissions and
	group permissions for the structure.
	* @return the structure
	* @deprecated As of Wilberforce (7.0.x), replaced by {@link
	#addStructure(long, long, String, long, String, Map, Map,
	DDMForm, DDMFormLayout, String, int, ServiceContext)}
	*/
	@Deprecated
	public DDMStructure addStructure(long userId, long groupId,
		String parentStructureKey, long classNameId, String structureKey,
		Map nameMap, Map descriptionMap,
		String definition, String storageType, int type,
		ServiceContext serviceContext) throws PortalException;

	/**
	* Adds the resources to the structure.
	*
	* @param structure the structure to add resources to
	* @param addGroupPermissions whether to add group permissions
	* @param addGuestPermissions whether to add guest permissions
	*/
	public void addStructureResources(DDMStructure structure,
		boolean addGroupPermissions, boolean addGuestPermissions)
		throws PortalException;

	/**
	* Adds the model resources with the permissions to the structure.
	*
	* @param structure the structure to add resources to
	* @param modelPermissions the model permissions to be added
	*/
	public void addStructureResources(DDMStructure structure,
		ModelPermissions modelPermissions) throws PortalException;

	/**
	* Copies a structure, creating a new structure with all the values
	* extracted from the original one. The new structure supports a new name
	* and description.
	*
	* @param userId the primary key of the structure's creator/owner
	* @param structureId the primary key of the structure to be copied
	* @param nameMap the new structure's locales and localized names
	* @param descriptionMap the new structure's locales and localized
	descriptions
	* @param serviceContext the service context to be applied. Can set the
	UUID, creation date, modification date, guest permissions, and
	group permissions for the structure.
	* @return the new structure
	*/
	public DDMStructure copyStructure(long userId, long structureId,
		Map nameMap, Map descriptionMap,
		ServiceContext serviceContext) throws PortalException;

	public DDMStructure copyStructure(long userId, long structureId,
		ServiceContext serviceContext) throws PortalException;

	/**
	* Creates a new ddm structure with the primary key. Does not add the ddm structure to the database.
	*
	* @param structureId the primary key for the new ddm structure
	* @return the new ddm structure
	*/
	@Transactional(enabled = false)
	public DDMStructure createDDMStructure(long structureId);

	/**
	* Deletes the ddm structure from the database. Also notifies the appropriate model listeners.
	*
	* @param ddmStructure the ddm structure
	* @return the ddm structure that was removed
	*/
	@Indexable(type = IndexableType.DELETE)
	public DDMStructure deleteDDMStructure(DDMStructure ddmStructure);

	/**
	* Deletes the ddm structure with the primary key from the database. Also notifies the appropriate model listeners.
	*
	* @param structureId the primary key of the ddm structure
	* @return the ddm structure that was removed
	* @throws PortalException if a ddm structure with the primary key could not be found
	*/
	@Indexable(type = IndexableType.DELETE)
	public DDMStructure deleteDDMStructure(long structureId)
		throws PortalException;

	/**
	* @throws PortalException
	*/
	@Override
	public PersistedModel deletePersistedModel(PersistedModel persistedModel)
		throws PortalException;

	/**
	* Deletes the structure and its resources.
	*
	* 

* Before deleting the structure, this method verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. *

* * @param structure the structure to be deleted */ @SystemEvent(type = SystemEventConstants.TYPE_DELETE) public void deleteStructure(DDMStructure structure) throws PortalException; /** * Deletes the structure and its resources. * *

* Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. *

* * @param structureId the primary key of the structure to be deleted */ public void deleteStructure(long structureId) throws PortalException; /** * Deletes the matching structure and its resources. * *

* Before deleting the structure, the system verifies whether the structure * is required by another entity. If it is needed, an exception is thrown. *

* * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @param structureKey the unique string identifying the structure */ public void deleteStructure(long groupId, long classNameId, String structureKey) throws PortalException; /** * Deletes all the structures of the group. * *

* Before deleting the structures, the system verifies whether each * structure is required by another entity. If any of the structures are * needed, an exception is thrown. *

* * @param groupId the primary key of the group */ public void deleteStructures(long groupId) throws PortalException; public void deleteStructures(long groupId, long classNameId) throws PortalException; @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DynamicQuery dynamicQuery(); /** * Performs a dynamic query on the database and returns the matching rows. * * @param dynamicQuery the dynamic query * @return the matching rows */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List dynamicQuery(DynamicQuery dynamicQuery); /** * Performs a dynamic query on the database and returns a range of the matching rows. * *

* 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.dynamic.data.mapping.model.impl.DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. *

* * @param dynamicQuery the dynamic query * @param start the lower bound of the range of model instances * @param end the upper bound of the range of model instances (not inclusive) * @return the range of matching rows */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end); /** * Performs a dynamic query on the database and returns an ordered range of the matching rows. * *

* 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.dynamic.data.mapping.model.impl.DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. *

* * @param dynamicQuery the dynamic query * @param start the lower bound of the range of model instances * @param end the upper bound of the range of model instances (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the ordered range of matching rows */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator); /** * Returns the number of rows matching the dynamic query. * * @param dynamicQuery the dynamic query * @return the number of rows matching the dynamic query */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public long dynamicQueryCount(DynamicQuery dynamicQuery); /** * Returns the number of rows matching the dynamic query. * * @param dynamicQuery the dynamic query * @param projection the projection to apply to the query * @return the number of rows matching the dynamic query */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure fetchDDMStructure(long structureId); /** * Returns the ddm structure matching the UUID and group. * * @param uuid the ddm structure's UUID * @param groupId the primary key of the group * @return the matching ddm structure, or null if a matching ddm structure could not be found */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure fetchDDMStructureByUuidAndGroupId(String uuid, long groupId); /** * Returns the structure with the ID. * * @param structureId the primary key of the structure * @return the structure with the structure ID, or null if a matching structure could not be found */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure fetchStructure(long structureId); /** * Returns the structure matching the class name ID, structure key, and * group. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @param structureKey the unique string identifying the structure * @return the matching structure, or null if a matching structure could not be found */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure fetchStructure(long groupId, long classNameId, String structureKey); /** * Returns the structure matching the class name ID, structure key, and * group, optionally searching ancestor sites (that have sharing enabled) * and global scoped sites. * *

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

* * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @param structureKey the unique string identifying the structure * @param includeAncestorStructures whether to include ancestor sites (that have sharing enabled) and include global scoped sites in the search * @return the matching structure, or null if a matching structure could not be found */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure fetchStructure(long groupId, long classNameId, String structureKey, boolean includeAncestorStructures); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure fetchStructureByUuidAndGroupId(String uuid, long groupId, boolean includeAncestorStructures); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public ActionableDynamicQuery getActionableDynamicQuery(); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getChildrenStructures(long parentStructureId); /** * Returns all the structures matching the class name ID. * * @param companyId the primary key of the structure's company * @param classNameId the primary key of the class name for the structure's related model * @return the structures matching the class name ID */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getClassStructures(long companyId, long classNameId); /** * Returns a range of all the structures matching the class name ID. * *

* 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 QueryUtil#ALL_POS} will return the full * result set. *

* * @param companyId the primary key of the structure's company * @param classNameId the primary key of the class name for the structure's related model * @param start the lower bound of the range of structures to return * @param end the upper bound of the range of structures to return (not inclusive) * @return the range of matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getClassStructures(long companyId, long classNameId, int start, int end); /** * Returns all the structures matching the class name ID ordered by the * comparator. * * @param companyId the primary key of the structure's company * @param classNameId the primary key of the class name for the structure's related model * @param orderByComparator the comparator to order the structures (optionally null) * @return the matching structures ordered by the comparator */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getClassStructures(long companyId, long classNameId, OrderByComparator orderByComparator); /** * Returns the ddm structure with the primary key. * * @param structureId the primary key of the ddm structure * @return the ddm structure * @throws PortalException if a ddm structure with the primary key could not be found */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure getDDMStructure(long structureId) throws PortalException; /** * Returns the ddm structure matching the UUID and group. * * @param uuid the ddm structure's UUID * @param groupId the primary key of the group * @return the matching ddm structure * @throws PortalException if a matching ddm structure could not be found */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure getDDMStructureByUuidAndGroupId(String uuid, long groupId) throws PortalException; /** * Returns a range of all the ddm structures. * *

* 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not {@link com.liferay.portal.kernel.dao.orm.QueryUtil#ALL_POS}), then the query will include the default ORDER BY logic from {@link com.liferay.dynamic.data.mapping.model.impl.DDMStructureModelImpl}. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order. *

* * @param start the lower bound of the range of ddm structures * @param end the upper bound of the range of ddm structures (not inclusive) * @return the range of ddm structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getDDMStructures(int start, int end); /** * Returns all the ddm structures matching the UUID and company. * * @param uuid the UUID of the ddm structures * @param companyId the primary key of the company * @return the matching ddm structures, or an empty list if no matches were found */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getDDMStructuresByUuidAndCompanyId(String uuid, long companyId); /** * Returns a range of ddm structures matching the UUID and company. * * @param uuid the UUID of the ddm structures * @param companyId the primary key of the company * @param start the lower bound of the range of ddm structures * @param end the upper bound of the range of ddm structures (not inclusive) * @param orderByComparator the comparator to order the results by (optionally null) * @return the range of matching ddm structures, or an empty list if no matches were found */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getDDMStructuresByUuidAndCompanyId(String uuid, long companyId, int start, int end, OrderByComparator orderByComparator); /** * Returns the number of ddm structures. * * @return the number of ddm structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int getDDMStructuresCount(); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public ExportActionableDynamicQuery getExportActionableDynamicQuery( PortletDataContext portletDataContext); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery(); /** * Returns the OSGi service identifier. * * @return the OSGi service identifier */ public String getOSGiServiceIdentifier(); @Override @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException; /** * Returns the structure with the ID. * * @param structureId the primary key of the structure * @return the structure with the ID */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure getStructure(long structureId) throws PortalException; /** * Returns the structure matching the class name ID, structure key, and * group. * * @param groupId the primary key of the structure's group * @param classNameId the primary key of the class name for the structure's related model * @param structureKey the unique string identifying the structure * @return the matching structure */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure getStructure(long groupId, long classNameId, String structureKey) throws PortalException; /** * Returns the structure matching the class name ID, structure key, and * group, optionally searching ancestor sites (that have sharing enabled) * and global scoped sites. * *

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

* * @param groupId the primary key of the structure's group * @param classNameId the primary key of the class name for the structure's related model * @param structureKey the unique string identifying the structure * @param includeAncestorStructures whether to include ancestor sites (that have sharing enabled) and include global scoped sites in the search in the search * @return the matching structure */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMStructure getStructure(long groupId, long classNameId, String structureKey, boolean includeAncestorStructures) throws PortalException; /** * Returns all the structures matching the group, name, and description. * * @param groupId the primary key of the structure's group * @param name the structure's name * @param description the structure's description * @return the matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructure(long groupId, String name, String description); @Skip @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public DDMForm getStructureDDMForm(DDMStructure structure) throws PortalException; /** * Returns all the structures present in the system. * * @return the structures present in the system */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(); /** * Returns all the structures present in the group. * * @param groupId the primary key of the group * @return the structures present in the group */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long groupId); /** * Returns a range of all the structures belonging to 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 QueryUtil#ALL_POS} will return the full * result set. *

* * @param groupId the primary key of the group * @param start the lower bound of the range of structures to return * @param end the upper bound of the range of structures to return (not inclusive) * @return the range of matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long groupId, int start, int end); /** * Returns all the structures matching class name ID and group. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @return the matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long groupId, long classNameId); /** * Returns a range of all the structures that match the class name ID and * 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 QueryUtil#ALL_POS} will return the full * result set. *

* * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @param start the lower bound of the range of structures to return * @param end the upper bound of the range of structures to return (not inclusive) * @return the range of matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long groupId, long classNameId, int start, int end); /** * Returns an ordered range of all the structures matching the class name ID * and 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 QueryUtil#ALL_POS} will return the full * result set. *

* * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @param start the lower bound of the range of structures to return * @param end the upper bound of the range of structures to return (not inclusive) * @param orderByComparator the comparator to order the structures (optionally null) * @return the range of matching structures ordered by the comparator */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long groupId, long classNameId, int start, int end, OrderByComparator orderByComparator); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long groupId, String name, String description); /** * Returns all the structures belonging to the groups. * * @param groupIds the primary keys of the groups * @return the structures belonging to the groups */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long[] groupIds); /** * Returns all the structures matching the class name ID and belonging to * the groups. * * @param groupIds the primary keys of the groups * @param classNameId the primary key of the class name for the structure's related model * @return the matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long[] groupIds, long classNameId); /** * Returns a range of all the structures matching the class name ID and * belonging to the groups. * *

* 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 QueryUtil#ALL_POS} will return the full * result set. *

* * @param groupIds the primary keys of the groups * @param classNameId the primary key of the class name for the structure's related model * @param start the lower bound of the range of structures to return * @param end the upper bound of the range of structures to return (not inclusive) * @return the range of matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long[] groupIds, long classNameId, int start, int end); /** * Returns an ordered range of all the structures matching the group, class * name ID, name, and description. * *

* 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 QueryUtil#ALL_POS} will return the full * result set. *

* * @param groupIds the primary keys of the groups * @param classNameId the primary key of the class name for the structure's related model * @param name the name keywords * @param description the description keywords * @param start the lower bound of the range of structures to return * @param end the upper bound of the range of structures to return (not inclusive) * @param orderByComparator the comparator to order the structures (optionally null) * @return the range of matching structures ordered by the comparator */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List getStructures(long[] groupIds, long classNameId, String name, String description, int start, int end, OrderByComparator orderByComparator); /** * Returns the number of structures belonging to the group. * * @param groupId the primary key of the group * @return the number of structures belonging to the group */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int getStructuresCount(long groupId); /** * Returns the number of structures matching the class name ID and group. * * @param groupId the primary key of the group * @param classNameId the primary key of the class name for the structure's related model * @return the number of matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int getStructuresCount(long groupId, long classNameId); /** * Returns the number of structures matching the class name ID and belonging * to the groups. * * @param groupIds the primary keys of the groups * @param classNameId the primary key of the class name for the structure's related model * @return the number of matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int getStructuresCount(long[] groupIds, long classNameId); public String prepareLocalizedDefinitionForImport(DDMStructure structure, Locale defaultImportLocale); public void revertStructure(long userId, long structureId, String version, ServiceContext serviceContext) throws PortalException; @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List search(long companyId, long[] groupIds, long classNameId, long classPK, String keywords, int start, int end, OrderByComparator orderByComparator) throws PortalException; /** * Returns an ordered range of all the structures matching the groups and * class name IDs, and matching the keywords in the structure 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 QueryUtil#ALL_POS} will return the full * result set. *

* * @param companyId the primary key of the structure's company * @param groupIds the primary keys of the groups * @param classNameId the primary key of the class name of the model the structure is related to * @param keywords the keywords (space separated), which may occur in the structure's name or description (optionally null) * @param start the lower bound of the range of structures to return * @param end the upper bound of the range of structures to return (not inclusive) * @param orderByComparator the comparator to order the structures (optionally null) * @return the range of matching structures ordered by the comparator */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List search(long companyId, long[] groupIds, long classNameId, String keywords, int status, int start, int end, OrderByComparator orderByComparator); /** * Returns an ordered range of all the structures matching the groups, class * name IDs, name keyword, description keyword, storage type, and type. * *

* 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 QueryUtil#ALL_POS} will return the full * result set. *

* * @param companyId the primary key of the structure's company * @param groupIds the primary keys of the groups * @param classNameId the primary key of the class name of the model the structure is related to * @param name the name keywords * @param description the description keywords * @param storageType the structure's storage type. It can be "xml" or "expando". For more information, see {@link StorageType}. * @param type the structure's type. For more information, see {@link DDMStructureConstants}. * @param andOperator whether every field must match its keywords, or just one field * @param start the lower bound of the range of structures to return * @param end the upper bound of the range of structures to return (not inclusive) * @param orderByComparator the comparator to order the structures (optionally null) * @return the range of matching structures ordered by the comparator */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public List search(long companyId, long[] groupIds, long classNameId, String name, String description, String storageType, int type, int status, boolean andOperator, int start, int end, OrderByComparator orderByComparator); @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int searchCount(long companyId, long[] groupIds, long classNameId, long classPK, String keywords) throws PortalException; /** * Returns the number of structures matching the groups and class name IDs, * and matching the keywords in the structure names and descriptions. * * @param companyId the primary key of the structure's company * @param groupIds the primary keys of the groups * @param classNameId the primary key of the class name of the model the structure is related to * @param keywords the keywords (space separated), which may occur in the structure's name or description (optionally null) * @return the number of matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int searchCount(long companyId, long[] groupIds, long classNameId, String keywords, int status); /** * Returns the number of structures matching the groups, class name IDs, * name keyword, description keyword, storage type, and type * * @param companyId the primary key of the structure's company * @param groupIds the primary keys of the groups * @param classNameId * @param name the name keywords * @param description the description keywords * @param storageType the structure's storage type. It can be "xml" or "expando". For more information, see {@link StorageType}. * @param type the structure's type. For more information, see {@link DDMStructureConstants}. * @param andOperator whether every field must match its keywords, or just one field * @return the number of matching structures */ @Transactional(propagation = Propagation.SUPPORTS, readOnly = true) public int searchCount(long companyId, long[] groupIds, long classNameId, String name, String description, String storageType, int type, int status, boolean andOperator); /** * Updates the ddm structure in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners. * * @param ddmStructure the ddm structure * @return the ddm structure that was updated */ @Indexable(type = IndexableType.REINDEX) public DDMStructure updateDDMStructure(DDMStructure ddmStructure); public DDMStructure updateStructure(long userId, long structureId, DDMForm ddmForm, DDMFormLayout ddmFormLayout, ServiceContext serviceContext) throws PortalException; public DDMStructure updateStructure(long userId, long groupId, long parentStructureId, long classNameId, String structureKey, Map nameMap, Map descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, ServiceContext serviceContext) throws PortalException; public DDMStructure updateStructure(long userId, long structureId, long parentStructureId, Map nameMap, Map descriptionMap, DDMForm ddmForm, DDMFormLayout ddmFormLayout, ServiceContext serviceContext) throws PortalException; /** * Updates the structure matching the class name ID, structure key, and * group, replacing its old parent structure, name map, description map, and * XSD with new ones. * * @param groupId the primary key of the group * @param parentStructureId the primary key of the new parent structure * @param classNameId the primary key of the class name for the structure's related model * @param structureKey the unique string identifying the structure * @param nameMap the structure's new locales and localized names * @param descriptionMap the structure's new locales and localized description * @param definition the structure's new XML schema definition * @param serviceContext the service context to be applied. Can set the structure's modification date. * @return the updated structure * @deprecated As of Wilberforce (7.0.x), replaced by {@link #updateStructure(long, long, long, long, String, Map, Map, DDMForm, DDMFormLayout, ServiceContext)} */ @Deprecated public DDMStructure updateStructure(long groupId, long parentStructureId, long classNameId, String structureKey, Map nameMap, Map descriptionMap, String definition, ServiceContext serviceContext) throws PortalException; /** * Updates the structure matching the structure ID, replacing its old parent * structure, name map, description map, and XSD with new ones. * * @param structureId the primary key of the structure * @param parentStructureId the primary key of the new parent structure * @param nameMap the structure's new locales and localized names * @param descriptionMap the structure's new locales and localized descriptions * @param definition the structure's new XML schema definition * @param serviceContext the service context to be applied. Can set the structure's modification date. * @return the updated structure * @deprecated As of Wilberforce (7.0.x), replaced by {@link #updateStructure(long, long, long, Map, Map, DDMForm, DDMFormLayout, ServiceContext)} */ @Deprecated public DDMStructure updateStructure(long structureId, long parentStructureId, Map nameMap, Map descriptionMap, String definition, ServiceContext serviceContext) throws PortalException; /** * Updates the structure matching the structure ID, replacing its XSD with a * new one. * * @param structureId the primary key of the structure * @param definition the structure's new XML schema definition * @param serviceContext the service context to be applied. Can set the structure's modification date. * @return the updated structure * @deprecated As of Wilberforce (7.0.x), replaced by {@link #updateStructure(long, DDMForm, DDMFormLayout, ServiceContext)} */ @Deprecated public DDMStructure updateXSD(long structureId, String definition, ServiceContext serviceContext) throws PortalException; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy