public class OrganizationServiceImpl extends OrganizationServiceBaseImpl
counterLocalService, groupPersistence, organizationFinder, organizationLocalService, organizationPersistence, organizationService, userPersistence| Constructor and Description |
|---|
OrganizationServiceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addGroupOrganizations(long groupId,
long[] organizationIds)
Adds the organizations to the group.
|
com.liferay.portal.kernel.model.Organization |
addOrganization(long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean site,
List<com.liferay.portal.kernel.model.Address> addresses,
List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses,
List<com.liferay.portal.kernel.model.OrgLabor> orgLabors,
List<com.liferay.portal.kernel.model.Phone> phones,
List<com.liferay.portal.kernel.model.Website> websites,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds an organization with additional parameters.
|
com.liferay.portal.kernel.model.Organization |
addOrganization(long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean site,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Adds an organization.
|
com.liferay.portal.kernel.model.User |
addOrganizationUserByEmailAddress(String emailAddress,
long organizationId,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
com.liferay.portal.kernel.model.Organization |
addOrUpdateOrganization(String externalReferenceCode,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean hasLogo,
byte[] logoBytes,
boolean site,
List<com.liferay.portal.kernel.model.Address> addresses,
List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses,
List<com.liferay.portal.kernel.model.OrgLabor> orgLabors,
List<com.liferay.portal.kernel.model.Phone> phones,
List<com.liferay.portal.kernel.model.Website> websites,
com.liferay.portal.kernel.service.ServiceContext serviceContext) |
void |
addPasswordPolicyOrganizations(long passwordPolicyId,
long[] organizationIds)
Assigns the password policy to the organizations, removing any other
currently assigned password policies.
|
void |
addUserOrganizationByEmailAddress(String emailAddress,
long organizationId) |
void |
deleteLogo(long organizationId)
Deletes the organization's logo.
|
void |
deleteOrganization(long organizationId)
Deletes the organization.
|
void |
deleteUserOrganizationByEmailAddress(String emailAddress,
long organizationId) |
com.liferay.portal.kernel.model.Organization |
fetchOrganization(long organizationId)
Returns the organization with the primary key.
|
List<com.liferay.portal.kernel.model.Organization> |
getGtOrganizations(long gtOrganizationId,
long companyId,
long parentOrganizationId,
int size) |
com.liferay.portal.kernel.model.Organization |
getOrganization(long organizationId)
Returns the organization with the primary key.
|
com.liferay.portal.kernel.model.Organization |
getOrganizationByExternalReferenceCode(long companyId,
String externalReferenceCode) |
long |
getOrganizationId(long companyId,
String name)
Returns the primary key of the organization with the name.
|
List<com.liferay.portal.kernel.model.Organization> |
getOrganizations(long companyId,
long parentOrganizationId)
Returns all the organizations belonging to the parent organization.
|
List<com.liferay.portal.kernel.model.Organization> |
getOrganizations(long companyId,
long parentOrganizationId,
int start,
int end)
Returns a range of all the organizations belonging to the parent
organization.
|
List<com.liferay.portal.kernel.model.Organization> |
getOrganizations(long companyId,
long parentOrganizationId,
String name,
int start,
int end) |
int |
getOrganizationsCount(long companyId,
long parentOrganizationId)
Returns the number of organizations belonging to the parent organization.
|
int |
getOrganizationsCount(long companyId,
long parentOrganizationId,
String name) |
List<com.liferay.portal.kernel.model.Organization> |
getUserOrganizations(long userId)
Returns all the organizations with which the user is explicitly
associated.
|
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.
|
com.liferay.portal.kernel.model.Organization |
updateOrganization(long organizationId,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean hasLogo,
byte[] logoBytes,
boolean site,
List<com.liferay.portal.kernel.model.Address> addresses,
List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses,
List<com.liferay.portal.kernel.model.OrgLabor> orgLabors,
List<com.liferay.portal.kernel.model.Phone> phones,
List<com.liferay.portal.kernel.model.Website> websites,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the organization with additional parameters.
|
com.liferay.portal.kernel.model.Organization |
updateOrganization(long organizationId,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean site,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
Updates the organization.
|
afterPropertiesSet, destroy, getCounterLocalService, getModelClass, getModelClassName, getOrganizationFinder, getOrganizationLocalService, getOrganizationPersistence, getOrganizationService, getOSGiServiceIdentifier, runSQL, setCounterLocalService, setOrganizationFinder, setOrganizationLocalService, setOrganizationPersistence, setOrganizationServicepublic void addGroupOrganizations(long groupId,
long[] organizationIds)
throws com.liferay.portal.kernel.exception.PortalException
groupId - the primary key of the grouporganizationIds - the primary keys of the organizationscom.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.Organization addOrganization(long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean site,
List<com.liferay.portal.kernel.model.Address> addresses,
List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses,
List<com.liferay.portal.kernel.model.OrgLabor> orgLabors,
List<com.liferay.portal.kernel.model.Phone> phones,
List<com.liferay.portal.kernel.model.Website> websites,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException
This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures.
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 countrystatusId - 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 (optionally
null). Can set asset category IDs, asset tag names,
and expando bridge attributes for the organization.com.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.Organization addOrganization(long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean site,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException
This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures.
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 countrystatusId - 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 (optionally
null). Can set asset category IDs, asset tag names,
and expando bridge attributes for the organization.com.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.User addOrganizationUserByEmailAddress(String emailAddress,
long organizationId,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.Organization addOrUpdateOrganization(String externalReferenceCode,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean hasLogo,
byte[] logoBytes,
boolean site,
List<com.liferay.portal.kernel.model.Address> addresses,
List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses,
List<com.liferay.portal.kernel.model.OrgLabor> orgLabors,
List<com.liferay.portal.kernel.model.Phone> phones,
List<com.liferay.portal.kernel.model.Website> websites,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic void addPasswordPolicyOrganizations(long passwordPolicyId,
long[] organizationIds)
throws com.liferay.portal.kernel.exception.PortalException
passwordPolicyId - the primary key of the password policyorganizationIds - the primary keys of the organizationscom.liferay.portal.kernel.exception.PortalExceptionpublic void addUserOrganizationByEmailAddress(String emailAddress,
long organizationId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic void deleteLogo(long organizationId)
throws com.liferay.portal.kernel.exception.PortalException
organizationId - the primary key of the organizationcom.liferay.portal.kernel.exception.PortalExceptionpublic void deleteOrganization(long organizationId)
throws com.liferay.portal.kernel.exception.PortalException
organizationId - the primary key of the organizationcom.liferay.portal.kernel.exception.PortalExceptionpublic void deleteUserOrganizationByEmailAddress(String emailAddress,
long organizationId)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.Organization fetchOrganization(long organizationId)
throws com.liferay.portal.kernel.exception.PortalException
organizationId - the primary key of the organizationnull if an
organization with the primary key could not be found or if the
user did not have permission to view the organizationcom.liferay.portal.kernel.exception.PortalExceptionpublic List<com.liferay.portal.kernel.model.Organization> getGtOrganizations(long gtOrganizationId,
long companyId,
long parentOrganizationId,
int size)
public com.liferay.portal.kernel.model.Organization getOrganization(long organizationId)
throws com.liferay.portal.kernel.exception.PortalException
organizationId - the primary key of the organizationcom.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.Organization getOrganizationByExternalReferenceCode(long companyId,
String externalReferenceCode)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic long getOrganizationId(long companyId,
String name)
throws com.liferay.portal.kernel.exception.PortalException
companyId - the primary key of the organization's companyname - the organization's name0 if the organization could not be foundcom.liferay.portal.kernel.exception.PortalExceptionpublic List<com.liferay.portal.kernel.model.Organization> getOrganizations(long companyId,
long parentOrganizationId)
companyId - the primary key of the organizations' companyparentOrganizationId - the primary key of the organizations' parent
organizationpublic List<com.liferay.portal.kernel.model.Organization> getOrganizations(long companyId,
long parentOrganizationId,
int start,
int end)
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.
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)public List<com.liferay.portal.kernel.model.Organization> getOrganizations(long companyId,
long parentOrganizationId,
String name,
int start,
int end)
public int getOrganizationsCount(long companyId,
long parentOrganizationId)
companyId - the primary key of the organizations' companyparentOrganizationId - the primary key of the organizations' parent
organizationpublic int getOrganizationsCount(long companyId,
long parentOrganizationId,
String name)
throws com.liferay.portal.kernel.exception.PortalException
com.liferay.portal.kernel.exception.PortalExceptionpublic List<com.liferay.portal.kernel.model.Organization> getUserOrganizations(long userId)
throws com.liferay.portal.kernel.exception.PortalException
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.
userId - the primary key of the usercom.liferay.portal.kernel.exception.PortalExceptionpublic void setGroupOrganizations(long groupId,
long[] organizationIds)
throws com.liferay.portal.kernel.exception.PortalException
groupId - the primary key of the grouporganizationIds - the primary keys of the organizationscom.liferay.portal.kernel.exception.PortalExceptionpublic void unsetGroupOrganizations(long groupId,
long[] organizationIds)
throws com.liferay.portal.kernel.exception.PortalException
groupId - the primary key of the grouporganizationIds - the primary keys of the organizationscom.liferay.portal.kernel.exception.PortalExceptionpublic void unsetPasswordPolicyOrganizations(long passwordPolicyId,
long[] organizationIds)
throws com.liferay.portal.kernel.exception.PortalException
passwordPolicyId - the primary key of the password policyorganizationIds - the primary keys of the organizationscom.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.Organization updateOrganization(long organizationId,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean hasLogo,
byte[] logoBytes,
boolean site,
List<com.liferay.portal.kernel.model.Address> addresses,
List<com.liferay.portal.kernel.model.EmailAddress> emailAddresses,
List<com.liferay.portal.kernel.model.OrgLabor> orgLabors,
List<com.liferay.portal.kernel.model.Phone> phones,
List<com.liferay.portal.kernel.model.Website> websites,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException
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 countrystatusId - 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 (optionally
null). Can set asset category IDs and asset tag
names for the organization, and merge expando bridge attributes
for the organization.com.liferay.portal.kernel.exception.PortalExceptionpublic com.liferay.portal.kernel.model.Organization updateOrganization(long organizationId,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean site,
com.liferay.portal.kernel.service.ServiceContext serviceContext)
throws com.liferay.portal.kernel.exception.PortalException
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 countrystatusId - 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 (optionally
null). Can set asset category IDs and asset tag
names for the organization, and merge expando bridge attributes
for the organization.com.liferay.portal.kernel.exception.PortalException