Liferay 6.1.2-ce-ga3

com.liferay.portal.service.impl
Class OrganizationLocalServiceImpl

java.lang.Object
  extended by com.liferay.portal.service.BaseLocalServiceImpl
      extended by com.liferay.portal.service.base.OrganizationLocalServiceBaseImpl
          extended by com.liferay.portal.service.impl.OrganizationLocalServiceImpl
All Implemented Interfaces:
IdentifiableBean, BaseLocalService, OrganizationLocalService, PersistedModelLocalService

public class OrganizationLocalServiceImpl
extends OrganizationLocalServiceBaseImpl

The implementation of the organization local service.


Field Summary
 
Fields inherited from class com.liferay.portal.service.base.OrganizationLocalServiceBaseImpl
accountLocalService, accountPersistence, accountService, addressLocalService, addressPersistence, addressService, assetEntryFinder, assetEntryLocalService, assetEntryPersistence, assetEntryService, browserTrackerLocalService, browserTrackerPersistence, classNameLocalService, classNamePersistence, classNameService, clusterGroupLocalService, clusterGroupPersistence, cmisRepositoryLocalService, companyLocalService, companyPersistence, companyService, contactLocalService, contactPersistence, contactService, counterLocalService, countryPersistence, countryService, emailAddressLocalService, emailAddressPersistence, emailAddressService, expandoValueLocalService, expandoValuePersistence, expandoValueService, groupFinder, groupLocalService, groupPersistence, groupService, imageLocalService, imagePersistence, imageService, layoutBranchLocalService, layoutBranchPersistence, layoutBranchService, layoutFinder, layoutLocalService, layoutPersistence, layoutPrototypeLocalService, layoutPrototypePersistence, layoutPrototypeService, layoutRevisionLocalService, layoutRevisionPersistence, layoutRevisionService, layoutService, layoutSetBranchLocalService, layoutSetBranchPersistence, layoutSetBranchService, layoutSetLocalService, layoutSetPersistence, layoutSetPrototypeLocalService, layoutSetPrototypePersistence, layoutSetPrototypeService, layoutSetService, layoutTemplateLocalService, listTypePersistence, listTypeService, lockFinder, lockLocalService, lockPersistence, membershipRequestLocalService, membershipRequestPersistence, membershipRequestService, organizationFinder, organizationLocalService, organizationPersistence, organizationService, orgGroupPermissionFinder, orgGroupPermissionPersistence, orgGroupRolePersistence, orgLaborLocalService, orgLaborPersistence, orgLaborService, passwordPolicyFinder, passwordPolicyLocalService, passwordPolicyPersistence, passwordPolicyRelLocalService, passwordPolicyRelPersistence, passwordPolicyService, passwordTrackerLocalService, passwordTrackerPersistence, permissionFinder, permissionLocalService, permissionPersistence, permissionService, persistedModelLocalServiceRegistry, phoneLocalService, phonePersistence, phoneService, pluginSettingLocalService, pluginSettingPersistence, pluginSettingService, portalLocalService, portalPreferencesLocalService, portalPreferencesPersistence, portalService, portletItemLocalService, portletItemPersistence, portletLocalService, portletPersistence, portletPreferencesFinder, portletPreferencesLocalService, portletPreferencesPersistence, portletPreferencesService, portletService, quartzLocalService, regionPersistence, regionService, releaseLocalService, releasePersistence, repositoryEntryLocalService, repositoryEntryPersistence, repositoryLocalService, repositoryPersistence, repositoryService, resourceActionLocalService, resourceActionPersistence, resourceBlockFinder, resourceBlockLocalService, resourceBlockPermissionLocalService, resourceBlockPermissionPersistence, resourceBlockPersistence, resourceBlockService, resourceCodeLocalService, resourceCodePersistence, resourceFinder, resourceLocalService, resourcePermissionFinder, resourcePermissionLocalService, resourcePermissionPersistence, resourcePermissionService, resourcePersistence, resourceService, resourceTypePermissionFinder, resourceTypePermissionLocalService, resourceTypePermissionPersistence, roleFinder, roleLocalService, rolePersistence, roleService, serviceComponentLocalService, serviceComponentPersistence, shardLocalService, shardPersistence, subscriptionLocalService, subscriptionPersistence, teamFinder, teamLocalService, teamPersistence, teamService, themeLocalService, themeService, ticketLocalService, ticketPersistence, userFinder, userGroupFinder, userGroupGroupRoleLocalService, userGroupGroupRolePersistence, userGroupGroupRoleService, userGroupLocalService, userGroupPersistence, userGroupRoleFinder, userGroupRoleLocalService, userGroupRolePersistence, userGroupRoleService, userGroupService, userIdMapperLocalService, userIdMapperPersistence, userLocalService, userNotificationEventLocalService, userNotificationEventPersistence, userPersistence, userService, userTrackerLocalService, userTrackerPathLocalService, userTrackerPathPersistence, userTrackerPersistence, virtualHostLocalService, virtualHostPersistence, webDAVPropsLocalService, webDAVPropsPersistence, websiteLocalService, websitePersistence, websiteService, workflowDefinitionLinkLocalService, workflowDefinitionLinkPersistence, workflowInstanceLinkLocalService, workflowInstanceLinkPersistence
 
Constructor Summary
OrganizationLocalServiceImpl()
           
 
Method Summary
 void addGroupOrganizations(long groupId, long[] organizationIds)
          Adds the organizations to the group.
 Organization addOrganization(long userId, long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, int statusId, String comments, boolean site, ServiceContext serviceContext)
          Adds an organization.
 void addOrganizationResources(long userId, Organization organization)
          Adds a resource for each type of permission available on the organization.
 void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
          Assigns the password policy to the organizations, removing any other currently assigned password policies.
protected  void addSuborganizations(List<Organization> allSuborganizations, List<Organization> organizations)
           
 void deleteLogo(long organizationId)
          Deletes the logo of the organization.
 Organization deleteOrganization(long organizationId)
          Deletes the organization.
 Organization deleteOrganization(Organization organization)
          Deletes the organization.
 List<Organization> getGroupOrganizations(long groupId)
          Returns all the organizations belonging to the group.
 Organization getOrganization(long companyId, String name)
          Returns the organization with the name.
 long getOrganizationId(long companyId, String name)
          Returns the primary key of the organization with the name.
 List<Organization> getOrganizations(long[] organizationIds)
          Returns the organizations with the primary keys.
 List<Organization> getOrganizations(long companyId, long parentOrganizationId)
          Returns all the organizations belonging to the parent organization.
 List<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end)
          Returns a range of all the organizations belonging to the parent organization.
 int getOrganizationsCount(long companyId, long parentOrganizationId)
          Returns the number of organizations belonging to the parent organization.
protected  long getParentOrganizationId(long companyId, long parentOrganizationId)
           
 List<Organization> getParentOrganizations(long organizationId)
          Returns the parent organizations in order by closest ancestor.
protected  List<Organization> getParentOrganizations(Organization organization, boolean lastOrganization)
           
protected  long[] getReindexOrganizationIds(Organization organization)
           
 List<Organization> getSuborganizations(List<Organization> organizations)
          Returns the suborganizations of the organizations.
 List<Organization> getSuborganizations(long companyId, long organizationId)
          Returns the suborganizations of the organization.
 int getSuborganizationsCount(long companyId, long organizationId)
          Returns the count of suborganizations of the organization.
 List<Organization> getSubsetOrganizations(List<Organization> allOrganizations, List<Organization> availableOrganizations)
          Returns the intersection of allOrganizations and availableOrganizations.
 List<Organization> getUserOrganizations(long userId)
          Returns all the organizations associated with the user.
 List<Organization> getUserOrganizations(long userId, boolean includeAdministrative)
          Returns all the organizations associated with the user.
 List<Organization> getUserOrganizations(long userId, int start, int end)
          Returns a range of all the organizations associated with the user.
 int getUserOrganizationsCount(long userId)
          Returns the number of organizations associated with the user.
 boolean hasGroupOrganization(long groupId, long organizationId)
          Returns true if the organization belongs to the group.
 boolean hasPasswordPolicyOrganization(long passwordPolicyId, long organizationId)
          Returns true if the password policy has been assigned to the organization.
 boolean hasUserOrganization(long userId, long organizationId)
          Returns true if the user is a member of the organization.
 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.
