Liferay 6.0-ee-sp2

com.liferay.portal.service
Interface OrganizationLocalService

All Superinterfaces:
PersistedModelLocalService
All Known Implementing Classes:
OrganizationLocalServiceWrapper

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

The interface for the organization local service.

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:
OrganizationLocalServiceUtil, OrganizationLocalServiceBaseImpl, com.liferay.portal.service.impl.OrganizationLocalServiceImpl

Method Summary
 void addGroupOrganizations(long groupId, long[] organizationIds)
           
 Organization addOrganization(long userId, long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, int statusId, String comments, ServiceContext serviceContext)
           
 Organization addOrganization(Organization organization)
          Adds the organization to the database.
 void addOrganizationResources(long userId, Organization organization)
           
 void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
           
 Organization createOrganization(long organizationId)
          Creates a new organization with the primary key.
 void deleteLogo(long organizationId)
           
 void deleteOrganization(long organizationId)
          Deletes the organization with the primary key from the database.
 void deleteOrganization(Organization organization)
          Deletes the organization 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)
          Returns the number of rows that match the dynamic query.
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 List<Organization> getGroupOrganizations(long groupId)
           
 Organization getOrganization(long organizationId)
          Returns the organization with the primary key.
 Organization getOrganization(long companyId, String name)
           
 long getOrganizationId(long companyId, String name)
           
 List<Organization> getOrganizations(int start, int end)
          Returns a range of all the organizations.
 List<Organization> getOrganizations(long[] organizationIds)
           
 List<Organization> getOrganizations(long companyId, long parentOrganizationId)
           
 List<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end)
           
 int getOrganizationsCount()
          Returns the number of organizations.
 int getOrganizationsCount(long companyId, long parentOrganizationId)
           
 List<Organization> getParentOrganizations(long organizationId)
           
 PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
 List<Organization> getSuborganizations(List<Organization> organizations)
           
 List<Organization> getSubsetOrganizations(List<Organization> allOrganizations, List<Organization> availableOrganizations)
           
 List<Organization> getUserOrganizations(long userId)
           
 List<Organization> getUserOrganizations(long userId, boolean inheritUserGroups)
           
 List<Organization> getUserOrganizations(long userId, boolean inheritUserGroups, int start, int end)
           
 List<Organization> getUserOrganizations(long userId, int start, int end)
           
 int getUserOrganizationsCount(long userId)
           
 boolean hasGroupOrganization(long groupId, long organizationId)
           
 boolean hasPasswordPolicyOrganization(long passwordPolicyId, long organizationId)
           
 boolean hasUserOrganization(long userId, long organizationId)
           
 boolean hasUserOrganization(long userId, long organizationId, boolean inheritSuborganizations, boolean inheritUserGroups, boolean includeSpecifiedOrganization)
           
 void rebuildTree(long companyId, boolean force)
           
 Hits search(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String,Object> params, int start, int end, Sort sort)
           
 List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params, int start, int end)
           
 List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator obc)
           
 List<Organization> search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end)
           
 List<Organization> search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end, OrderByComparator obc)
           
 Hits search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, String region, String country, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, Sort sort)
           
 int searchCount(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params)
           
 int searchCount(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String,Object> params, boolean andOperator)
           
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 void setGroupOrganizations(long groupId, long[] organizationIds)
           
 void unsetGroupOrganizations(long groupId, long[] organizationIds)
           
 void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
           
 void updateAsset(long userId, Organization organization, long[] assetCategoryIds, String[] assetTagNames)
           
 Organization updateOrganization(long companyId, long organizationId, long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, int statusId, String comments, ServiceContext serviceContext)
           
 Organization updateOrganization(Organization organization)
          Updates the organization in the database or adds it if it does not yet exist.
 Organization updateOrganization(Organization organization, boolean merge)
          Updates the organization in the database or adds it if it does not yet exist.
 

Method Detail

addOrganization

Organization addOrganization(Organization organization)
                             throws SystemException
Adds the organization to the database. Also notifies the appropriate model listeners.

Parameters:
organization - the organization
Returns:
the organization that was added
Throws:
SystemException - if a system exception occurred

createOrganization

Organization createOrganization(long organizationId)
Creates a new organization with the primary key. Does not add the organization to the database.

Parameters:
organizationId - the primary key for the new organization
Returns:
the new organization

deleteOrganization

void deleteOrganization(long organizationId)
                        throws PortalException,
                               SystemException
Deletes the organization with the primary key from the database. Also notifies the appropriate model listeners.

Parameters:
organizationId - the primary key of the organization
Throws:
PortalException - if a organization with the primary key could not be found
SystemException - if a system exception occurred

deleteOrganization

void deleteOrganization(Organization organization)
                        throws PortalException,
                               SystemException
Deletes the organization from the database. Also notifies the appropriate model listeners.

Parameters:
organization - the organization
Throws:
PortalException
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
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
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (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
start - the lower bound of the range of model instances
end - the upper bound of the range of model instances (not inclusive)
orderByComparator - the comparator to order the results by (optionally null)
Returns:
the ordered range of matching rows
Throws:
SystemException - if a system exception occurred

dynamicQueryCount

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

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

getOrganization

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Organization getOrganization(long organizationId)
                             throws PortalException,
                                    SystemException
Returns the organization with the primary key.

Parameters:
organizationId - the primary key of the organization
Returns:
the organization
Throws:
PortalException - if a organization with the primary key could not be found
SystemException - if a system exception occurred

getPersistedModel

@Transactional(propagation=SUPPORTS,
               readOnly=true)
PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                 throws PortalException,
                                        SystemException
Specified by:
getPersistedModel in interface PersistedModelLocalService
Throws:
PortalException
SystemException

getOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getOrganizations(int start,
                                                                             int end)
                                    throws SystemException
Returns a range of all the organizations.

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 organizations
end - the upper bound of the range of organizations (not inclusive)
Returns:
the range of organizations
Throws:
SystemException - if a system exception occurred

getOrganizationsCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int getOrganizationsCount()
                          throws SystemException
Returns the number of organizations.

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

updateOrganization

Organization updateOrganization(Organization organization)
                                throws SystemException
Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
organization - the organization
Returns:
the organization that was updated
Throws:
SystemException - if a system exception occurred

updateOrganization

Organization updateOrganization(Organization organization,
                                boolean merge)
                                throws SystemException
Updates the organization in the database or adds it if it does not yet exist. Also notifies the appropriate model listeners.

Parameters:
organization - the organization
merge - whether to merge the organization 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 organization that was updated
Throws:
SystemException - if a system exception occurred

getBeanIdentifier

String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Returns:
the Spring bean ID for this bean

setBeanIdentifier

void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Parameters:
beanIdentifier - the Spring bean ID for this bean

addGroupOrganizations

void addGroupOrganizations(long groupId,
                           long[] organizationIds)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

addOrganization

Organization addOrganization(long userId,
                             long parentOrganizationId,
                             String name,
                             String type,
                             boolean recursable,
                             long regionId,
                             long countryId,
                             int statusId,
                             String comments,
                             ServiceContext serviceContext)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

addOrganizationResources

void addOrganizationResources(long userId,
                              Organization organization)
                              throws PortalException,
                                     SystemException
Throws:
PortalException
SystemException

addPasswordPolicyOrganizations

void addPasswordPolicyOrganizations(long passwordPolicyId,
                                    long[] organizationIds)
                                    throws SystemException
Throws:
SystemException

deleteLogo

void deleteLogo(long organizationId)
                throws PortalException,
                       SystemException
Throws:
PortalException
SystemException

getGroupOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getGroupOrganizations(long groupId)
                                         throws SystemException
Throws:
SystemException

getOrganization

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

getOrganizationId

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

getOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getOrganizations(long companyId,
                                                                             long parentOrganizationId)
                                    throws SystemException
Throws:
SystemException

getOrganizations

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

getOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getOrganizations(long[] organizationIds)
                                    throws PortalException,
                                           SystemException
Throws:
PortalException
SystemException

getOrganizationsCount

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

getParentOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getParentOrganizations(long organizationId)
                                          throws PortalException,
                                                 SystemException
Throws:
PortalException
SystemException

getSuborganizations

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

getSubsetOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getSubsetOrganizations(List<Organization> allOrganizations,
                                                                                   List<Organization> availableOrganizations)

getUserOrganizations

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

getUserOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getUserOrganizations(long userId,
                                                                                 boolean inheritUserGroups)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

getUserOrganizations

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

getUserOrganizations

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

getUserOrganizationsCount

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

hasGroupOrganization

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

hasPasswordPolicyOrganization

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasPasswordPolicyOrganization(long passwordPolicyId,
                                                                               long organizationId)
                                      throws SystemException
Throws:
SystemException

hasUserOrganization

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

hasUserOrganization

@Transactional(propagation=SUPPORTS,
               readOnly=true)
boolean hasUserOrganization(long userId,
                                                                     long organizationId,
                                                                     boolean inheritSuborganizations,
                                                                     boolean inheritUserGroups,
                                                                     boolean includeSpecifiedOrganization)
                            throws PortalException,
                                   SystemException
Throws:
PortalException
SystemException

rebuildTree

void rebuildTree(long companyId,
                 boolean force)
                 throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Hits search(long companyId,
                                                     long parentOrganizationId,
                                                     String keywords,
                                                     LinkedHashMap<String,Object> params,
                                                     int start,
                                                     int end,
                                                     Sort sort)
            throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> search(long companyId,
                                                                   long parentOrganizationId,
                                                                   String keywords,
                                                                   String type,
                                                                   Long regionId,
                                                                   Long countryId,
                                                                   LinkedHashMap<String,Object> params,
                                                                   int start,
                                                                   int end)
                          throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> search(long companyId,
                                                                   long parentOrganizationId,
                                                                   String keywords,
                                                                   String type,
                                                                   Long regionId,
                                                                   Long countryId,
                                                                   LinkedHashMap<String,Object> params,
                                                                   int start,
                                                                   int end,
                                                                   OrderByComparator obc)
                          throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> search(long companyId,
                                                                   long parentOrganizationId,
                                                                   String name,
                                                                   String type,
                                                                   String street,
                                                                   String city,
                                                                   String zip,
                                                                   Long regionId,
                                                                   Long countryId,
                                                                   LinkedHashMap<String,Object> params,
                                                                   boolean andOperator,
                                                                   int start,
                                                                   int end)
                          throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> search(long companyId,
                                                                   long parentOrganizationId,
                                                                   String name,
                                                                   String type,
                                                                   String street,
                                                                   String city,
                                                                   String zip,
                                                                   Long regionId,
                                                                   Long countryId,
                                                                   LinkedHashMap<String,Object> params,
                                                                   boolean andOperator,
                                                                   int start,
                                                                   int end,
                                                                   OrderByComparator obc)
                          throws SystemException
Throws:
SystemException

search

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Hits search(long companyId,
                                                     long parentOrganizationId,
                                                     String name,
                                                     String type,
                                                     String street,
                                                     String city,
                                                     String zip,
                                                     String region,
                                                     String country,
                                                     LinkedHashMap<String,Object> params,
                                                     boolean andSearch,
                                                     int start,
                                                     int end,
                                                     Sort sort)
            throws SystemException
Throws:
SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                                                         long parentOrganizationId,
                                                         String keywords,
                                                         String type,
                                                         Long regionId,
                                                         Long countryId,
                                                         LinkedHashMap<String,Object> params)
                throws SystemException
Throws:
SystemException

searchCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
int searchCount(long companyId,
                                                         long parentOrganizationId,
                                                         String name,
                                                         String type,
                                                         String street,
                                                         String city,
                                                         String zip,
                                                         Long regionId,
                                                         Long countryId,
                                                         LinkedHashMap<String,Object> params,
                                                         boolean andOperator)
                throws SystemException
Throws:
SystemException

setGroupOrganizations

void setGroupOrganizations(long groupId,
                           long[] organizationIds)
                           throws PortalException,
                                  SystemException
Throws:
PortalException
SystemException

unsetGroupOrganizations

void unsetGroupOrganizations(long groupId,
                             long[] organizationIds)
                             throws PortalException,
                                    SystemException
Throws:
PortalException
SystemException

unsetPasswordPolicyOrganizations

void unsetPasswordPolicyOrganizations(long passwordPolicyId,
                                      long[] organizationIds)
                                      throws SystemException
Throws:
SystemException

updateAsset

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

updateOrganization

Organization updateOrganization(long companyId,
                                long organizationId,
                                long parentOrganizationId,
                                String name,
                                String type,
                                boolean recursable,
                                long regionId,
                                long countryId,
                                int statusId,
                                String comments,
                                ServiceContext serviceContext)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

Liferay 6.0-ee-sp2