Liferay 6.2-ce-ga5

com.liferay.portal.service
Class OrganizationLocalServiceUtil

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

@ProviderType
public class OrganizationLocalServiceUtil
extends Object

Provides the local service utility for Organization. This utility wraps com.liferay.portal.service.impl.OrganizationLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server. 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:
OrganizationLocalService, OrganizationLocalServiceBaseImpl, com.liferay.portal.service.impl.OrganizationLocalServiceImpl

Constructor Summary
OrganizationLocalServiceUtil()
           
 
Method Summary
static void addGroupOrganization(long groupId, long organizationId)
           
static void addGroupOrganization(long groupId, Organization organization)
           
static void addGroupOrganizations(long groupId, List<Organization> Organizations)
           
static void addGroupOrganizations(long groupId, long[] organizationIds)
           
static Organization addOrganization(long userId, long parentOrganizationId, String name, boolean site)
          Adds an organization.
static Organization addOrganization(long userId, long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, int statusId, String comments, boolean site, ServiceContext serviceContext)
          Deprecated. As of 6.2.0, replaced by addOrganization(long, long, String, String, long, long, int, String, boolean, ServiceContext)
static Organization addOrganization(long userId, long parentOrganizationId, String name, String type, long regionId, long countryId, int statusId, String comments, boolean site, ServiceContext serviceContext)
          Adds an organization.
static Organization addOrganization(Organization organization)
          Adds the organization to the database.
static void addOrganizationResources(long userId, Organization organization)
          Adds a resource for each type of permission available on the organization.
static void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
          Assigns the password policy to the organizations, removing any other currently assigned password policies.
static void addUserOrganization(long userId, long organizationId)
           
static void addUserOrganization(long userId, Organization organization)
           
static void addUserOrganizations(long userId, List<Organization> Organizations)
           
static void addUserOrganizations(long userId, long[] organizationIds)
           
static void clearGroupOrganizations(long groupId)
           
static void clearUserOrganizations(long userId)
           
static Organization createOrganization(long organizationId)
          Creates a new organization with the primary key.
static void deleteGroupOrganization(long groupId, long organizationId)
           
static void deleteGroupOrganization(long groupId, Organization organization)
           
static void deleteGroupOrganizations(long groupId, List<Organization> Organizations)
           
static void deleteGroupOrganizations(long groupId, long[] organizationIds)
           
static void deleteLogo(long organizationId)
          Deletes the logo of the organization.
static Organization deleteOrganization(long organizationId)
          Deletes the organization with the primary key from the database.
static Organization deleteOrganization(Organization organization)
          Deletes the organization from the database.
static void deleteUserOrganization(long userId, long organizationId)
           
static void deleteUserOrganization(long userId, Organization organization)
           
static void deleteUserOrganizations(long userId, List<Organization> Organizations)
           
static void deleteUserOrganizations(long userId, long[] organizationIds)
           
static DynamicQuery dynamicQuery()
           
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)
          Returns the number of rows that match the dynamic query.
static long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
          Returns the number of rows that match the dynamic query.
static Organization fetchOrganization(long organizationId)
           
static Organization fetchOrganization(long companyId, String name)
           
static Organization fetchOrganizationByUuidAndCompanyId(String uuid, long companyId)
          Returns the organization with the matching UUID and company.
static String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
static List<Organization> getGroupOrganizations(long groupId)
           
static List<Organization> getGroupOrganizations(long groupId, int start, int end)
           
static List<Organization> getGroupOrganizations(long groupId, int start, int end, OrderByComparator orderByComparator)
           
static int getGroupOrganizationsCount(long groupId)
           
static List<Organization> getNoAssetOrganizations()
           
static Organization getOrganization(long organizationId)
          Returns the organization with the primary key.
static Organization getOrganization(long companyId, String name)
          Returns the organization with the name.
static Organization getOrganizationByUuidAndCompanyId(String uuid, long companyId)
          Returns the organization with the matching UUID and company.
static long getOrganizationId(long companyId, String name)
          Returns the primary key of the organization with the name.
static List<Organization> getOrganizations(int start, int end)
          Returns a range of all the organizations.
static List<Organization> getOrganizations(long[] organizationIds)
          Returns the organizations with the primary keys.
static List<Organization> getOrganizations(long userId, int start, int end, OrderByComparator obc)
           
static List<Organization> getOrganizations(long companyId, long parentOrganizationId)
          Returns all the organizations belonging to the parent organization.
static List<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end)
          Returns a range of all the organizations belonging to the parent organization.
