Liferay 6.0.5

com.liferay.portal.service
Interface GroupLocalService

All Known Implementing Classes:
GroupLocalServiceBaseImpl, GroupLocalServiceImpl, GroupLocalServiceWrapper

@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface GroupLocalService

The interface for the group local service.

Never modify or reference this interface directly. Always use GroupLocalServiceUtil to access the group local service. Add custom service methods to GroupLocalServiceImpl and rerun ServiceBuilder to automatically copy the method declarations to this interface.

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:
GroupLocalServiceUtil, GroupLocalServiceBaseImpl, GroupLocalServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time is generated.

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

Method Detail

addGroup

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

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

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

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

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

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

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

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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getGroupsCount()
                   throws SystemException
Gets the number of groups.

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

updateGroup

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

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

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

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

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

addUserGroups

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

checkCompanyGroup

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

checkSystemGroups

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

getCompanyGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getCompanyGroup(long companyId)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

getCompanyGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getCompanyGroups(long companyId,
                                                                      int start,
                                                                      int end)
                             throws SystemException
Throws:
SystemException

getCompanyGroupsCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getCompanyGroupsCount(long companyId)
                          throws SystemException
Throws:
SystemException

getFriendlyURLGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getFriendlyURLGroup(long companyId,
                                                                   String friendlyURL)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getGroup(long companyId,
                                                        String name)
               throws PortalException,
                      SystemException
Throws:
PortalException
SystemException

getGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getGroups(long[] groupIds)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

getLayoutGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getLayoutGroup(long companyId,
                                                              long plid)
                     throws PortalException,
                            SystemException
Throws:
PortalException
SystemException

getLayoutPrototypeGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getLayoutPrototypeGroup(long companyId,
                                                                       long layoutPrototypeId)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

getLayoutSetPrototypeGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getLayoutSetPrototypeGroup(long companyId,
                                                                          long layoutSetPrototypeId)
                                 throws PortalException,
                                        SystemException
Throws:
PortalException
SystemException

getLiveGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getLiveGroups()
                          throws SystemException
Throws:
SystemException

getNoLayoutsGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getNoLayoutsGroups(String className,
                                                                        boolean privateLayout,
                                                                        int start,
                                                                        int end)
                               throws SystemException
Throws:
SystemException

getNullFriendlyURLGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getNullFriendlyURLGroups()
                                     throws SystemException
Throws:
SystemException

getOrganizationGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getOrganizationGroup(long companyId,
                                                                    long organizationId)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

getOrganizationsGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getOrganizationsGroups(List<Organization> organizations)

getOrganizationsRelatedGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getOrganizationsRelatedGroups(List<Organization> organizations)
                                          throws SystemException
Throws:
SystemException

getRoleGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getRoleGroups(long roleId)
                          throws SystemException
Throws:
SystemException

getStagingGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getStagingGroup(long liveGroupId)
                      throws PortalException,
                             SystemException
Throws:
PortalException
SystemException

getUserGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getUserGroup(long companyId,
                                                            long userId)
                   throws PortalException,
                          SystemException
Throws:
PortalException
SystemException

getUserGroupGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Group getUserGroupGroup(long companyId,
                                                                 long userGroupId)
                        throws PortalException,
                               SystemException
Throws:
PortalException
SystemException

getUserGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getUserGroups(long userId)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getUserGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getUserGroups(long userId,
                                                                   boolean inherit)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getUserGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getUserGroups(long userId,
                                                                   int start,
                                                                   int end)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getUserGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getUserGroups(long userId,
                                                                   boolean inherit,
                                                                   int start,
                                                                   int end)
                          throws PortalException,
                                 SystemException
Throws:
PortalException
SystemException

getUserGroupsGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getUserGroupsGroups(List<UserGroup> userGroups)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

getUserGroupsRelatedGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getUserGroupsRelatedGroups(List<UserGroup> userGroups)
                                       throws SystemException
Throws:
SystemException

getUserOrganizationsGroups

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> getUserOrganizationsGroups(long userId,
                                                                                int start,
                                                                                int end)
                                       throws PortalException,
                                              SystemException
Throws:
PortalException
SystemException

hasRoleGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasRoleGroup(long roleId,
                                                              long groupId)
                     throws SystemException
Throws:
SystemException

hasStagingGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasStagingGroup(long liveGroupId)
                        throws SystemException
Throws:
SystemException

hasUserGroup

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasUserGroup(long userId,
                                                              long groupId)
                     throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> search(long companyId,
                                                            String name,
                                                            String description,
                                                            LinkedHashMap<String,Object> params,
                                                            int start,
                                                            int end)
                   throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Group> search(long companyId,
                                                            String name,
                                                            String description,
                                                            LinkedHashMap<String,Object> params,
                                                            int start,
                                                            int end,
                                                            OrderByComparator obc)
                   throws SystemException
Throws:
SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                                                         String name,
                                                         String description,
                                                         LinkedHashMap<String,Object> params)
                throws SystemException
Throws:
SystemException

setRoleGroups

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

unsetRoleGroups

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

unsetUserGroups

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

updateAsset

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

updateFriendlyURL

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

updateGroup

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

updateGroup

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

updateWorkflow

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

Liferay 6.0.5