Class OrganizationServiceWrapper
Object
com.liferay.portal.kernel.service.OrganizationServiceWrapper
- All Implemented Interfaces:
BaseService,OrganizationService,ServiceWrapper<OrganizationService>
public class OrganizationServiceWrapper
extends Object
implements OrganizationService, ServiceWrapper<OrganizationService>
Provides a wrapper for
OrganizationService.- Author:
- Brian Wing Shun Chan
- See Also:
- {$generated.description}
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddGroupOrganizations(long groupId, long[] organizationIds) Adds the organizations to the group.addOrganization(String externalReferenceCode, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean site, ServiceContext serviceContext) Adds an organization.addOrganization(String externalReferenceCode, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext) Adds an organization with additional parameters.addOrganizationUserByEmailAddress(String emailAddress, long organizationId, ServiceContext serviceContext) addOrUpdateOrganization(String externalReferenceCode, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean hasLogo, byte[] logoBytes, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext) voidaddPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) Assigns the password policy to the organizations, removing any other currently assigned password policies.voidaddUserOrganizationByEmailAddress(String emailAddress, long organizationId) voiddeleteLogo(long organizationId) Deletes the organization's logo.voiddeleteOrganization(long organizationId) Deletes the organization.voiddeleteUserOrganizationByEmailAddress(String emailAddress, long organizationId) fetchOrganization(long organizationId) Returns the organization with the primary key.fetchOrganizationByExternalReferenceCode(String externalReferenceCode, long companyId) getGtOrganizations(long gtOrganizationId, long companyId, long parentOrganizationId, int size) getOrganization(long organizationId) Returns the organization with the primary key.getOrganizationByExternalReferenceCode(String externalReferenceCode, long companyId) longgetOrganizationId(long companyId, String name) Returns the primary key of the organization with the name.getOrganizations(long companyId, long parentOrganizationId) Returns all the organizations belonging to the parent organization.getOrganizations(long companyId, long parentOrganizationId, int start, int end) Returns a range of all the organizations belonging to the parent organization.getOrganizations(long companyId, long parentOrganizationId, int start, int end, OrderByComparator<Organization> orderByComparator) getOrganizations(long companyId, long parentOrganizationId, String name, int start, int end) getOrganizations(long companyId, long parentOrganizationId, String name, int start, int end, OrderByComparator<Organization> orderByComparator) intgetOrganizationsCount(long companyId, long parentOrganizationId) Returns the number of organizations belonging to the parent organization.intgetOrganizationsCount(long companyId, long parentOrganizationId, String name) Returns the OSGi service identifier.getUserOrganizations(long userId) Returns all the organizations with which the user is explicitly associated.voidsetGroupOrganizations(long groupId, long[] organizationIds) Sets the organizations in the group, removing and adding organizations to the group as necessary.voidsetWrappedService(OrganizationService organizationService) voidunsetGroupOrganizations(long groupId, long[] organizationIds) Removes the organizations from the group.voidunsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) Removes the organizations from the password policy.updateLogo(long organizationId, byte[] logoBytes) updateOrganization(String externalReferenceCode, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean hasLogo, byte[] logoBytes, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext) Updates the organization with additional parameters.updateOrganization(String externalReferenceCode, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean site, ServiceContext serviceContext) Updates the organization.
-
Constructor Details
-
OrganizationServiceWrapper
public OrganizationServiceWrapper() -
OrganizationServiceWrapper
-
-
Method Details
-
addGroupOrganizations
Adds the organizations to the group.- Specified by:
addGroupOrganizationsin interfaceOrganizationService- Parameters:
groupId- the primary key of the grouporganizationIds- the primary keys of the organizations- Throws:
PortalException
-
addOrganization
public Organization addOrganization(String externalReferenceCode, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext) throws PortalException Adds an organization with additional parameters.This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures.
- Specified by:
addOrganizationin interfaceOrganizationService- Parameters:
parentOrganizationId- the primary key of the organization's parent organizationname- the organization's nametype- the organization's typeregionId- the primary key of the organization's regioncountryId- the primary key of the organization's countrystatusListTypeId- the organization's workflow statuscomments- the comments about the organizationsite- whether the organization is to be associated with a main siteaddresses- the organization's addressesemailAddresses- the organization's email addressesorgLabors- the organization's hours of operationphones- the organization's phone numberswebsites- the organization's websitesserviceContext- the service context to be applied (optionallynull). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.- Returns:
- the organization
- Throws:
PortalException
-
addOrganization
public Organization addOrganization(String externalReferenceCode, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean site, ServiceContext serviceContext) throws PortalException Adds an organization.This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures.
- Specified by:
addOrganizationin interfaceOrganizationService- Parameters:
parentOrganizationId- the primary key of the organization's parent organizationname- the organization's nametype- the organization's typeregionId- the primary key of the organization's regioncountryId- the primary key of the organization's countrystatusListTypeId- the organization's workflow statuscomments- the comments about the organizationsite- whether the organization is to be associated with a main siteserviceContext- the service context to be applied (optionallynull). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.- Returns:
- the organization
- Throws:
PortalException
-
addOrganizationUserByEmailAddress
public User addOrganizationUserByEmailAddress(String emailAddress, long organizationId, ServiceContext serviceContext) throws PortalException - Specified by:
addOrganizationUserByEmailAddressin interfaceOrganizationService- Throws:
PortalException
-
addOrUpdateOrganization
public Organization addOrUpdateOrganization(String externalReferenceCode, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean hasLogo, byte[] logoBytes, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext) throws PortalException - Specified by:
addOrUpdateOrganizationin interfaceOrganizationService- Throws:
PortalException
-
addPasswordPolicyOrganizations
public void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) throws PortalException Assigns the password policy to the organizations, removing any other currently assigned password policies.- Specified by:
addPasswordPolicyOrganizationsin interfaceOrganizationService- Parameters:
passwordPolicyId- the primary key of the password policyorganizationIds- the primary keys of the organizations- Throws:
PortalException
-
addUserOrganizationByEmailAddress
public void addUserOrganizationByEmailAddress(String emailAddress, long organizationId) throws PortalException - Specified by:
addUserOrganizationByEmailAddressin interfaceOrganizationService- Throws:
PortalException
-
deleteLogo
Deletes the organization's logo.- Specified by:
deleteLogoin interfaceOrganizationService- Parameters:
organizationId- the primary key of the organization- Throws:
PortalException
-
deleteOrganization
Deletes the organization. The organization's associated resources and assets are also deleted.- Specified by:
deleteOrganizationin interfaceOrganizationService- Parameters:
organizationId- the primary key of the organization- Throws:
PortalException
-
deleteUserOrganizationByEmailAddress
public void deleteUserOrganizationByEmailAddress(String emailAddress, long organizationId) throws PortalException - Specified by:
deleteUserOrganizationByEmailAddressin interfaceOrganizationService- Throws:
PortalException
-
fetchOrganization
Returns the organization with the primary key.- Specified by:
fetchOrganizationin interfaceOrganizationService- Parameters:
organizationId- the primary key of the organization- Returns:
- the organization with the primary key, or
nullif an organization with the primary key could not be found or if the user did not have permission to view the organization - Throws:
PortalException
-
fetchOrganizationByExternalReferenceCode
public Organization fetchOrganizationByExternalReferenceCode(String externalReferenceCode, long companyId) throws PortalException - Specified by:
fetchOrganizationByExternalReferenceCodein interfaceOrganizationService- Throws:
PortalException
-
getGtOrganizations
public List<Organization> getGtOrganizations(long gtOrganizationId, long companyId, long parentOrganizationId, int size) - Specified by:
getGtOrganizationsin interfaceOrganizationService
-
getOrganization
Returns the organization with the primary key.- Specified by:
getOrganizationin interfaceOrganizationService- Parameters:
organizationId- the primary key of the organization- Returns:
- the organization with the primary key
- Throws:
PortalException
-
getOrganizationByExternalReferenceCode
public Organization getOrganizationByExternalReferenceCode(String externalReferenceCode, long companyId) throws PortalException - Specified by:
getOrganizationByExternalReferenceCodein interfaceOrganizationService- Throws:
PortalException
-
getOrganizationId
Returns the primary key of the organization with the name.- Specified by:
getOrganizationIdin interfaceOrganizationService- Parameters:
companyId- the primary key of the organization's companyname- the organization's name- Returns:
- the primary key of the organization with the name, or
0if the organization could not be found - Throws:
PortalException
-
getOrganizations
Returns all the organizations belonging to the parent organization.- Specified by:
getOrganizationsin interfaceOrganizationService- Parameters:
companyId- the primary key of the organizations' companyparentOrganizationId- the primary key of the organizations' parent organization- Returns:
- the organizations belonging to the parent organization
-
getOrganizations
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end) Returns a range of all the organizations belonging to the parent organization.Useful when paginating results. Returns a maximum of
end - startinstances.startandendare not primary keys, they are indexes in the result set. Thus,0refers to the first result in the set. Setting bothstartandendtoQueryUtil.ALL_POSwill return the full result set.- Specified by:
getOrganizationsin interfaceOrganizationService- Parameters:
companyId- the primary key of the organizations' companyparentOrganizationId- the primary key of the organizations' parent organizationstart- the lower bound of the range of organizations to returnend- the upper bound of the range of organizations to return (not inclusive)- Returns:
- the range of organizations belonging to the parent organization
-
getOrganizations
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end, OrderByComparator<Organization> orderByComparator) - Specified by:
getOrganizationsin interfaceOrganizationService
-
getOrganizations
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, String name, int start, int end) - Specified by:
getOrganizationsin interfaceOrganizationService
-
getOrganizations
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, String name, int start, int end, OrderByComparator<Organization> orderByComparator) - Specified by:
getOrganizationsin interfaceOrganizationService
-
getOrganizationsCount
public int getOrganizationsCount(long companyId, long parentOrganizationId) Returns the number of organizations belonging to the parent organization.- Specified by:
getOrganizationsCountin interfaceOrganizationService- Parameters:
companyId- the primary key of the organizations' companyparentOrganizationId- the primary key of the organizations' parent organization- Returns:
- the number of organizations belonging to the parent organization
-
getOrganizationsCount
public int getOrganizationsCount(long companyId, long parentOrganizationId, String name) throws PortalException - Specified by:
getOrganizationsCountin interfaceOrganizationService- Throws:
PortalException
-
getOSGiServiceIdentifier
Returns the OSGi service identifier.- Specified by:
getOSGiServiceIdentifierin interfaceOrganizationService- Returns:
- the OSGi service identifier
-
getUserOrganizations
Returns all the organizations with which the user is explicitly associated.A user is considered to be explicitly associated with an organization if his account is individually created within the organization or if the user is later added as a member.
- Specified by:
getUserOrganizationsin interfaceOrganizationService- Parameters:
userId- the primary key of the user- Returns:
- the organizations with which the user is explicitly associated
- Throws:
PortalException
-
setGroupOrganizations
Sets the organizations in the group, removing and adding organizations to the group as necessary.- Specified by:
setGroupOrganizationsin interfaceOrganizationService- Parameters:
groupId- the primary key of the grouporganizationIds- the primary keys of the organizations- Throws:
PortalException
-
unsetGroupOrganizations
Removes the organizations from the group.- Specified by:
unsetGroupOrganizationsin interfaceOrganizationService- Parameters:
groupId- the primary key of the grouporganizationIds- the primary keys of the organizations- Throws:
PortalException
-
unsetPasswordPolicyOrganizations
public void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) throws PortalException Removes the organizations from the password policy.- Specified by:
unsetPasswordPolicyOrganizationsin interfaceOrganizationService- Parameters:
passwordPolicyId- the primary key of the password policyorganizationIds- the primary keys of the organizations- Throws:
PortalException
-
updateLogo
- Specified by:
updateLogoin interfaceOrganizationService- Throws:
PortalException
-
updateOrganization
public Organization updateOrganization(String externalReferenceCode, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean hasLogo, byte[] logoBytes, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext) throws PortalException Updates the organization with additional parameters.- Specified by:
updateOrganizationin interfaceOrganizationService- Parameters:
organizationId- the primary key of the organizationparentOrganizationId- the primary key of the organization's parent organizationname- the organization's nametype- the organization's typeregionId- the primary key of the organization's regioncountryId- the primary key of the organization's countrystatusListTypeId- the organization's workflow statuscomments- the comments about the organizationhasLogo- if the organization has a custom logologoBytes- the new logo image datasite- whether the organization is to be associated with a main siteaddresses- the organization's addressesemailAddresses- the organization's email addressesorgLabors- the organization's hours of operationphones- the organization's phone numberswebsites- the organization's websitesserviceContext- the service context to be applied (optionallynull). 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
-
updateOrganization
public Organization updateOrganization(String externalReferenceCode, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusListTypeId, String comments, boolean site, ServiceContext serviceContext) throws PortalException Updates the organization.- Specified by:
updateOrganizationin interfaceOrganizationService- Parameters:
organizationId- the primary key of the organizationparentOrganizationId- the primary key of the organization's parent organizationname- the organization's nametype- the organization's typeregionId- the primary key of the organization's regioncountryId- the primary key of the organization's countrystatusListTypeId- the organization's workflow statuscomments- the comments about the organizationsite- whether the organization is to be associated with a main siteserviceContext- the service context to be applied (optionallynull). 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
-
getWrappedService
- Specified by:
getWrappedServicein interfaceServiceWrapper<OrganizationService>
-
setWrappedService
- Specified by:
setWrappedServicein interfaceServiceWrapper<OrganizationService>
-