static int getOrganizationsCount()
          Returns the number of organizations.
static int getOrganizationsCount(long companyId, long parentOrganizationId)
          Returns the number of organizations belonging to the parent organization.
static List<Organization> getParentOrganizations(long organizationId)
          Returns the parent organizations in order by closest ancestor.
static PersistedModel getPersistedModel(Serializable primaryKeyObj)
           
static OrganizationLocalService getService()
           
static List<Organization> getSuborganizations(List<Organization> organizations)
          Returns the suborganizations of the organizations.
static List<Organization> getSuborganizations(long companyId, long organizationId)
          Returns the suborganizations of the organization.
static int getSuborganizationsCount(long companyId, long organizationId)
          Returns the count of suborganizations of the organization.
static List<Organization> getSubsetOrganizations(List<Organization> allOrganizations, List<Organization> availableOrganizations)
          Returns the intersection of allOrganizations and availableOrganizations.
static List<Organization> getUserOrganizations(long userId)
           
static List<Organization> getUserOrganizations(long userId, boolean includeAdministrative)
          Returns all the organizations associated with the user.
static List<Organization> getUserOrganizations(long userId, int start, int end)
           
static List<Organization> getUserOrganizations(long userId, int start, int end, OrderByComparator orderByComparator)
           
static int getUserOrganizationsCount(long userId)
           
static boolean hasGroupOrganization(long groupId, long organizationId)
           
static boolean hasGroupOrganizations(long groupId)
           
static boolean hasPasswordPolicyOrganization(long passwordPolicyId, long organizationId)
          Returns true if the password policy has been assigned to the organization.
static boolean hasUserOrganization(long userId, long organizationId)
           
static boolean hasUserOrganization(long userId, long organizationId, boolean inheritSuborganizations, boolean includeSpecifiedOrganization)
          Returns true if the user is a member of the organization, optionally focusing on suborganizations or the specified organization.
static boolean hasUserOrganizations(long userId)
           
static void rebuildTree(long companyId)
          Rebuilds the organizations tree.
static Hits search(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String,Object> params, int start, int end, Sort sort)
          Returns an ordered range of all the organizations that match the keywords, using the indexer.
static List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params, int start, int end)
          Returns a name ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer.
static 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)
          Returns an ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer.
static 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)
          Returns a name ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer.
static 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)
          Returns an ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer.
static 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)
          Returns an ordered range of all the organizations whose name, type, or location fields match the keywords specified for them, using the indexer.
static int searchCount(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params)
          Returns the number of organizations that match the keywords, type, region, and country.
static 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)
          Returns the number of organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them.
static void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
static void setGroupOrganizations(long groupId, long[] organizationIds)
           
 void setService(OrganizationLocalService service)
          Deprecated. As of 6.2.0
static void setUserOrganizations(long userId, long[] organizationIds)
           
static void unsetGroupOrganizations(long groupId, long[] organizationIds)
          Removes the organizations from the group.
static void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
          Removes the organizations from the password policy.
static void updateAsset(long userId, Organization organization, long[] assetCategoryIds, String[] assetTagNames)
          Updates the organization's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary.
static Organization updateOrganization(long companyId, long organizationId, long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, int statusId, String comments, boolean site, ServiceContext serviceContext)
          Deprecated. As of 6.2.0, replaced by updateOrganization(long, long, long, String, String, long, long, int, String, boolean, ServiceContext)
static Organization updateOrganization(long companyId, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, int statusId, String comments, boolean site, ServiceContext serviceContext)
          Updates the organization.
static Organization updateOrganization(Organization organization)
          Updates the organization in the database or adds it if it does not yet exist.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrganizationLocalServiceUtil

public OrganizationLocalServiceUtil()
Method Detail

addOrganization

public static 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

public static 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

public static Organization 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
Returns:
the organization that was removed
Throws:
PortalException - if a organization with the primary key could not be found
SystemException - if a system exception occurred

deleteOrganization

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

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

dynamicQuery

public static DynamicQuery dynamicQuery()

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
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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from OrganizationModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from OrganizationModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

public static 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

dynamicQueryCount

public static long dynamicQueryCount(DynamicQuery dynamicQuery,
                                     Projection projection)
                              throws SystemException
Returns the number of rows that match the dynamic query.

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

fetchOrganization

public static Organization fetchOrganization(long organizationId)
                                      throws SystemException
Throws:
SystemException

fetchOrganizationByUuidAndCompanyId

public static Organization fetchOrganizationByUuidAndCompanyId(String uuid,
                                                               long companyId)
                                                        throws SystemException
Returns the organization with the matching UUID and company.

Parameters:
uuid - the organization's UUID
companyId - the primary key of the company
Returns:
the matching organization, or null if a matching organization could not be found
Throws:
SystemException - if a system exception occurred

getOrganization

public static 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

public static PersistedModel getPersistedModel(Serializable primaryKeyObj)
                                        throws PortalException,
                                               SystemException
Throws:
PortalException
SystemException

getOrganizationByUuidAndCompanyId

public static Organization getOrganizationByUuidAndCompanyId(String uuid,
                                                             long companyId)
                                                      throws PortalException,
                                                             SystemException
Returns the organization with the matching UUID and company.

Parameters:
uuid - the organization's UUID
companyId - the primary key of the company
Returns:
the matching organization
Throws:
PortalException - if a matching organization could not be found
SystemException - if a system exception occurred

getOrganizations

public static 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. If orderByComparator is specified, then the query will include the given ORDER BY logic. If orderByComparator is absent and pagination is required (start and end are not QueryUtil.ALL_POS), then the query will include the default ORDER BY logic from OrganizationModelImpl. If both orderByComparator and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.

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

public static int getOrganizationsCount()
                                 throws SystemException
Returns the number of organizations.

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

updateOrganization

public static 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

addGroupOrganization

public static void addGroupOrganization(long groupId,
                                        long organizationId)
                                 throws SystemException
Throws:
SystemException - if a system exception occurred

addGroupOrganization

public static void addGroupOrganization(long groupId,
                                        Organization organization)
                                 throws SystemException
Throws:
SystemException - if a system exception occurred

addGroupOrganizations

public static void addGroupOrganizations(long groupId,
                                         long[] organizationIds)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException - if a system exception occurred

addGroupOrganizations

public static void addGroupOrganizations(long groupId,
                                         List<Organization> Organizations)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException - if a system exception occurred

clearGroupOrganizations

public static void clearGroupOrganizations(long groupId)
                                    throws SystemException
Throws:
SystemException - if a system exception occurred

deleteGroupOrganization

public static void deleteGroupOrganization(long groupId,
                                           long organizationId)
                                    throws SystemException
Throws:
SystemException - if a system exception occurred

deleteGroupOrganization

public static void deleteGroupOrganization(long groupId,
                                           Organization organization)
                                    throws SystemException
Throws:
SystemException - if a system exception occurred

deleteGroupOrganizations

public static void deleteGroupOrganizations(long groupId,
                                            long[] organizationIds)
                                     throws SystemException
Throws:
SystemException - if a system exception occurred

deleteGroupOrganizations

public static void deleteGroupOrganizations(long groupId,
                                            List<Organization> Organizations)
                                     throws SystemException
Throws:
SystemException - if a system exception occurred

getGroupOrganizations

public static List<Organization> getGroupOrganizations(long groupId)
                                                throws SystemException
Throws:
SystemException - if a system exception occurred

getGroupOrganizations

public static List<Organization> getGroupOrganizations(long groupId,
                                                       int start,
                                                       int end)
                                                throws SystemException
Throws:
SystemException - if a system exception occurred

getGroupOrganizations

public static List<Organization> getGroupOrganizations(long groupId,
                                                       int start,
                                                       int end,
                                                       OrderByComparator orderByComparator)
                                                throws SystemException
Throws:
SystemException - if a system exception occurred

getGroupOrganizationsCount

public static int getGroupOrganizationsCount(long groupId)
                                      throws SystemException
Throws:
SystemException - if a system exception occurred

hasGroupOrganization

public static boolean hasGroupOrganization(long groupId,
                                           long organizationId)
                                    throws SystemException
Throws:
SystemException - if a system exception occurred

hasGroupOrganizations

public static boolean hasGroupOrganizations(long groupId)
                                     throws SystemException
Throws:
SystemException - if a system exception occurred

setGroupOrganizations

public static void setGroupOrganizations(long groupId,
                                         long[] organizationIds)
                                  throws PortalException,
                                         SystemException
Throws:
PortalException
SystemException - if a system exception occurred

addUserOrganization

public static void addUserOrganization(long userId,
                                       long organizationId)
                                throws SystemException
Throws:
SystemException - if a system exception occurred

addUserOrganization

public static void addUserOrganization(long userId,
                                       Organization organization)
                                throws SystemException
Throws:
SystemException - if a system exception occurred

addUserOrganizations

public static void addUserOrganizations(long userId,
                                        long[] organizationIds)
                                 throws SystemException
Throws:
SystemException - if a system exception occurred

addUserOrganizations

public static void addUserOrganizations(long userId,
                                        List<Organization> Organizations)
                                 throws SystemException
Throws:
SystemException - if a system exception occurred

clearUserOrganizations

public static void clearUserOrganizations(long userId)
                                   throws SystemException
Throws:
SystemException - if a system exception occurred

deleteUserOrganization

public static void deleteUserOrganization(long userId,
                                          long organizationId)
                                   throws SystemException
Throws:
SystemException - if a system exception occurred

deleteUserOrganization

public static void deleteUserOrganization(long userId,
                                          Organization organization)
                                   throws SystemException
Throws:
SystemException - if a system exception occurred

deleteUserOrganizations

public static void deleteUserOrganizations(long userId,
                                           long[] organizationIds)
                                    throws SystemException
Throws:
SystemException - if a system exception occurred

deleteUserOrganizations

public static void deleteUserOrganizations(long userId,
                                           List<Organization> Organizations)
                                    throws SystemException
Throws:
SystemException - if a system exception occurred

getUserOrganizations

public static List<Organization> getUserOrganizations(long userId)
                                               throws SystemException
Throws:
SystemException - if a system exception occurred

getUserOrganizations

public static List<Organization> getUserOrganizations(long userId,
                                                      int start,
                                                      int end)
                                               throws SystemException
Throws:
SystemException - if a system exception occurred

getUserOrganizations

public static List<Organization> getUserOrganizations(long userId,
                                                      int start,
                                                      int end,
                                                      OrderByComparator orderByComparator)
                                               throws SystemException
Throws:
SystemException - if a system exception occurred

getUserOrganizationsCount

public static int getUserOrganizationsCount(long userId)
                                     throws SystemException
Throws:
SystemException - if a system exception occurred

hasUserOrganization

public static boolean hasUserOrganization(long userId,
                                          long organizationId)
                                   throws SystemException
Throws:
SystemException - if a system exception occurred

hasUserOrganizations

public static boolean hasUserOrganizations(long userId)
                                    throws SystemException
Throws:
SystemException - if a system exception occurred

setUserOrganizations

public static void setUserOrganizations(long userId,
                                        long[] organizationIds)
                                 throws SystemException
Throws:
SystemException - if a system exception occurred

getBeanIdentifier

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

Returns:
the Spring bean ID for this bean

setBeanIdentifier

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

Parameters:
beanIdentifier - the Spring bean ID for this bean

addOrganization

public static Organization addOrganization(long userId,
                                           long parentOrganizationId,
                                           String name,
                                           boolean site)
                                    throws PortalException,
                                           SystemException
Adds an organization.

This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures. It is not necessary to make a subsequent call to addOrganizationResources(long, Organization).

Parameters:
userId - the primary key of the creator/owner of the organization
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
site - whether the organization is to be associated with a main site
Returns:
the organization
Throws:
PortalException - if a creator or parent organization with the primary key could not be found or if the organization's information was invalid
SystemException - if a system exception occurred

addOrganization

public static Organization addOrganization(long userId,
                                           long parentOrganizationId,
                                           String name,
                                           String type,
                                           boolean recursable,
                                           long regionId,
                                           long countryId,
                                           int statusId,
                                           String comments,
                                           boolean site,
                                           ServiceContext serviceContext)
                                    throws PortalException,
                                           SystemException
Deprecated. As of 6.2.0, replaced by addOrganization(long, long, String, String, long, long, int, String, boolean, ServiceContext)

Adds an organization.

This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures. It is not necessary to make a subsequent call to addOrganizationResources(long, Organization).

Parameters:
userId - the primary key of the creator/owner of the organization
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
type - the organization's type
recursable - whether the permissions of the organization are to be inherited by its suborganizations
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
serviceContext - the service context to be applied (optionally null). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException - if a creator or parent organization with the primary key could not be found or if the organization's information was invalid
SystemException - if a system exception occurred

addOrganization

public static Organization addOrganization(long userId,
                                           long parentOrganizationId,
                                           String name,
                                           String type,
                                           long regionId,
                                           long countryId,
                                           int statusId,
                                           String comments,
                                           boolean site,
                                           ServiceContext serviceContext)
                                    throws PortalException,
                                           SystemException
Adds an organization.

This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures. It is not necessary to make a subsequent call to addOrganizationResources(long, Organization).

Parameters:
userId - the primary key of the creator/owner of the organization
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
type - the organization's type
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
serviceContext - the service context to be applied (optionally null). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException - if a creator or parent organization with the primary key could not be found or if the organization's information was invalid
SystemException - if a system exception occurred

addOrganizationResources

public static void addOrganizationResources(long userId,
                                            Organization organization)
                                     throws PortalException,
                                            SystemException
Adds a resource for each type of permission available on the organization.

Parameters:
userId - the primary key of the creator/owner of the organization
organization - the organization
Throws:
PortalException - if a portal exception occurred
SystemException - if a system exception occurred

addPasswordPolicyOrganizations

public static void addPasswordPolicyOrganizations(long passwordPolicyId,
                                                  long[] organizationIds)
                                           throws SystemException
Assigns the password policy to the organizations, removing any other currently assigned password policies.

Parameters:
passwordPolicyId - the primary key of the password policy
organizationIds - the primary keys of the organizations
Throws:
SystemException - if a system exception occurred

deleteLogo

public static void deleteLogo(long organizationId)
                       throws PortalException,
                              SystemException
Deletes the logo of the organization.

Parameters:
organizationId - the primary key of the organization
Throws:
PortalException - if an organization or parent organization with the primary key could not be found or if the organization's logo could not be found
SystemException - if a system exception occurred

fetchOrganization

public static Organization fetchOrganization(long companyId,
                                             String name)
                                      throws SystemException
Throws:
SystemException

getNoAssetOrganizations

public static List<Organization> getNoAssetOrganizations()
                                                  throws SystemException
Throws:
SystemException

getOrganization

public static Organization getOrganization(long companyId,
                                           String name)
                                    throws PortalException,
                                           SystemException
Returns the organization with the name.

Parameters:
companyId - the primary key of the organization's company
name - the organization's name
Returns:
the organization with the name
Throws:
PortalException - if the organization with the name could not be found
SystemException - if a system exception occurred

getOrganizationId

public static long getOrganizationId(long companyId,
                                     String name)
                              throws SystemException
Returns the primary key of the organization with the name.

Parameters:
companyId - the primary key of the organization's company
name - the organization's name
Returns:
the primary key of the organization with the name, or 0 if the organization could not be found
Throws:
SystemException - if a system exception occurred

getOrganizations

public static List<Organization> getOrganizations(long userId,
                                                  int start,
                                                  int end,
                                                  OrderByComparator obc)
                                           throws PortalException,
                                                  SystemException
Throws:
PortalException
SystemException

getOrganizations

public static List<Organization> getOrganizations(long companyId,
                                                  long parentOrganizationId)
                                           throws SystemException
Returns all the organizations belonging to the parent organization.

Parameters:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
Returns:
the organizations belonging to the parent organization
Throws:
SystemException - if a system exception occurred

getOrganizations

public static List<Organization> getOrganizations(long companyId,
                                                  long parentOrganizationId,
                                                  int start,
                                                  int end)
                                           throws SystemException
Returns a range of all the organizations belonging to the parent organization.

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:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
start - the lower bound of the range of organizations to return
end - the upper bound of the range of organizations to return (not inclusive)
Returns:
the range of organizations belonging to the parent organization
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationPersistence.findByC_P( long, long, int, int)

getOrganizations

public static List<Organization> getOrganizations(long[] organizationIds)
                                           throws PortalException,
                                                  SystemException
Returns the organizations with the primary keys.

Parameters:
organizationIds - the primary keys of the organizations
Returns:
the organizations with the primary keys
Throws:
PortalException - if any one of the organizations could not be found
SystemException - if a system exception occurred

getOrganizationsCount

public static int getOrganizationsCount(long companyId,
                                        long parentOrganizationId)
                                 throws SystemException
Returns the number of organizations belonging to the parent organization.

Parameters:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
Returns:
the number of organizations belonging to the parent organization
Throws:
SystemException - if a system exception occurred

getParentOrganizations

public static List<Organization> getParentOrganizations(long organizationId)
                                                 throws PortalException,
                                                        SystemException
Returns the parent organizations in order by closest ancestor. The list starts with the organization itself.

Parameters:
organizationId - the primary key of the organization
Returns:
the parent organizations in order by closest ancestor
Throws:
PortalException - if an organization with the primary key could not be found
SystemException - if a system exception occurred

getSuborganizations

public static List<Organization> getSuborganizations(List<Organization> organizations)
                                              throws SystemException
Returns the suborganizations of the organizations.

Parameters:
organizations - the organizations from which to get suborganizations
Returns:
the suborganizations of the organizations
Throws:
SystemException - if a system exception occurred

getSuborganizations

public static List<Organization> getSuborganizations(long companyId,
                                                     long organizationId)
                                              throws SystemException
Returns the suborganizations of the organization.

Parameters:
companyId - the primary key of the organization's company
organizationId - the primary key of the organization
Returns:
the suborganizations of the organization
Throws:
SystemException - if a system exception occurred

getSuborganizationsCount

public static int getSuborganizationsCount(long companyId,
                                           long organizationId)
                                    throws SystemException
Returns the count of suborganizations of the organization.

Parameters:
companyId - the primary key of the organization's company
organizationId - the primary key of the organization
Returns:
the count of suborganizations of the organization
Throws:
SystemException - if a system exception occurred

getSubsetOrganizations

public static List<Organization> getSubsetOrganizations(List<Organization> allOrganizations,
                                                        List<Organization> availableOrganizations)
Returns the intersection of allOrganizations and availableOrganizations.

Parameters:
allOrganizations - the organizations to check for availability
availableOrganizations - the available organizations
Returns:
the intersection of allOrganizations and availableOrganizations

getUserOrganizations

public static List<Organization> getUserOrganizations(long userId,
                                                      boolean includeAdministrative)
                                               throws PortalException,
                                                      SystemException
Returns all the organizations associated with the user. If includeAdministrative is true, the result includes those organizations that are not directly associated to the user but he is an administrator or an owner of the organization.

Parameters:
userId - the primary key of the user
includeAdministrative - whether to includes organizations that are indirectly associated to the user because he is an administrator or an owner of the organization
Returns:
the organizations associated with the user
Throws:
PortalException - if a user with the primary key could not be found
SystemException - if a system exception occurred

hasPasswordPolicyOrganization

public static boolean hasPasswordPolicyOrganization(long passwordPolicyId,
                                                    long organizationId)
                                             throws SystemException
Returns true if the password policy has been assigned to the organization.

Parameters:
passwordPolicyId - the primary key of the password policy
organizationId - the primary key of the organization
Returns:
true if the password policy has been assigned to the organization; false otherwise
Throws:
SystemException - if a system exception occurred

hasUserOrganization

public static boolean hasUserOrganization(long userId,
                                          long organizationId,
                                          boolean inheritSuborganizations,
                                          boolean includeSpecifiedOrganization)
                                   throws PortalException,
                                          SystemException
Returns true if the user is a member of the organization, optionally focusing on suborganizations or the specified organization. This method is usually called to determine if the user has view access to a resource belonging to the organization.
  1. If inheritSuborganizations=false: the method checks whether the user belongs to the organization specified by organizationId. The parameter includeSpecifiedOrganization is ignored.
  2. The parameter includeSpecifiedOrganization is ignored unless inheritSuborganizations is also true.
  3. If inheritSuborganizations=true and includeSpecifiedOrganization=false: the method checks whether the user belongs to one of the child organizations of the one specified by organizationId.
  4. If inheritSuborganizations=true and includeSpecifiedOrganization=true: the method checks whether the user belongs to the organization specified by organizationId or any of its child organizations.

Parameters:
userId - the primary key of the organization's user
organizationId - the primary key of the organization
inheritSuborganizations - if true suborganizations are considered in the determination
includeSpecifiedOrganization - if true the organization specified by organizationId is considered in the determination
Returns:
true if the user has access to the organization; false otherwise
Throws:
PortalException - if an organization with the primary key could not be found
SystemException - if a system exception occurred
See Also:
OrganizationFinder

rebuildTree

public static void rebuildTree(long companyId)
                        throws PortalException,
                               SystemException
Rebuilds the organizations tree.

Only call this method if the tree has become stale through operations other than normal CRUD. Under normal circumstances the tree is automatically rebuilt whenever necessary.

Parameters:
companyId - the primary key of the organization's company
Throws:
PortalException - if an organization with the primary key could not be found
SystemException - if a system exception occurred

search

public static Hits search(long companyId,
                          long parentOrganizationId,
                          String keywords,
                          LinkedHashMap<String,Object> params,
                          int start,
                          int end,
                          Sort sort)
                   throws SystemException
Returns an ordered range of all the organizations that match the keywords, using the indexer. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.

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:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
keywords - the keywords (space separated), which may occur in the organization's name, street, city, zipcode, type, region or country (optionally null)
params - the finder parameters (optionally null). For more information see OrganizationIndexer
start - the lower bound of the range of organizations to return
end - the upper bound of the range of organizations to return (not inclusive)
sort - the field and direction by which to sort (optionally null)
Returns:
the matching organizations ordered by name
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationIndexer

search

public static 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
Returns a name ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer. It is preferable to use the indexed version search(long, long, String, LinkedHashMap, int, int, Sort) instead of this method wherever possible for performance reasons.

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:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
keywords - the keywords (space separated), which may occur in the organization's name, street, city, or zipcode (optionally null)
type - the organization's type (optionally null)
regionId - the primary key of the organization's region (optionally null)
countryId - the primary key of the organization's country (optionally null)
params - the finder params. For more information see OrganizationFinder
start - the lower bound of the range of organizations to return
end - the upper bound of the range of organizations to return (not inclusive)
Returns:
the matching organizations ordered by name
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationFinder

search

public static 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
Returns an ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer. It is preferable to use the indexed version search(long, long, String, String, String, String, String, String, String, LinkedHashMap, boolean, int, int, Sort) instead of this method wherever possible for performance reasons.

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:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
keywords - the keywords (space separated), which may occur in the organization's name, street, city, or zipcode (optionally null)
type - the organization's type (optionally null)
regionId - the primary key of the organization's region (optionally null)
countryId - the primary key of the organization's country (optionally null)
params - the finder params. For more information see OrganizationFinder
start - the lower bound of the range of organizations to return
end - the upper bound of the range of organizations to return (not inclusive)
obc - the comparator to order the organizations (optionally null)
Returns:
the matching organizations ordered by comparator obc
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationFinder

search

public static 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
Returns a name ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer. It is preferable to use the indexed version search(long, long, String, String, String, String, String, String, String, LinkedHashMap, boolean, int, int, Sort) instead of this method wherever possible for performance reasons.

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:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent
name - the name keywords (space separated, optionally null)
type - the organization's type (optionally null)
street - the street keywords (optionally null)
city - the city keywords (optionally null)
zip - the zipcode keywords (optionally null)
regionId - the primary key of the organization's region (optionally null)
countryId - the primary key of the organization's country (optionally null)
params - the finder parameters (optionally null). For more information see OrganizationFinder
andOperator - whether every field must match its keywords, or just one field. For example, "organizations with the name 'Employees' and city 'Chicago'" vs "organizations with the name 'Employees' or the city 'Chicago'".
start - the lower bound of the range of organizations to return
end - the upper bound of the range of organizations to return (not inclusive)
Returns:
the matching organizations ordered by name
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationFinder

search

public static 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
Returns an ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer. It is preferable to use the indexed version search(long, long, String, String, String, String, String, String, String, LinkedHashMap, boolean, int, int, Sort) instead of this method wherever possible for performance reasons.

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:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
name - the name keywords (space separated, optionally null)
type - the organization's type (optionally null)
street - the street keywords (optionally null)
city - the city keywords (optionally null)
zip - the zipcode keywords (optionally null)
regionId - the primary key of the organization's region (optionally null)
countryId - the primary key of the organization's country (optionally null)
params - the finder parameters (optionally null). For more information see OrganizationFinder
andOperator - whether every field must match its keywords, or just one field. For example, "organizations with the name 'Employees' and city 'Chicago'" vs "organizations with the name 'Employees' or the city 'Chicago'".
start - the lower bound of the range of organizations to return
end - the upper bound of the range of organizations to return (not inclusive)
obc - the comparator to order the organizations (optionally null)
Returns:
the matching organizations ordered by comparator obc
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationFinder

search

public static 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
Returns an ordered range of all the organizations whose name, type, or location fields match the keywords specified for them, using the indexer. It is preferable to use this method instead of the non-indexed version whenever possible for performance reasons.

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:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
name - the name keywords (space separated, optionally null)
type - the type keywords (optionally null)
street - the street keywords (optionally null)
city - the city keywords (optionally null)
zip - the zipcode keywords (optionally null)
region - the region keywords (optionally null)
country - the country keywords (optionally null)
params - the finder parameters (optionally null). For more information see OrganizationIndexer.
andSearch - whether every field must match its keywords or just one field
start - the lower bound of the range of organizations to return
end - the upper bound of the range of organizations to return (not inclusive)
sort - the field and direction by which to sort (optionally null)
Returns:
the matching organizations ordered by sort
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationIndexer

searchCount

public static int searchCount(long companyId,
                              long parentOrganizationId,
                              String keywords,
                              String type,
                              Long regionId,
                              Long countryId,
                              LinkedHashMap<String,Object> params)
                       throws SystemException
