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

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

Go to download

Contains interfaces for the portal services. Interfaces are only loaded by the global class loader and are shared by all plugins.

There is a newer version: 7.0.0-nightly
Show newest version
/**
 * 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 com.liferay.portal.kernel.bean.PortalBeanLocatorUtil;
import com.liferay.portal.kernel.util.ReferenceRegistry;

/**
 * Provides the remote service utility for DDMStructure. This utility wraps
 * {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl} and is the
 * primary access point for service operations in application layer code running
 * on a remote server. 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 DDMStructureService
 * @see com.liferay.portlet.dynamicdatamapping.service.base.DDMStructureServiceBaseImpl
 * @see com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl
 * @generated
 */
public class DDMStructureServiceUtil {
	/*
	 * NOTE FOR DEVELOPERS:
	 *
	 * Never modify this class directly. Add custom service methods to {@link com.liferay.portlet.dynamicdatamapping.service.impl.DDMStructureServiceImpl} and rerun ServiceBuilder to regenerate this class.
	 */

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

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

	/**
	* 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 xsd 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
	* @throws PortalException if a user with the primary key could not be
	found, if the user did not have permission to add the structure,
	if the XSD was not well-formed, or if a portal exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
		long userId, long groupId, long classNameId,
		java.util.Map nameMap,
		java.util.Map descriptionMap,
		java.lang.String xsd,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		return getService()
				   .addStructure(userId, groupId, classNameId, nameMap,
			descriptionMap, xsd, serviceContext);
	}

	/**
	* Adds a structure referencing its parent structure.
	*
	* @param groupId the primary key of the group
	* @param parentStructureId the primary key of the parent structure
	(optionally {@link
	com.liferay.portlet.dynamicdatamapping.model.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 xsd the structure's XML schema definition
	* @param storageType the structure's storage type. It can be "xml" or
	"expando". For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
	* @param type the structure's type. For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.model.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
	* @throws PortalException if the user did not have permission to add the
	structure, if the XSD is not well formed, or if a portal
	exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
		long groupId, long parentStructureId, long classNameId,
		java.lang.String structureKey,
		java.util.Map nameMap,
		java.util.Map descriptionMap,
		java.lang.String xsd, java.lang.String storageType, int type,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		return getService()
				   .addStructure(groupId, parentStructureId, classNameId,
			structureKey, nameMap, descriptionMap, xsd, storageType, type,
			serviceContext);
	}

	/**
	* Adds a structure referencing the parent structure by its structure key.
	* In case the parent structure is not found, it uses the default parent
	* structure ID.
	*
	* @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 structure
	* @param classNameId the primary key of the class name for the structure's
	related model
	* @param structureKey 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 xsd the XML schema definition of the structure
	* @param storageType the storage type of the structure. It can be XML or
	expando. For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.storage.StorageType}.
	* @param type the structure's type. For more information, see {@link
	com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}.
	* @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 structure.
	* @return the structure
	* @throws PortalException if a user with the primary key could not be
	found, if the user did not have permission to add the structure,
	if the XSD was not well-formed, or if a portal exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure addStructure(
		long userId, long groupId, java.lang.String parentStructureKey,
		long classNameId, java.lang.String structureKey,
		java.util.Map nameMap,
		java.util.Map descriptionMap,
		java.lang.String xsd, java.lang.String storageType, int type,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		return getService()
				   .addStructure(userId, groupId, parentStructureKey,
			classNameId, structureKey, nameMap, descriptionMap, xsd,
			storageType, type, serviceContext);
	}

	/**
	* 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 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
	* @throws PortalException if the user did not have permission to add the
	structure or if a portal exception occurred
	* @throws SystemException if a system exception occurred
	*/
	public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
		long structureId,
		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 {
		return getService()
				   .copyStructure(structureId, nameMap, descriptionMap,
			serviceContext);
	}

	public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure copyStructure(
		long structureId,
		com.liferay.portal.service.ServiceContext serviceContext)
		throws com.liferay.portal.kernel.exception.PortalException,
			com.liferay.portal.kernel.exception.SystemException {
		return getService().copyStructure(structureId, serviceContext);
	}

