public class OrganizationServiceWrapper extends Object implements OrganizationService, ServiceWrapper<OrganizationService>
OrganizationService
.OrganizationService
Constructor and Description |
---|
OrganizationServiceWrapper() |
OrganizationServiceWrapper(OrganizationService organizationService) |
Modifier and Type | Method and Description |
---|---|
void |
addGroupOrganizations(long groupId,
long[] organizationIds)
Adds the organizations to the group.
|
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.
|
Organization |
addOrganization(String externalReferenceCode,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusListTypeId,
String comments,
boolean site,
ServiceContext serviceContext)
Adds an organization.
|
User |
addOrganizationUserByEmailAddress(String emailAddress,
long organizationId,
ServiceContext serviceContext) |
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) |
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) |
Organization |
fetchOrganization(long organizationId)
Returns the organization with the primary key.
|
Organization |
fetchOrganizationByExternalReferenceCode(String externalReferenceCode,
long companyId) |
List<Organization> |
getGtOrganizations(long gtOrganizationId,
long companyId,
long parentOrganizationId,
int size) |
Organization |
getOrganization(long organizationId)
Returns the organization with the primary key.
|
Organization |
getOrganizationByExternalReferenceCode(long companyId,
String externalReferenceCode) |
long |
getOrganizationId(long companyId,
String name)
Returns the primary key of the organization with the name.
|
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.
|
List<Organization> |
getOrganizations(long companyId,
long parentOrganizationId,
int start,
int end,
OrderByComparator<Organization> orderByComparator) |
List<Organization> |
getOrganizations(long companyId,
long parentOrganizationId,
String name,
int start,
int end) |
List<Organization> |
getOrganizations(long companyId,
long parentOrganizationId,
String name,
int start,
int end,
OrderByComparator<Organization> orderByComparator) |
int |
getOrganizationsCount(long companyId,
long parentOrganizationId)
Returns the number of organizations belonging to the parent organization.
|
int |
getOrganizationsCount(long companyId,
long parentOrganizationId,
String name) |
String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
List<Organization> |
getUserOrganizations(long userId)
Returns all the organizations with which the user is explicitly
associated.
|
OrganizationService |
getWrappedService() |
void |
setGroupOrganizations(long groupId,
long[] organizationIds)
Sets the organizations in the group, removing and adding organizations to
the group as necessary.
|
void |
setWrappedService(OrganizationService organizationService) |
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.
|
Organization |
updateLogo(long organizationId,
byte[] logoBytes) |
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)
Updates the organization with additional parameters.
|
Organization |
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.
|
public OrganizationServiceWrapper()
public OrganizationServiceWrapper(OrganizationService organizationService)
public void addGroupOrganizations(long groupId, long[] organizationIds) throws PortalException
addGroupOrganizations
in interface OrganizationService
groupId
- the primary key of the grouporganizationIds
- the primary keys of the organizationsPortalException
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
This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures.
addOrganization
in interface OrganizationService
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 (optionally
null
). Can set asset category IDs, asset tag names,
and expando bridge attributes for the organization.PortalException
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
This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures.
addOrganization
in interface OrganizationService
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 (optionally
null
). Can set asset category IDs, asset tag names,
and expando bridge attributes for the organization.PortalException
public User addOrganizationUserByEmailAddress(String emailAddress, long organizationId, ServiceContext serviceContext) throws PortalException
addOrganizationUserByEmailAddress
in interface OrganizationService
PortalException
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
addOrUpdateOrganization
in interface OrganizationService
PortalException
public void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) throws PortalException
addPasswordPolicyOrganizations
in interface OrganizationService
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizationsPortalException
public void addUserOrganizationByEmailAddress(String emailAddress, long organizationId) throws PortalException
addUserOrganizationByEmailAddress
in interface OrganizationService
PortalException
public void deleteLogo(long organizationId) throws PortalException
deleteLogo
in interface OrganizationService
organizationId
- the primary key of the organizationPortalException
public void deleteOrganization(long organizationId) throws PortalException
deleteOrganization
in interface OrganizationService
organizationId
- the primary key of the organizationPortalException
public void deleteUserOrganizationByEmailAddress(String emailAddress, long organizationId) throws PortalException
deleteUserOrganizationByEmailAddress
in interface OrganizationService
PortalException
public Organization fetchOrganization(long organizationId) throws PortalException
fetchOrganization
in interface OrganizationService
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 organizationPortalException
public Organization fetchOrganizationByExternalReferenceCode(String externalReferenceCode, long companyId) throws PortalException
fetchOrganizationByExternalReferenceCode
in interface OrganizationService
PortalException
public List<Organization> getGtOrganizations(long gtOrganizationId, long companyId, long parentOrganizationId, int size)
getGtOrganizations
in interface OrganizationService
public Organization getOrganization(long organizationId) throws PortalException
getOrganization
in interface OrganizationService
organizationId
- the primary key of the organizationPortalException
public Organization getOrganizationByExternalReferenceCode(long companyId, String externalReferenceCode) throws PortalException
getOrganizationByExternalReferenceCode
in interface OrganizationService
PortalException
public long getOrganizationId(long companyId, String name) throws PortalException
getOrganizationId
in interface OrganizationService
companyId
- the primary key of the organization's companyname
- the organization's name0
if the organization could not be foundPortalException
public List<Organization> getOrganizations(long companyId, long parentOrganizationId)
getOrganizations
in interface OrganizationService
companyId
- the primary key of the organizations' companyparentOrganizationId
- the primary key of the organizations' parent
organizationpublic List<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.
getOrganizations
in interface OrganizationService
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<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end, OrderByComparator<Organization> orderByComparator)
getOrganizations
in interface OrganizationService
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, String name, int start, int end)
getOrganizations
in interface OrganizationService
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, String name, int start, int end, OrderByComparator<Organization> orderByComparator)
getOrganizations
in interface OrganizationService
public int getOrganizationsCount(long companyId, long parentOrganizationId)
getOrganizationsCount
in interface OrganizationService
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 PortalException
getOrganizationsCount
in interface OrganizationService
PortalException
public String getOSGiServiceIdentifier()
getOSGiServiceIdentifier
in interface OrganizationService
public List<Organization> getUserOrganizations(long userId) throws 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.
getUserOrganizations
in interface OrganizationService
userId
- the primary key of the userPortalException
public void setGroupOrganizations(long groupId, long[] organizationIds) throws PortalException
setGroupOrganizations
in interface OrganizationService
groupId
- the primary key of the grouporganizationIds
- the primary keys of the organizationsPortalException
public void unsetGroupOrganizations(long groupId, long[] organizationIds) throws PortalException
unsetGroupOrganizations
in interface OrganizationService
groupId
- the primary key of the grouporganizationIds
- the primary keys of the organizationsPortalException
public void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) throws PortalException
unsetPasswordPolicyOrganizations
in interface OrganizationService
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizationsPortalException
public Organization updateLogo(long organizationId, byte[] logoBytes) throws PortalException
updateLogo
in interface OrganizationService
PortalException
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
updateOrganization
in interface OrganizationService
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 (optionally
null
). Can set asset category IDs and asset tag
names for the organization, and merge expando bridge attributes
for the organization.PortalException
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
updateOrganization
in interface OrganizationService
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 (optionally
null
). Can set asset category IDs and asset tag
names for the organization, and merge expando bridge attributes
for the organization.PortalException
public OrganizationService getWrappedService()
getWrappedService
in interface ServiceWrapper<OrganizationService>
public void setWrappedService(OrganizationService organizationService)
setWrappedService
in interface ServiceWrapper<OrganizationService>