Liferay 7.0-ce-b4

com.liferay.portal.service
Class OrganizationServiceWrapper

java.lang.Object
  extended by com.liferay.portal.service.OrganizationServiceWrapper
All Implemented Interfaces:
BaseService, OrganizationService, ServiceWrapper<OrganizationService>

@ProviderType
public class OrganizationServiceWrapper
extends Object
implements OrganizationService, ServiceWrapper<OrganizationService>

Provides a wrapper for OrganizationService.

See Also:
OrganizationService

Constructor Summary
OrganizationServiceWrapper(OrganizationService organizationService)
           
 
Method Summary
 void addGroupOrganizations(long groupId, long[] organizationIds)
          Adds the organizations to the group.
 Organization addOrganization(long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, long statusId, String comments, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext)
          Deprecated. As of 6.2.0, replaced by #addOrganization(long, String, String, long, long, int, String, boolean, List, List, List, List, List, ServiceContext)
 Organization addOrganization(long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, long statusId, String comments, boolean site, ServiceContext serviceContext)
          Deprecated. As of 6.2.0, replaced by #addOrganization(long, String, String, long, long, int, String, boolean, ServiceContext)
 Organization addOrganization(long parentOrganizationId, String name, String type, long regionId, long countryId, long statusId, 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(long parentOrganizationId, String name, String type, long regionId, long countryId, long statusId, String comments, boolean site, ServiceContext serviceContext)
          Adds an organization.
 void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
          Assigns the password policy to the organizations, removing any other currently assigned password policies.
 void deleteLogo(long organizationId)
          Deletes the organization's logo.
 void deleteOrganization(long organizationId)
          Deletes the organization.
 Organization fetchOrganization(long organizationId)
          Returns the organization with the primary key.
 List<Organization> getManageableOrganizations(String actionId, int max)
          Deprecated. As of 6.2.0, replaced by getOrganizations(long, long, int, int)
 Organization getOrganization(long organizationId)
          Returns the organization with the primary key.
 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.
 int getOrganizationsCount(long companyId, long parentOrganizationId)
          Returns the number of organizations belonging to the parent organization.
 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 updateOrganization(long organizationId, long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, long statusId, String comments, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext)
          Deprecated. As of 6.2.0, replaced by #updateOrganization(long, long, String, String, long, long, int, String, boolean, byte[], boolean, List, List, List, List, List, ServiceContext)
 Organization updateOrganization(long organizationId, long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, long statusId, String comments, boolean site, ServiceContext serviceContext)
          Deprecated. As of 6.2.0, replaced by #updateOrganization(long, long, String, String, long, long, int, String, boolean, ServiceContext)
 Organization updateOrganization(long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusId, String comments, boolean logo, 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(long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusId, String comments, boolean site, List<Address> addresses, List<EmailAddress> emailAddresses, List<OrgLabor> orgLabors, List<Phone> phones, List<Website> websites, ServiceContext serviceContext)
          Deprecated. As of 7.0.0, replaced by #updateOrganization(long, long, String, String, long, long, int, String, boolean, byte[], boolean, List, List, List, List, List, ServiceContext)
 Organization updateOrganization(long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusId, String comments, boolean site, ServiceContext serviceContext)
          Updates the organization.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OrganizationServiceWrapper

public OrganizationServiceWrapper(OrganizationService organizationService)
Method Detail

addGroupOrganizations

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

Specified by:
addGroupOrganizations in interface OrganizationService
Parameters:
groupId - the primary key of the group
organizationIds - the primary keys of the organizations
Throws:
PortalException

addOrganization

@Deprecated
public Organization addOrganization(long parentOrganizationId,
                                               String name,
                                               String type,
                                               boolean recursable,
                                               long regionId,
                                               long countryId,
                                               long statusId,
                                               String comments,
                                               boolean site,
                                               List<Address> addresses,
                                               List<EmailAddress> emailAddresses,
                                               List<OrgLabor> orgLabors,
                                               List<Phone> phones,
                                               List<Website> websites,
                                               ServiceContext serviceContext)
                             throws PortalException
Deprecated. As of 6.2.0, replaced by #addOrganization(long, String, String, long, long, int, String, boolean, List, List, List, List, List, ServiceContext)

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:
addOrganization in interface OrganizationService
Parameters:
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
addresses - the organization's addresses
emailAddresses - the organization's email addresses
orgLabors - the organization's hours of operation
phones - the organization's phone numbers
websites - the organization's websites
serviceContext - the service context to be applied (optionally null). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

addOrganization

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

Adds an organization.

This method handles the creation and bookkeeping of the organization including its resources, metadata, and internal data structures.

Specified by:
addOrganization in interface OrganizationService
Parameters:
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
type - the organization's type
recursable - whether the permissions of the organization are to be inherited by its suborganizations
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
serviceContext - the service context to be applied (optionally null). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

addOrganization

public Organization addOrganization(long parentOrganizationId,
                                    String name,
                                    String type,
                                    long regionId,
                                    long countryId,
                                    long statusId,
                                    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:
addOrganization in interface OrganizationService
Parameters:
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
type - the organization's type
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
addresses - the organization's addresses
emailAddresses - the organization's email addresses
orgLabors - the organization's hours of operation
phones - the organization's phone numbers
websites - the organization's websites
serviceContext - the service context to be applied (optionally null). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

addOrganization

public Organization addOrganization(long parentOrganizationId,
                                    String name,
                                    String type,
                                    long regionId,
                                    long countryId,
                                    long statusId,
                                    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:
addOrganization in interface OrganizationService
Parameters:
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
type - the organization's type
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
serviceContext - the service context to be applied (optionally null). Can set asset category IDs, asset tag names, and expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

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:
addPasswordPolicyOrganizations in interface OrganizationService
Parameters:
passwordPolicyId - the primary key of the password policy
organizationIds - the primary keys of the organizations
Throws:
PortalException

deleteLogo

public void deleteLogo(long organizationId)
                throws PortalException
Deletes the organization's logo.

Specified by:
deleteLogo in interface OrganizationService
Parameters:
organizationId - the primary key of the organization
Throws:
PortalException

deleteOrganization

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

Specified by:
deleteOrganization in interface OrganizationService
Parameters:
organizationId - the primary key of the organization
Throws:
PortalException

fetchOrganization

public Organization fetchOrganization(long organizationId)
                               throws PortalException
Returns the organization with the primary key.

Specified by:
fetchOrganization in interface OrganizationService
Parameters:
organizationId - the primary key of the organization
Returns:
the organization with the primary key, or null if an organization with the primary key could not be found or if the user did not have permission to view the organization
Throws:
PortalException

getManageableOrganizations

@Deprecated
public List<Organization> getManageableOrganizations(String actionId,
                                                                int max)
                                              throws PortalException
Deprecated. As of 6.2.0, replaced by getOrganizations(long, long, int, int)

Returns all the organizations which the user has permission to manage.

Specified by:
getManageableOrganizations in interface OrganizationService
Parameters:
actionId - the permitted action
max - the maximum number of the organizations to be considered
Returns:
the organizations which the user has permission to manage
Throws:
PortalException

getOSGiServiceIdentifier

public String getOSGiServiceIdentifier()
Returns the OSGi service identifier.

Specified by:
getOSGiServiceIdentifier in interface OrganizationService
Returns:
the OSGi service identifier

getOrganization

public Organization getOrganization(long organizationId)
                             throws PortalException
Returns the organization with the primary key.

Specified by:
getOrganization in interface OrganizationService
Parameters:
organizationId - the primary key of the organization
Returns:
the organization with the primary key
Throws:
PortalException

getOrganizationId

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

Specified by:
getOrganizationId in interface OrganizationService
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:
PortalException

getOrganizations

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

Specified by:
getOrganizations in interface OrganizationService
Parameters:
companyId - the primary key of the organizations' company
parentOrganizationId - 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 - 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:
getOrganizations in interface OrganizationService
Parameters:
companyId - the primary key of the organizations' company
parentOrganizationId - the primary key of the organizations' 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

getOrganizationsCount

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

Specified by:
getOrganizationsCount in interface OrganizationService
Parameters:
companyId - the primary key of the organizations' company
parentOrganizationId - the primary key of the organizations' parent organization
Returns:
the number of organizations belonging to the parent organization

getUserOrganizations

public List<Organization> getUserOrganizations(long userId)
                                        throws PortalException
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:
getUserOrganizations in interface OrganizationService
Parameters:
userId - the primary key of the user
Returns:
the organizations with which the user is explicitly associated
Throws:
PortalException

setGroupOrganizations

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

Specified by:
setGroupOrganizations in interface OrganizationService
Parameters:
groupId - the primary key of the group
organizationIds - the primary keys of the organizations
Throws:
PortalException

unsetGroupOrganizations

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

Specified by:
unsetGroupOrganizations in interface OrganizationService
Parameters:
groupId - the primary key of the group
organizationIds - 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:
unsetPasswordPolicyOrganizations in interface OrganizationService
Parameters:
passwordPolicyId - the primary key of the password policy
organizationIds - the primary keys of the organizations
Throws:
PortalException

updateOrganization

@Deprecated
public Organization updateOrganization(long organizationId,
                                                  long parentOrganizationId,
                                                  String name,
                                                  String type,
                                                  boolean recursable,
                                                  long regionId,
                                                  long countryId,
                                                  long statusId,
                                                  String comments,
                                                  boolean site,
                                                  List<Address> addresses,
                                                  List<EmailAddress> emailAddresses,
                                                  List<OrgLabor> orgLabors,
                                                  List<Phone> phones,
                                                  List<Website> websites,
                                                  ServiceContext serviceContext)
                                throws PortalException
Deprecated. As of 6.2.0, replaced by #updateOrganization(long, long, String, String, long, long, int, String, boolean, byte[], boolean, List, List, List, List, List, ServiceContext)

Updates the organization with additional parameters.

Specified by:
updateOrganization in interface OrganizationService
Parameters:
organizationId - the primary key 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
addresses - the organization's addresses
emailAddresses - the organization's email addresses
orgLabors - the organization's hours of operation
phones - the organization's phone numbers
websites - the organization's websites
serviceContext - the service context to be applied (optionally null). Can set asset category IDs and asset tag names for the organization, and merge expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

updateOrganization

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

Updates the organization.

Specified by:
updateOrganization in interface OrganizationService
Parameters:
organizationId - the primary key 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 permissions of the organization are to be inherited by its suborganizations
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
serviceContext - the service context to be applied (optionally null). Can set asset category IDs and asset tag names for the organization, and merge expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

updateOrganization

public Organization updateOrganization(long organizationId,
                                       long parentOrganizationId,
                                       String name,
                                       String type,
                                       long regionId,
                                       long countryId,
                                       long statusId,
                                       String comments,
                                       boolean logo,
                                       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:
updateOrganization in interface OrganizationService
Parameters:
organizationId - the primary key of the organization
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
type - the organization's type
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
logo - whether to update the ogranization's logo
logoBytes - the new logo image data
site - whether the organization is to be associated with a main site
addresses - the organization's addresses
emailAddresses - the organization's email addresses
orgLabors - the organization's hours of operation
phones - the organization's phone numbers
websites - the organization's websites
serviceContext - the service context to be applied (optionally null). Can set asset category IDs and asset tag names for the organization, and merge expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

updateOrganization

@Deprecated
public Organization updateOrganization(long organizationId,
                                                  long parentOrganizationId,
                                                  String name,
                                                  String type,
                                                  long regionId,
                                                  long countryId,
                                                  long statusId,
                                                  String comments,
                                                  boolean site,
                                                  List<Address> addresses,
                                                  List<EmailAddress> emailAddresses,
                                                  List<OrgLabor> orgLabors,
                                                  List<Phone> phones,
                                                  List<Website> websites,
                                                  ServiceContext serviceContext)
                                throws PortalException
Deprecated. As of 7.0.0, replaced by #updateOrganization(long, long, String, String, long, long, int, String, boolean, byte[], boolean, List, List, List, List, List, ServiceContext)

Updates the organization with additional parameters.

Specified by:
updateOrganization in interface OrganizationService
Parameters:
organizationId - the primary key of the organization
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
type - the organization's type
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
addresses - the organization's addresses
emailAddresses - the organization's email addresses
orgLabors - the organization's hours of operation
phones - the organization's phone numbers
websites - the organization's websites
serviceContext - the service context to be applied (optionally null). Can set asset category IDs and asset tag names for the organization, and merge expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

updateOrganization

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

Specified by:
updateOrganization in interface OrganizationService
Parameters:
organizationId - the primary key of the organization
parentOrganizationId - the primary key of the organization's parent organization
name - the organization's name
type - the organization's type
regionId - the primary key of the organization's region
countryId - the primary key of the organization's country
statusId - the organization's workflow status
comments - the comments about the organization
site - whether the organization is to be associated with a main site
serviceContext - the service context to be applied (optionally null). Can set asset category IDs and asset tag names for the organization, and merge expando bridge attributes for the organization.
Returns:
the organization
Throws:
PortalException

getWrappedService

public OrganizationService getWrappedService()
Specified by:
getWrappedService in interface ServiceWrapper<OrganizationService>

setWrappedService

public void setWrappedService(OrganizationService organizationService)
Specified by:
setWrappedService in interface ServiceWrapper<OrganizationService>

Liferay 7.0-ce-b4