	/**
	* 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 * @throws PortalException if the user did not have permission to delete the structure or if a portal exception occurred * @throws SystemException if a system exception occurred */ public static void deleteStructure(long structureId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { getService().deleteStructure(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 * @throws PortalException if the user did not have permission to view the structure or if a portal exception occurred * @throws SystemException if a system exception occurred */ public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure fetchStructure( long groupId, long classNameId, java.lang.String structureKey) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return getService().fetchStructure(groupId, classNameId, structureKey); } /** * Returns the structure with the ID. * * @param structureId the primary key of the structure * @return the structure with the ID * @throws PortalException if the user did not have permission to view the structure or if a structure with the ID could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( long structureId) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return getService().getStructure(structureId); } /** * 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 * @throws PortalException if the user did not have permission to view the structure or if a matching structure could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( long groupId, long classNameId, java.lang.String structureKey) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return getService().getStructure(groupId, classNameId, structureKey); } /** * Returns the structure matching the class name ID, structure key, and * group, optionally in the global scope. * *

* This method first searches in the group. If the structure is still not * found and includeGlobalStructures is set to * true, this method searches the global 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 * @param includeGlobalStructures whether to include the global scope in the search * @return the matching structure * @throws PortalException if the user did not have permission to view the structure or if a matching structure could not be found * @throws SystemException if a system exception occurred */ public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure getStructure( long groupId, long classNameId, java.lang.String structureKey, boolean includeGlobalStructures) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return getService() .getStructure(groupId, classNameId, structureKey, includeGlobalStructures); } /** * Returns all the structures in the group that the user has permission to * view. * * @param groupId the primary key of the group * @return the structures in the group that the user has permission to view * @throws SystemException if a system exception occurred */ public static java.util.List getStructures( long groupId) throws com.liferay.portal.kernel.exception.SystemException { return getService().getStructures(groupId); } /** * Returns all the structures in the groups that the user has permission to * view. * * @param groupIds the primary key of the groups * @return the structures in the groups that the user has permission to view * @throws SystemException if a system exception occurred */ public static java.util.List getStructures( long[] groupIds) throws com.liferay.portal.kernel.exception.SystemException { return getService().getStructures(groupIds); } /** * 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 * com.liferay.portal.kernel.dao.orm.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 classNameIds the primary keys of the class names of the models the structures are 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 * @throws SystemException if a system exception occurred */ public static java.util.List search( long companyId, long[] groupIds, long[] classNameIds, java.lang.String keywords, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getService() .search(companyId, groupIds, classNameIds, keywords, start, end, 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 * com.liferay.portal.kernel.dao.orm.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 classNameIds the primary keys of the class names of the models the structures are 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 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. * @param type the structure's type. For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.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 * @throws SystemException if a system exception occurred */ public static java.util.List search( long companyId, long[] groupIds, long[] classNameIds, java.lang.String name, java.lang.String description, java.lang.String storageType, int type, boolean andOperator, int start, int end, com.liferay.portal.kernel.util.OrderByComparator orderByComparator) throws com.liferay.portal.kernel.exception.SystemException { return getService() .search(companyId, groupIds, classNameIds, name, description, storageType, type, andOperator, start, end, orderByComparator); } /** * 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 classNameIds the primary keys of the class names of the models the structures are 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 * @throws SystemException if a system exception occurred */ public static int searchCount(long companyId, long[] groupIds, long[] classNameIds, java.lang.String keywords) throws com.liferay.portal.kernel.exception.SystemException { return getService() .searchCount(companyId, groupIds, classNameIds, keywords); } /** * 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 classNameIds the primary keys of the class names of the models the structure's are 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 com.liferay.portlet.dynamicdatamapping.storage.StorageType}. * @param type the structure's type. For more information, see {@link com.liferay.portlet.dynamicdatamapping.model.DDMStructureConstants}. * @param andOperator whether every field must match its keywords, or just one field * @return the number of matching structures * @throws SystemException if a system exception occurred */ public static int searchCount(long companyId, long[] groupIds, long[] classNameIds, java.lang.String name, java.lang.String description, java.lang.String storageType, int type, boolean andOperator) throws com.liferay.portal.kernel.exception.SystemException { return getService() .searchCount(companyId, groupIds, classNameIds, name, description, storageType, type, andOperator); } /** * 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 xsd the structure's new XML schema definition * @param serviceContext the service context to be applied. Can set the modification date. * @return the updated structure * @throws PortalException if the user did not have permission to update the structure or if a portal exception occurred * @throws SystemException if a system exception occurred */ public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure( long groupId, long parentStructureId, long classNameId, java.lang.String structureKey, java.util.Map nameMap, java.util.Map descriptionMap, java.lang.String xsd, com.liferay.portal.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return getService() .updateStructure(groupId, parentStructureId, classNameId, structureKey, nameMap, descriptionMap, xsd, serviceContext); } /** * Updates the structure matching the structure ID, replacing the old parent * structure ID, name map, description map, and XSD with the new values. * * @param structureId the primary key of the structure * @param parentStructureId the new parent structure primary key * @param nameMap the structure's new locales and localized names * @param descriptionMap the structure's new locales and localized description * @param xsd the new XML schema definition of the structure * @param serviceContext the service context to be applied. Can set the modification date. * @return the updated structure * @throws PortalException if the user did not have permission to update the structure or if a portal exception occurred * @throws SystemException if a system exception occurred */ public static com.liferay.portlet.dynamicdatamapping.model.DDMStructure updateStructure( long structureId, long parentStructureId, java.util.Map nameMap, java.util.Map descriptionMap, java.lang.String xsd, com.liferay.portal.service.ServiceContext serviceContext) throws com.liferay.portal.kernel.exception.PortalException, com.liferay.portal.kernel.exception.SystemException { return getService() .updateStructure(structureId, parentStructureId, nameMap, descriptionMap, xsd, serviceContext); } public static DDMStructureService getService() { if (_service == null) { _service = (DDMStructureService)PortalBeanLocatorUtil.locate(DDMStructureService.class.getName()); ReferenceRegistry.registerReference(DDMStructureServiceUtil.class, "_service"); } return _service; } /** * @deprecated As of 6.2.0 */ public void setService(DDMStructureService service) { } private static DDMStructureService _service; }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy