com.liferay.portal.kernel.service.UserGroupService Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of com.liferay.portal.kernel Show documentation
Show all versions of com.liferay.portal.kernel Show documentation
Contains interfaces for the portal services. Interfaces are only loaded by the global class loader and are shared by all plugins.
/**
* 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.portal.kernel.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.model.UserGroup;
import com.liferay.portal.kernel.security.access.control.AccessControlled;
import com.liferay.portal.kernel.transaction.Isolation;
import com.liferay.portal.kernel.transaction.Propagation;
import com.liferay.portal.kernel.transaction.Transactional;
import java.util.List;
/**
* Provides the remote service interface for UserGroup. 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 UserGroupServiceUtil
* @see com.liferay.portal.service.base.UserGroupServiceBaseImpl
* @see com.liferay.portal.service.impl.UserGroupServiceImpl
* @generated
*/
@AccessControlled
@JSONWebService
@ProviderType
@Transactional(isolation = Isolation.PORTAL, rollbackFor = {
PortalException.class, SystemException.class})
public interface UserGroupService extends BaseService {
/*
* NOTE FOR DEVELOPERS:
*
* Never modify or reference this interface directly. Always use {@link UserGroupServiceUtil} to access the user group remote service. Add custom service methods to {@link com.liferay.portal.service.impl.UserGroupServiceImpl} and rerun ServiceBuilder to automatically copy the method declarations to this interface.
*/
/**
* Adds the user groups to the group.
*
* @param groupId the primary key of the group
* @param userGroupIds the primary keys of the user groups
*/
public void addGroupUserGroups(long groupId, long[] userGroupIds)
throws PortalException;
/**
* Adds the user groups to the team
*
* @param teamId the primary key of the team
* @param userGroupIds the primary keys of the user groups
*/
public void addTeamUserGroups(long teamId, long[] userGroupIds)
throws PortalException;
/**
* Adds a user group.
*
*
* This method handles the creation and bookkeeping of the user group,
* including its resources, metadata, and internal data structures.
*
*
* @param name the user group's name
* @param description the user group's description
* @return the user group
* @deprecated As of 6.2.0, replaced by {@link #addUserGroup(String, String,
ServiceContext)}
*/
@java.lang.Deprecated
public UserGroup addUserGroup(java.lang.String name,
java.lang.String description) throws PortalException;
/**
* Adds a user group.
*
*
* This method handles the creation and bookkeeping of the user group,
* including its resources, metadata, and internal data structures.
*
*
* @param name the user group's name
* @param description the user group's description
* @param serviceContext the service context to be applied (optionally
null
). Can set expando bridge attributes for the
user group.
* @return the user group
*/
public UserGroup addUserGroup(java.lang.String name,
java.lang.String description,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws PortalException;
/**
* Deletes the user group.
*
* @param userGroupId the primary key of the user group
*/
public void deleteUserGroup(long userGroupId) throws PortalException;
/**
* Fetches the user group with the primary key.
*
* @param userGroupId the primary key of the user group
* @return the user group with the primary key
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public UserGroup fetchUserGroup(long userGroupId) throws PortalException;
/**
* Returns the OSGi service identifier.
*
* @return the OSGi service identifier
*/
public java.lang.String getOSGiServiceIdentifier();
/**
* Returns the user group with the name.
*
* @param name the user group's name
* @return the user group with the name
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public UserGroup getUserGroup(java.lang.String name)
throws PortalException;
/**
* Returns the user group with the primary key.
*
* @param userGroupId the primary key of the user group
* @return the user group with the primary key
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public UserGroup getUserGroup(long userGroupId) throws PortalException;
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getUserGroups(long companyId)
throws PortalException;
/**
* Returns all the user groups to which the user belongs.
*
* @param userId the primary key of the user
* @return the user groups to which the user belongs
*/
@Transactional(propagation = Propagation.SUPPORTS, readOnly = true)
public List getUserUserGroups(long userId)
throws PortalException;
/**
* Removes the user groups from the group.
*
* @param groupId the primary key of the group
* @param userGroupIds the primary keys of the user groups
*/
public void unsetGroupUserGroups(long groupId, long[] userGroupIds)
throws PortalException;
/**
* Removes the user groups from the team.
*
* @param teamId the primary key of the team
* @param userGroupIds the primary keys of the user groups
*/
public void unsetTeamUserGroups(long teamId, long[] userGroupIds)
throws PortalException;
/**
* Updates the user group.
*
* @param userGroupId the primary key of the user group
* @param name the user group's name
* @param description the the user group's description
* @return the user group
* @deprecated As of 6.2.0, replaced by {@link #updateUserGroup(long,
String, String, ServiceContext)}
*/
@java.lang.Deprecated
public UserGroup updateUserGroup(long userGroupId, java.lang.String name,
java.lang.String description) throws PortalException;
/**
* Updates the user group.
*
* @param userGroupId the primary key of the user group
* @param name the user group's name
* @param description the the user group's description
* @param serviceContext the service context to be applied (optionally
null
). Can set expando bridge attributes for the
user group.
* @return the user group
*/
public UserGroup updateUserGroup(long userGroupId, java.lang.String name,
java.lang.String description,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws PortalException;
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy