Liferay 6.0.5

com.liferay.portal.service
Class GroupLocalServiceUtil

java.lang.Object
  extended by com.liferay.portal.service.GroupLocalServiceUtil

public class GroupLocalServiceUtil
extends Object

The utility for the group local service. This utility wraps GroupLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server.

Never modify this class directly. Add custom service methods to GroupLocalServiceImpl and rerun ServiceBuilder to regenerate this class.

This is a local service. 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.

See Also:
GroupLocalService, GroupLocalServiceBaseImpl, GroupLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

Constructor Summary
GroupLocalServiceUtil()
           
 
Method Summary
static Group addGroup(Group group)
          Adds the group to the database.
static Group addGroup(long userId, String className, long classPK, long liveGroupId, String name, String description, int type, String friendlyURL, boolean active, ServiceContext serviceContext)
           
static Group addGroup(long userId, String className, long classPK, String name, String description, int type, String friendlyURL, boolean active, ServiceContext serviceContext)
           
static void addRoleGroups(long roleId, long[] groupIds)
           
static void addUserGroups(long userId, long[] groupIds)
           
static void checkCompanyGroup(long companyId)
           
static void checkSystemGroups(long companyId)
           
static Group createGroup(long groupId)
          Creates a new group with the primary key.
static void deleteGroup(Group group)
          Deletes the group from the database.
static void deleteGroup(long groupId)
          Deletes the group with the primary key from the database.
static List dynamicQuery(DynamicQuery dynamicQuery)
          Performs a dynamic query on the database and returns the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
          Performs a dynamic query on the database and returns a range of the matching rows.
static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator)
          Performs a dynamic query on the database and returns an ordered range of the matching rows.
static long dynamicQueryCount(DynamicQuery dynamicQuery)
          Counts the number of rows that match the dynamic query.
static Group getCompanyGroup(long companyId)
           
static List<Group> getCompanyGroups(long companyId, int start, int end)
           
static int getCompanyGroupsCount(long companyId)
           
static Group getFriendlyURLGroup(long companyId, String friendlyURL)
           
static Group getGroup(long groupId)
          Gets the group with the primary key.
static Group getGroup(long companyId, String name)
           
static List<Group> getGroups(int start, int end)
          Gets a range of all the groups.
static List<Group> getGroups(long[] groupIds)
           
static int getGroupsCount()
          Gets the number of groups.
static Group getLayoutGroup(long companyId, long plid)
           
static Group getLayoutPrototypeGroup(long companyId, long layoutPrototypeId)
           
static Group getLayoutSetPrototypeGroup(long companyId, long layoutSetPrototypeId)
           
static List<Group> getLiveGroups()
           
static List<Group> getNoLayoutsGroups(String className, boolean privateLayout, int start, int end)
           
static List<Group> getNullFriendlyURLGroups()
           
static Group getOrganizationGroup(long companyId, long organizationId)
           
static List<Group> getOrganizationsGroups(List<Organization> organizations)
           
static List<Group> getOrganizationsRelatedGroups(List<Organization> organizations)
           
static List<Group> getRoleGroups(long roleId)
           
static GroupLocalService getService()
           
static Group getStagingGroup(long liveGroupId)
           
static Group getUserGroup(long companyId, long userId)
           
static Group getUserGroupGroup(long companyId, long userGroupId)
           
static List<Group> getUserGroups(long userId)
           
static List<Group> getUserGroups(long userId, boolean inherit)
           
static List<Group> getUserGroups(long userId, boolean inherit, int start, int end)
           
static List<Group> getUserGroups(long userId, int start, int end)
           
static List<Group> getUserGroupsGroups(List<UserGroup> userGroups)
           
static List<Group> getUserGroupsRelatedGroups(List<UserGroup> userGroups)
           
static List<Group> getUserOrganizationsGroups(long userId, int start, int end)
           
static boolean hasRoleGroup(long roleId, long groupId)
           
static boolean hasStagingGroup(long liveGroupId)
           
static boolean hasUserGroup(long userId, long groupId)
           
static List<Group> search(long companyId, String name, String description, LinkedHashMap<String,Object> params, int start, int end)
           
static List<Group> search(long companyId, String name, String description, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator obc)
           
static int searchCount(long companyId, String name, String description, LinkedHashMap<String,Object> params)
           
static void setRoleGroups(long roleId, long[] groupIds)
           
 void setService(GroupLocalService service)
           
static void unsetRoleGroups(long roleId, long[] groupIds)
           
static void unsetUserGroups(long userId, long[] groupIds)
           
static void updateAsset(long userId, Group group, long[] assetCategoryIds, String[] assetTagNames)
           
static Group updateFriendlyURL(long groupId, String friendlyURL)
           
static Group updateGroup(Group group)
          Updates the group in the database.
static Group updateGroup(Group group, boolean merge)
          Updates the group in the database.
static Group updateGroup(long groupId, String typeSettings)
           
static Group updateGroup(long groupId, String name, String description, int type, String friendlyURL, boolean active, ServiceContext serviceContext)
           
static Group updateWorkflow(long groupId, boolean workflowEnabled, int workflowStages, String workflowRoleNames)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GroupLocalServiceUtil

public GroupLocalServiceUtil()
Method Detail

addGroup

public static Group addGroup(Group group)
                      throws SystemException
Adds the group to the database. Also notifies the appropriate model listeners.

Parameters:
group - the group to add
Returns:
the group that was added
Throws:
SystemException - if a system exception occurred

createGroup

public static Group createGroup(long groupId)
Creates a new group with the primary key. Does not add the group to the database.

Parameters:
groupId - the primary key for the new group
Returns:
the new group

deleteGroup

public static void deleteGroup(long groupId)
                        throws PortalException,
                               SystemException
Deletes the group with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
groupId - the primary key of the group to delete
Throws:
PortalException - if a group with the primary key could not be found
SystemException - if a system exception occurred

deleteGroup

public static void deleteGroup(Group group)
                        throws SystemException
Deletes the group from the database. Also notifies the appropriate model listeners.

Parameters:
group - the group to delete
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery)
                         throws SystemException
Performs a dynamic query on the database and returns the matching rows.

Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end)
                         throws SystemException
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 QueryUtil.ALL_POS will return the full result set.

Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
Returns:
the range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQuery

public static List dynamicQuery(DynamicQuery dynamicQuery,
                                int start,
                                int end,
                                OrderByComparator orderByComparator)
                         throws SystemException
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 QueryUtil.ALL_POS will return the full result set.

Parameters:
dynamicQuery - the dynamic query to search with
start - the lower bound of the range of model instances to return
end - the upper bound of the range of model instances to return (not inclusive)
orderByComparator - the comparator to order the results by
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery)
                              throws SystemException
Counts the number of rows that match the dynamic query.

Parameters:
dynamicQuery - the dynamic query to search with
Returns:
the number of rows that match the dynamic query
Throws:
SystemException - if a system exception occurred

getGroup

public static Group getGroup(long groupId)
                      throws PortalException,
                             SystemException
Gets the group with the primary key.

Parameters:
groupId - the primary key of the group to get
Returns:
the group
Throws:
PortalException - if a group with the primary key could not be found
SystemException - if a system exception occurred

getGroups

public static List<Group> getGroups(int start,
                                    int end)
                             throws SystemException
Gets a range of all 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 QueryUtil.ALL_POS will return the full result set.

Parameters:
start - the lower bound of the range of groups to return
end - the upper bound of the range of groups to return (not inclusive)
Returns:
the range of groups
Throws:
SystemException - if a system exception occurred

getGroupsCount

public static int getGroupsCount()
                          throws SystemException
Gets the number of groups.

Returns:
the number of groups
Throws:
SystemException - if a system exception occurred

updateGroup

public static Group updateGroup(Group group)
                         throws SystemException
Updates the group in the database. Also notifies the appropriate model listeners.

Parameters:
group - the group to update
Returns:
the group that was updated
Throws:
SystemException - if a system exception occurred

updateGroup

public static Group updateGroup(Group group,
                                boolean merge)
                         throws SystemException
Updates the group in the database. Also notifies the appropriate model listeners.

Parameters:
group - the group to update
merge - whether to merge the group with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean) for an explanation.
Returns:
the group that was updated
Throws:
SystemException - if a system exception occurred

addGroup

public static Group addGroup(long userId,
                             String className,
                             long classPK,
                             String name,
                             String description,
                             int type,
                             String friendlyURL,
                             boolean active,
                             ServiceContext serviceContext)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

addGroup

public static Group addGroup(long userId,
                             String className,
                             long classPK,
                             long liveGroupId,
                             String name,
                             String description,
                             int type,
                             String friendlyURL,
                             boolean active,
                             ServiceContext serviceContext)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

addRoleGroups

public static void addRoleGroups(long roleId,
                                 long[] groupIds)
                          throws SystemException
Throws:
SystemException

addUserGroups

public static void addUserGroups(long userId,
                                 long[] groupIds)
                          throws SystemException
Throws:
SystemException

checkCompanyGroup

public static void checkCompanyGroup(long companyId)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

checkSystemGroups

public static void checkSystemGroups(long companyId)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

getCompanyGroup

public static Group getCompanyGroup(long companyId)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

getCompanyGroups

public static List<Group> getCompanyGroups(long companyId,
                                           int start,
                                           int end)
                                    throws SystemException
Throws:
SystemException

getCompanyGroupsCount

public static int getCompanyGroupsCount(long companyId)
                                 throws SystemException
Throws:
SystemException

getFriendlyURLGroup

public static Group getFriendlyURLGroup(long companyId,
                                        String friendlyURL)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getGroup

public static Group getGroup(long companyId,
                             String name)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

getGroups

public static List<Group> getGroups(long[] groupIds)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

getLayoutGroup

public static Group getLayoutGroup(long companyId,
                                   long plid)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getLayoutPrototypeGroup

public static Group getLayoutPrototypeGroup(long companyId,
                                            long layoutPrototypeId)
                                     throws PortalException,
                                            SystemException
Throws:
PortalException
SystemException

getLayoutSetPrototypeGroup

public static Group getLayoutSetPrototypeGroup(long companyId,
                                               long layoutSetPrototypeId)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

getLiveGroups

public static List<Group> getLiveGroups()
                                 throws SystemException
Throws:
SystemException

getNoLayoutsGroups

public static List<Group> getNoLayoutsGroups(String className,
                                             boolean privateLayout,
                                             int start,
                                             int end)
                                      throws SystemException
Throws:
SystemException

getNullFriendlyURLGroups

public static List<Group> getNullFriendlyURLGroups()
                                            throws SystemException
Throws:
SystemException

getOrganizationGroup

public static Group getOrganizationGroup(long companyId,
                                         long organizationId)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException

getOrganizationsGroups

public static List<Group> getOrganizationsGroups(List<Organization> organizations)

getOrganizationsRelatedGroups

public static List<Group> getOrganizationsRelatedGroups(List<Organization> organizations)
                                                 throws SystemException
Throws:
SystemException

getRoleGroups

public static List<Group> getRoleGroups(long roleId)
                                 throws SystemException
Throws:
SystemException

getStagingGroup

public static Group getStagingGroup(long liveGroupId)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

getUserGroup

public static Group getUserGroup(long companyId,
                                 long userId)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getUserGroupGroup

public static Group getUserGroupGroup(long companyId,
                                      long userGroupId)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

getUserGroups

public static List<Group> getUserGroups(long userId)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getUserGroups

public static List<Group> getUserGroups(long userId,
                                        boolean inherit)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getUserGroups

public static List<Group> getUserGroups(long userId,
                                        int start,
                                        int end)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getUserGroups

public static List<Group> getUserGroups(long userId,
                                        boolean inherit,
                                        int start,
                                        int end)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getUserGroupsGroups

public static List<Group> getUserGroupsGroups(List<UserGroup> userGroups)
                                       throws PortalException,
                                              SystemException
Throws:
PortalException
SystemException

getUserGroupsRelatedGroups

public static List<Group> getUserGroupsRelatedGroups(List<UserGroup> userGroups)
                                              throws SystemException
Throws:
SystemException

getUserOrganizationsGroups

public static List<Group> getUserOrganizationsGroups(long userId,
                                                     int start,
                                                     int end)
                                              throws PortalException,
                                                     SystemException
Throws:
PortalException
SystemException

hasRoleGroup

public static boolean hasRoleGroup(long roleId,
                                   long groupId)
                            throws SystemException
Throws:
SystemException

hasStagingGroup

public static boolean hasStagingGroup(long liveGroupId)
                               throws SystemException
Throws:
SystemException

hasUserGroup

public static boolean hasUserGroup(long userId,
                                   long groupId)
                            throws SystemException
Throws:
SystemException

search

public static List<Group> search(long companyId,
                                 String name,
                                 String description,
                                 LinkedHashMap<String,Object> params,
                                 int start,
                                 int end)
                          throws SystemException
Throws:
SystemException

search

public static List<Group> search(long companyId,
                                 String name,
                                 String description,
                                 LinkedHashMap<String,Object> params,
                                 int start,
                                 int end,
                                 OrderByComparator obc)
                          throws SystemException
Throws:
SystemException

searchCount

public static int searchCount(long companyId,
                              String name,
                              String description,
                              LinkedHashMap<String,Object> params)
                       throws SystemException
Throws:
SystemException

setRoleGroups

public static void setRoleGroups(long roleId,
                                 long[] groupIds)
                          throws SystemException
Throws:
SystemException

unsetRoleGroups

public static void unsetRoleGroups(long roleId,
                                   long[] groupIds)
                            throws SystemException
Throws:
SystemException

unsetUserGroups

public static void unsetUserGroups(long userId,
                                   long[] groupIds)
                            throws SystemException
Throws:
SystemException

updateAsset

public static void updateAsset(long userId,
                               Group group,
                               long[] assetCategoryIds,
                               String[] assetTagNames)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

updateFriendlyURL

public static Group updateFriendlyURL(long groupId,
                                      String friendlyURL)
                               throws PortalException,
                                      SystemException
Throws:
PortalException
SystemException

updateGroup

public static Group updateGroup(long groupId,
                                String name,
                                String description,
                                int type,
                                String friendlyURL,
                                boolean active,
                                ServiceContext serviceContext)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

updateGroup

public static Group updateGroup(long groupId,
                                String typeSettings)
                         throws PortalException,
                                SystemException
Throws:
PortalException
SystemException

updateWorkflow

public static Group updateWorkflow(long groupId,
                                   boolean workflowEnabled,
                                   int workflowStages,
                                   String workflowRoleNames)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

getService

public static GroupLocalService getService()

setService

public void setService(GroupLocalService service)

Liferay 6.0.5