protected  boolean isParentOrganization(long parentOrganizationId, long organizationId)
           
 void rebuildTree(long companyId)
          Rebuilds the organizations tree.
 List<Organization> search(long companyId, LinkedHashMap<String,Object> params, int start, int end)
          Returns a range of all the organizations of the company.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 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.
 void setGroupOrganizations(long groupId, long[] organizationIds)
          Sets the organizations in the group, removing and adding organizations to the group as necessary.
 void unsetGroupOrganizations(long groupId, long[] organizationIds)
          Removes the organizations from the group.
 void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
          Removes the organizations from the password policy.
 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.
 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)
          Updates the organization.
protected  void validate(long companyId, long organizationId, long parentOrganizationId, String name, String type, long countryId, int statusId)
           
protected  void validate(long companyId, long parentOrganizationId, String name, String type, long countryId, int statusId)
           
 
Methods inherited from class com.liferay.portal.service.base.OrganizationLocalServiceBaseImpl
addGroupOrganization, addGroupOrganization, addGroupOrganizations, addOrganization, addUserOrganization, addUserOrganization, addUserOrganizations, addUserOrganizations, afterPropertiesSet, clearGroupOrganizations, clearUserOrganizations, createOrganization, deleteGroupOrganization, deleteGroupOrganization, deleteGroupOrganizations, deleteGroupOrganizations, deleteUserOrganization, deleteUserOrganization, deleteUserOrganizations, deleteUserOrganizations, destroy, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQuery, dynamicQueryCount, fetchOrganization, getAccountLocalService, getAccountPersistence, getAccountService, getAddressLocalService, getAddressPersistence, getAddressService, getAssetEntryFinder, getAssetEntryLocalService, getAssetEntryPersistence, getAssetEntryService, getBeanIdentifier, getBrowserTrackerLocalService, getBrowserTrackerPersistence, getClassNameLocalService, getClassNamePersistence, getClassNameService, getClusterGroupLocalService, getClusterGroupPersistence, getCMISRepositoryLocalService, getCompanyLocalService, getCompanyPersistence, getCompanyService, getContactLocalService, getContactPersistence, getContactService, getCounterLocalService, getCountryPersistence, getCountryService, getEmailAddressLocalService, getEmailAddressPersistence, getEmailAddressService, getExpandoValueLocalService, getExpandoValuePersistence, getExpandoValueService, getGroupFinder, getGroupLocalService, getGroupOrganizations, getGroupOrganizations, getGroupOrganizationsCount, getGroupPersistence, getGroupService, getImageLocalService, getImagePersistence, getImageService, getLayoutBranchLocalService, getLayoutBranchPersistence, getLayoutBranchService, getLayoutFinder, getLayoutLocalService, getLayoutPersistence, getLayoutPrototypeLocalService, getLayoutPrototypePersistence, getLayoutPrototypeService, getLayoutRevisionLocalService, getLayoutRevisionPersistence, getLayoutRevisionService, getLayoutService, getLayoutSetBranchLocalService, getLayoutSetBranchPersistence, getLayoutSetBranchService, getLayoutSetLocalService, getLayoutSetPersistence, getLayoutSetPrototypeLocalService, getLayoutSetPrototypePersistence, getLayoutSetPrototypeService, getLayoutSetService, getLayoutTemplateLocalService, getListTypePersistence, getListTypeService, getLockFinder, getLockLocalService, getLockPersistence, getMembershipRequestLocalService, getMembershipRequestPersistence, getMembershipRequestService, getModelClass, getModelClassName, getOrganization, getOrganizationFinder, getOrganizationLocalService, getOrganizationPersistence, getOrganizations, getOrganizationsCount, getOrganizationService, getOrgGroupPermissionFinder, getOrgGroupPermissionPersistence, getOrgGroupRolePersistence, getOrgLaborLocalService, getOrgLaborPersistence, getOrgLaborService, getPasswordPolicyFinder, getPasswordPolicyLocalService, getPasswordPolicyPersistence, getPasswordPolicyRelLocalService, getPasswordPolicyRelPersistence, getPasswordPolicyService, getPasswordTrackerLocalService, getPasswordTrackerPersistence, getPermissionFinder, getPermissionLocalService, getPermissionPersistence, getPermissionService, getPersistedModel, getPhoneLocalService, getPhonePersistence, getPhoneService, getPluginSettingLocalService, getPluginSettingPersistence, getPluginSettingService, getPortalLocalService, getPortalPreferencesLocalService, getPortalPreferencesPersistence, getPortalService, getPortletItemLocalService, getPortletItemPersistence, getPortletLocalService, getPortletPersistence, getPortletPreferencesFinder, getPortletPreferencesLocalService, getPortletPreferencesPersistence, getPortletPreferencesService, getPortletService, getQuartzLocalService, getRegionPersistence, getRegionService, getReleaseLocalService, getReleasePersistence, getRepositoryEntryLocalService, getRepositoryEntryPersistence, getRepositoryLocalService, getRepositoryPersistence, getRepositoryService, getResourceActionLocalService, getResourceActionPersistence, getResourceBlockFinder, getResourceBlockLocalService, getResourceBlockPermissionLocalService, getResourceBlockPermissionPersistence, getResourceBlockPersistence, getResourceBlockService, getResourceCodeLocalService, getResourceCodePersistence, getResourceFinder, getResourceLocalService, getResourcePermissionFinder, getResourcePermissionLocalService, getResourcePermissionPersistence, getResourcePermissionService, getResourcePersistence, getResourceService, getResourceTypePermissionFinder, getResourceTypePermissionLocalService, getResourceTypePermissionPersistence, getRoleFinder, getRoleLocalService, getRolePersistence, getRoleService, getServiceComponentLocalService, getServiceComponentPersistence, getShardLocalService, getShardPersistence, getSubscriptionLocalService, getSubscriptionPersistence, getTeamFinder, getTeamLocalService, getTeamPersistence, getTeamService, getThemeLocalService, getThemeService, getTicketLocalService, getTicketPersistence, getUserFinder, getUserGroupFinder, getUserGroupGroupRoleLocalService, getUserGroupGroupRolePersistence, getUserGroupGroupRoleService, getUserGroupLocalService, getUserGroupPersistence, getUserGroupRoleFinder, getUserGroupRoleLocalService, getUserGroupRolePersistence, getUserGroupRoleService, getUserGroupService, getUserIdMapperLocalService, getUserIdMapperPersistence, getUserLocalService, getUserNotificationEventLocalService, getUserNotificationEventPersistence, getUserOrganizations, getUserPersistence, getUserService, getUserTrackerLocalService, getUserTrackerPathLocalService, getUserTrackerPathPersistence, getUserTrackerPersistence, getVirtualHostLocalService, getVirtualHostPersistence, getWebDAVPropsLocalService, getWebDAVPropsPersistence, getWebsiteLocalService, getWebsitePersistence, getWebsiteService, getWorkflowDefinitionLinkLocalService, getWorkflowDefinitionLinkPersistence, getWorkflowInstanceLinkLocalService, getWorkflowInstanceLinkPersistence, hasGroupOrganizations, hasUserOrganizations, runSQL, setAccountLocalService, setAccountPersistence, setAccountService, setAddressLocalService, setAddressPersistence, setAddressService, setAssetEntryFinder, setAssetEntryLocalService, setAssetEntryPersistence, setAssetEntryService, setBeanIdentifier, setBrowserTrackerLocalService, setBrowserTrackerPersistence, setClassNameLocalService, setClassNamePersistence, setClassNameService, setClusterGroupLocalService, setClusterGroupPersistence, setCMISRepositoryLocalService, setCompanyLocalService, setCompanyPersistence, setCompanyService, setContactLocalService, setContactPersistence, setContactService, setCounterLocalService, setCountryPersistence, setCountryService, setEmailAddressLocalService, setEmailAddressPersistence, setEmailAddressService, setExpandoValueLocalService, setExpandoValuePersistence, setExpandoValueService, setGroupFinder, setGroupLocalService, setGroupPersistence, setGroupService, setImageLocalService, setImagePersistence, setImageService, setLayoutBranchLocalService, setLayoutBranchPersistence, setLayoutBranchService, setLayoutFinder, setLayoutLocalService, setLayoutPersistence, setLayoutPrototypeLocalService, setLayoutPrototypePersistence, setLayoutPrototypeService, setLayoutRevisionLocalService, setLayoutRevisionPersistence, setLayoutRevisionService, setLayoutService, setLayoutSetBranchLocalService, setLayoutSetBranchPersistence, setLayoutSetBranchService, setLayoutSetLocalService, setLayoutSetPersistence, setLayoutSetPrototypeLocalService, setLayoutSetPrototypePersistence, setLayoutSetPrototypeService, setLayoutSetService, setLayoutTemplateLocalService, setListTypePersistence, setListTypeService, setLockFinder, setLockLocalService, setLockPersistence, setMembershipRequestLocalService, setMembershipRequestPersistence, setMembershipRequestService, setOrganizationFinder, setOrganizationLocalService, setOrganizationPersistence, setOrganizationService, setOrgGroupPermissionFinder, setOrgGroupPermissionPersistence, setOrgGroupRolePersistence, setOrgLaborLocalService, setOrgLaborPersistence, setOrgLaborService, setPasswordPolicyFinder, setPasswordPolicyLocalService, setPasswordPolicyPersistence, setPasswordPolicyRelLocalService, setPasswordPolicyRelPersistence, setPasswordPolicyService, setPasswordTrackerLocalService, setPasswordTrackerPersistence, setPermissionFinder, setPermissionLocalService, setPermissionPersistence, setPermissionService, setPhoneLocalService, setPhonePersistence, setPhoneService, setPluginSettingLocalService, setPluginSettingPersistence, setPluginSettingService, setPortalLocalService, setPortalPreferencesLocalService, setPortalPreferencesPersistence, setPortalService, setPortletItemLocalService, setPortletItemPersistence, setPortletLocalService, setPortletPersistence, setPortletPreferencesFinder, setPortletPreferencesLocalService, setPortletPreferencesPersistence, setPortletPreferencesService, setPortletService, setQuartzLocalService, setRegionPersistence, setRegionService, setReleaseLocalService, setReleasePersistence, setRepositoryEntryLocalService, setRepositoryEntryPersistence, setRepositoryLocalService, setRepositoryPersistence, setRepositoryService, setResourceActionLocalService, setResourceActionPersistence, setResourceBlockFinder, setResourceBlockLocalService, setResourceBlockPermissionLocalService, setResourceBlockPermissionPersistence, setResourceBlockPersistence, setResourceBlockService, setResourceCodeLocalService, setResourceCodePersistence, setResourceFinder, setResourceLocalService, setResourcePermissionFinder, setResourcePermissionLocalService, setResourcePermissionPersistence, setResourcePermissionService, setResourcePersistence, setResourceService, setResourceTypePermissionFinder, setResourceTypePermissionLocalService, setResourceTypePermissionPersistence, setRoleFinder, setRoleLocalService, setRolePersistence, setRoleService, setServiceComponentLocalService, setServiceComponentPersistence, setShardLocalService, setShardPersistence, setSubscriptionLocalService, setSubscriptionPersistence, setTeamFinder, setTeamLocalService, setTeamPersistence, setTeamService, setThemeLocalService, setThemeService, setTicketLocalService, setTicketPersistence, setUserFinder, setUserGroupFinder, setUserGroupGroupRoleLocalService, setUserGroupGroupRolePersistence, setUserGroupGroupRoleService, setUserGroupLocalService, setUserGroupPersistence, setUserGroupRoleFinder, setUserGroupRoleLocalService, setUserGroupRolePersistence, setUserGroupRoleService, setUserGroupService, setUserIdMapperLocalService, setUserIdMapperPersistence, setUserLocalService, setUserNotificationEventLocalService, setUserNotificationEventPersistence, setUserOrganizations, setUserPersistence, setUserService, setUserTrackerLocalService, setUserTrackerPathLocalService, setUserTrackerPathPersistence, setUserTrackerPersistence, setVirtualHostLocalService, setVirtualHostPersistence, setWebDAVPropsLocalService, setWebDAVPropsPersistence, setWebsiteLocalService, setWebsitePersistence, setWebsiteService, setWorkflowDefinitionLinkLocalService, setWorkflowDefinitionLinkPersistence, setWorkflowInstanceLinkLocalService, setWorkflowInstanceLinkPersistence, updateOrganization, updateOrganization
 