Returns the number of organizations that match the keywords, type, region, and country.

Parameters:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
keywords - the keywords (space separated), which may occur in the organization's name, street, city, or zipcode (optionally null)
type - the organization's type (optionally null)
regionId - the primary key of the organization's region (optionally null)
countryId - the primary key of the organization's country (optionally null)
params - the finder parameters (optionally null). For more information see OrganizationFinder
Returns:
the number of matching organizations
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationFinder

searchCount

public static 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
Returns the number of organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them.

Parameters:
companyId - the primary key of the organization's company
parentOrganizationId - the primary key of the organization's parent organization
name - the name keywords (space separated, optionally null)
type - the organization's type (optionally null)
street - the street keywords (optionally null)
city - the city keywords (optionally null)
zip - the zipcode keywords (optionally null)
regionId - the primary key of the organization's region (optionally null)
countryId - the primary key of the organization's country (optionally null)
params - the finder parameters (optionally null). For more information see OrganizationFinder
andOperator - whether every field must match its keywords, or just one field. For example, "organizations with the name 'Employees' and city 'Chicago'" vs "organizations with the name 'Employees' or the city 'Chicago'".
Returns:
the number of matching organizations
Throws:
SystemException - if a system exception occurred
See Also:
OrganizationFinder

unsetGroupOrganizations

public static void unsetGroupOrganizations(long groupId,
                                           long[] organizationIds)
                                    throws PortalException,
                                           SystemException
Removes the organizations from the group.

Parameters:
groupId - the primary key of the group
organizationIds - the primary keys of the organizations
Throws:
PortalException - if a portal exception occurred
SystemException - if a system exception occurred

unsetPasswordPolicyOrganizations

public static void unsetPasswordPolicyOrganizations(long passwordPolicyId,
                                                    long[] organizationIds)
                                             throws SystemException
Removes the organizations from the password policy.

Parameters:
passwordPolicyId - the primary key of the password policy
organizationIds - the primary keys of the organizations
Throws:
SystemException - if a system exception occurred

updateAsset

public static void updateAsset(long userId,
                               Organization organization,
                               long[] assetCategoryIds,
                               String[] assetTagNames)
                        throws PortalException,
                               SystemException
Updates the organization's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary.

Parameters:
userId - the primary key of the user
organization - the organization
assetCategoryIds - the primary keys of the asset categories
assetTagNames - the asset tag names
Throws:
PortalException - if a user with the primary key could not be found
SystemException - if a system exception occurred

updateOrganization

public static Organization updateOrganization(long companyId,
                                              long organizationId,
                                              long parentOrganizationId,
                                              String name,
                                              String type,
                                              boolean recursable,
                                              long regionId,
                                              long countryId,
                                              int statusId,
                                              String comments,
                                              boolean site,
                                              ServiceContext serviceContext)
                                       throws PortalException,
                                              SystemException
Deprecated. As of 6.2.0, replaced by updateOrganization(long, long, long, String, String, long, long, int, String, boolean, ServiceContext)

Updates the organization.

Parameters:
companyId - the primary key of the organization's company
organizationId - the primary key of the organization
parentOrganizationId - the primary key of organization's parent organization
name - the organization's name
type - the organization's type
recursable - whether permissions of the organization are to be inherited by its suborganizations
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
serviceContext - the service context to be applied (optionally null). Can set asset category IDs and asset tag names for the organization, and merge expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException - if an organization or parent organization with the primary key could not be found or if the new information was invalid
SystemException - if a system exception occurred

updateOrganization

public static Organization updateOrganization(long companyId,
                                              long organizationId,
                                              long parentOrganizationId,
                                              String name,
                                              String type,
                                              long regionId,
                                              long countryId,
                                              int statusId,
                                              String comments,
                                              boolean site,
                                              ServiceContext serviceContext)
                                       throws PortalException,
                                              SystemException
Updates the organization.

Parameters:
companyId - the primary key of the organization's company
organizationId - the primary key of the organization
parentOrganizationId - the primary key of organization's parent organization
name - the organization's name
type - the organization's type
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
serviceContext - the service context to be applied (optionally null). Can set asset category IDs and asset tag names for the organization, and merge expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException - if an organization or parent organization with the primary key could not be found or if the new information was invalid
SystemException - if a system exception occurred

getService

public static OrganizationLocalService getService()

setService

public void setService(OrganizationLocalService service)
Deprecated. As of 6.2.0


Liferay 6.2-ce-ga5