Methods inherited from class com.liferay.portal.service.BaseLocalServiceImpl
getClassLoader
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrganizationLocalServiceImpl

public OrganizationLocalServiceImpl()
Method Detail

addGroupOrganizations

public void addGroupOrganizations(long groupId,
                                  long[] organizationIds)
                           throws PortalException,
                                  SystemException
Adds the organizations to the group.

Specified by:
addGroupOrganizations in interface OrganizationLocalService
Overrides:
addGroupOrganizations in class OrganizationLocalServiceBaseImpl
Parameters:
groupId - the primary key of the group
organizationIds - the primary keys of the organizations
Throws:
PortalException - if a group or organization with the primary key could not be found
SystemException - if a system exception occurred

addOrganization

public 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
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 organization's service context (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 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 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 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

deleteOrganization

public Organization deleteOrganization(long organizationId)
                                throws PortalException,
                                       SystemException
Deletes the organization. The organization's associated resources and assets are also deleted.

Specified by:
deleteOrganization in interface OrganizationLocalService
Overrides:
deleteOrganization in class OrganizationLocalServiceBaseImpl
Parameters:
organizationId - the primary key of the organization
Returns:
the deleted organization
Throws:
PortalException - if an organization with the primary key could not be found, if the organization had a workflow in approved status, or if the organization was a parent organization
SystemException - if a system exception occurred

deleteOrganization

public Organization deleteOrganization(Organization organization)
                                throws PortalException,
                                       SystemException
Deletes the organization. The organization's associated resources and assets are also deleted.

Specified by:
deleteOrganization in interface OrganizationLocalService
Overrides:
deleteOrganization in class OrganizationLocalServiceBaseImpl
Parameters:
organization - the organization
Returns:
the deleted organization
Throws:
PortalException - if the organization had a workflow in approved status or if the organization was a parent organization
SystemException - if a system exception occurred

getGroupOrganizations

public List<Organization> getGroupOrganizations(long groupId)
                                         throws SystemException
Returns all the organizations belonging to the group.

Specified by:
getGroupOrganizations in interface OrganizationLocalService
Overrides:
getGroupOrganizations in class OrganizationLocalServiceBaseImpl
Parameters:
groupId - the primary key of the group
Returns:
the organizations belonging to the group
Throws:
SystemException - if a system exception occurred

getOrganization

public 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 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 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 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 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 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 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 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 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 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 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 List<Organization> getUserOrganizations(long userId)
                                        throws PortalException,
                                               SystemException
Returns all the organizations associated with the user.

Specified by:
getUserOrganizations in interface OrganizationLocalService
Overrides:
getUserOrganizations in class OrganizationLocalServiceBaseImpl
Parameters:
userId - the primary key of the user
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

getUserOrganizations

public 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

getUserOrganizations

public List<Organization> getUserOrganizations(long userId,
                                               int start,
                                               int end)
                                        throws PortalException,
                                               SystemException
Returns a range of all the organizations associated with the user.

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.

Specified by:
getUserOrganizations in interface OrganizationLocalService
Overrides:
getUserOrganizations in class OrganizationLocalServiceBaseImpl
Parameters:
userId - the primary key of the user
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 organizations associated with the user
Throws:
PortalException - if a user with the primary key could not be found
SystemException - if a system exception occurred

getUserOrganizationsCount

@ThreadLocalCachable
public int getUserOrganizationsCount(long userId)
                              throws SystemException
Returns the number of organizations associated with the user.

Specified by:
getUserOrganizationsCount in interface OrganizationLocalService
Overrides:
getUserOrganizationsCount in class OrganizationLocalServiceBaseImpl
Parameters:
userId - the primary key of the user
Returns:
the number of organizations associated with the user
Throws:
SystemException - if a system exception occurred

hasGroupOrganization

public boolean hasGroupOrganization(long groupId,
                                    long organizationId)
                             throws SystemException
Returns true if the organization belongs to the group.

Specified by:
hasGroupOrganization in interface OrganizationLocalService
Overrides:
hasGroupOrganization in class OrganizationLocalServiceBaseImpl
Parameters:
groupId - the primary key of the group
organizationId - the primary key of the organization
Returns:
true if the organization belongs to the group; false otherwise
Throws:
SystemException - if a system exception occurred

hasPasswordPolicyOrganization

public 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 boolean hasUserOrganization(long userId,
                                   long organizationId)
                            throws SystemException
Returns true if the user is a member of the organization. This method is usually called to determine if the user has view access to a resource belonging to the organization.

Specified by:
hasUserOrganization in interface OrganizationLocalService
Overrides:
hasUserOrganization in class OrganizationLocalServiceBaseImpl
Parameters:
userId - the primary key of the user
organizationId - the primary key of the organization
Returns:
true if the user has access to the organization; false otherwise
Throws:
SystemException - if a system exception occurred

hasUserOrganization

public 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 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
See Also:
com.liferay.portal.service.persistence.OrganizationPersistence#rebuildTree( long, boolean)

search

public List<Organization> search(long companyId,
                                 LinkedHashMap<String,Object> params,
                                 int start,
                                 int end)
                          throws SystemException
Returns a range of all the organizations of the company.

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 company
params - the finder parameters (optionally null). For more information see com.liferay.portlet.enterpriseadmin.util.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)
Returns:
the range of all the organizations of the company
Throws:
SystemException - if a system exception occurred

search

public 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 com.liferay.portlet.enterpriseadmin.util.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:
com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer

search

public 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 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 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 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 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 com.liferay.portlet.enterpriseadmin.util.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:
com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer

searchCount

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

setGroupOrganizations

public void setGroupOrganizations(long groupId,
                                  long[] organizationIds)
                           throws PortalException,
                                  SystemException
Sets the organizations in the group, removing and adding organizations to the group as necessary.

Specified by:
setGroupOrganizations in interface OrganizationLocalService
Overrides:
setGroupOrganizations in class OrganizationLocalServiceBaseImpl
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

unsetGroupOrganizations

public 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 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 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 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
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 organization's service context (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

addSuborganizations

protected void addSuborganizations(List<Organization> allSuborganizations,
                                   List<Organization> organizations)
                            throws SystemException
Throws:
SystemException

getParentOrganizationId

protected long getParentOrganizationId(long companyId,
                                       long parentOrganizationId)
                                throws SystemException
Throws:
SystemException

getParentOrganizations

protected List<Organization> getParentOrganizations(Organization organization,
                                                    boolean lastOrganization)
                                             throws PortalException,
                                                    SystemException
Throws:
PortalException
SystemException

getReindexOrganizationIds

protected long[] getReindexOrganizationIds(Organization organization)
                                    throws PortalException,
                                           SystemException
Throws:
PortalException
SystemException

isParentOrganization

protected boolean isParentOrganization(long parentOrganizationId,
                                       long organizationId)
                                throws PortalException,
                                       SystemException
Throws:
PortalException
SystemException

validate

protected void validate(long companyId,
                        long organizationId,
                        long parentOrganizationId,
                        String name,
                        String type,
                        long countryId,
                        int statusId)
                 throws PortalException,
                        SystemException
Throws:
PortalException
SystemException

validate

protected void validate(long companyId,
                        long parentOrganizationId,
                        String name,
                        String type,
                        long countryId,
                        int statusId)
                 throws PortalException,
                        SystemException
Throws:
PortalException
SystemException

Liferay 6.1.2-ce-ga3