Liferay 6.1.2-ce-ga3

com.liferay.portal.service
Interface OrganizationService

All Superinterfaces:
BaseService
All Known Implementing Classes:
OrganizationServiceBaseImpl, OrganizationServiceImpl, OrganizationServiceWrapper

@JSONWebService
@Transactional(isolation=PORTAL,
               rollbackFor={PortalException.class,SystemException.class})
public interface OrganizationService
extends BaseService

The interface for the organization remote service.

This is a remote service. Methods of this service are expected to have security checks based on the propagated JAAS credentials because this service can be accessed remotely.

See Also:
OrganizationServiceUtil, OrganizationServiceBaseImpl, OrganizationServiceImpl
ServiceBuilder generated this class. Modifications in this class will be overwritten the next time it is generated.

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, int 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, boolean recursable, long regionId, long countryId, int 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 logo of the organization.
 void deleteOrganization(long organizationId)
          Deletes the organization.
 String getBeanIdentifier()
          Returns the Spring bean ID for this bean.
 List<Organization> getManageableOrganizations(String actionId, int max)
          Deprecated. 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.
 List<Organization> getUserOrganizations(long userId)
          Returns all the organizations associated with the user.
 void setBeanIdentifier(String beanIdentifier)
          Sets the Spring bean ID for this bean.
 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.
 Organization updateOrganization(long organizationId, long parentOrganizationId, String name, String type, boolean recursable, long regionId, long countryId, int statusId, String comments, 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, boolean recursable, long regionId, long countryId, int statusId, String comments, boolean site, ServiceContext serviceContext)
          Updates the organization.
 

Method Detail

getBeanIdentifier

String getBeanIdentifier()
Returns the Spring bean ID for this bean.

Returns:
the Spring bean ID for this bean

setBeanIdentifier

void setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean.

Parameters:
beanIdentifier - the Spring bean ID for this bean

addGroupOrganizations

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

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 or if the user did not have permission to assign group members
SystemException - if a system exception occurred

addOrganization

Organization addOrganization(long parentOrganizationId,
                             String name,
                             String type,
                             boolean recursable,
                             long regionId,
                             long countryId,
                             int statusId,
                             String comments,
                             boolean site,
                             List<Address> addresses,
                             List<EmailAddress> emailAddresses,
                             List<OrgLabor> orgLabors,
                             List<Phone> phones,
                             List<Website> websites,
                             ServiceContext serviceContext)
                             throws PortalException,
                                    SystemException
Adds an organization with additional parameters.

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

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 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 parent organization with the primary key could not be found, if the organization's information was invalid, or if the user did not have permission to add the organization
SystemException - if a system exception occurred

addOrganization

Organization addOrganization(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.

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 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 the parent organization with the primary key could not be found, if the organization information was invalid, or if the user did not have permission to add the organization
SystemException - if a system exception occurred

addPasswordPolicyOrganizations

void addPasswordPolicyOrganizations(long passwordPolicyId,
                                    long[] organizationIds)
                                    throws PortalException,
                                           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:
PortalException - if the user did not have permission to update the password policy
SystemException - if a system exception occurred

deleteLogo

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 with the primary key could not be found, if the organization's logo could not be found, or if the user did not have permission to update the organization
SystemException - if a system exception occurred

deleteOrganization

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

Parameters:
organizationId - the primary key of the organization
Throws:
PortalException - if an organization with the primary key could not be found, if the user did not have permission to delete the organization, if the organization had a workflow in approved status, or if the organization was a parent organization
SystemException - if a system exception occurred

getManageableOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getManageableOrganizations(String actionId,
                                                                                       int max)
                                              throws PortalException,
                                                     SystemException
Deprecated. Replaced by getOrganizations(long, long, int, int)

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

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 - if a portal exception occurred
SystemException - if a system exception occurred

getOrganization

@Transactional(propagation=SUPPORTS,
               readOnly=true)
Organization getOrganization(long organizationId)
                             throws PortalException,
                                    SystemException
Returns the organization with the primary key.

Parameters:
organizationId - the primary key of the organization
Returns:
the organization with the primary key
Throws:
PortalException - if an organization with the primary key could not be found or if the user did not have permission to view the organization
SystemException - if a system exception occurred

getOrganizationId

@Transactional(propagation=SUPPORTS,
               readOnly=true)
long getOrganizationId(long companyId,
                                                                String name)
                       throws PortalException,
                              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:
PortalException - if the user did not have permission to view the organization
SystemException - if a system exception occurred

getOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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 organizations' company
parentOrganizationId - the primary key of the organizations' parent organization
Returns:
the organizations belonging to the parent organization
Throws:
SystemException - if a system exception occurred

getOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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 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
Throws:
SystemException - if a system exception occurred

getOrganizationsCount

@Transactional(propagation=SUPPORTS,
               readOnly=true)
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 organizations' company
parentOrganizationId - the primary key of the organizations' parent organization
Returns:
the number of organizations belonging to the parent organization
Throws:
SystemException - if a system exception occurred

getUserOrganizations

@Transactional(propagation=SUPPORTS,
               readOnly=true)
List<Organization> getUserOrganizations(long userId)
                                        throws PortalException,
                                               SystemException
Returns all the organizations associated with the user.

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

setGroupOrganizations

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

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 or if the user did not have permission to assign group members
SystemException - if a system exception occurred

unsetGroupOrganizations

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 group or organization with the primary key could not be found or if the user did not have permission to assign group members
SystemException - if a system exception occurred

unsetPasswordPolicyOrganizations

void unsetPasswordPolicyOrganizations(long passwordPolicyId,
                                      long[] organizationIds)
                                      throws PortalException,
                                             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:
PortalException - if a password policy or organization with the primary key could not be found, or if the user did not have permission to update the password policy
SystemException - if a system exception occurred

updateOrganization

Organization updateOrganization(long organizationId,
                                long parentOrganizationId,
                                String name,
                                String type,
                                boolean recursable,
                                long regionId,
                                long countryId,
                                int statusId,
                                String comments,
                                boolean site,
                                List<Address> addresses,
                                List<EmailAddress> emailAddresses,
                                List<OrgLabor> orgLabors,
                                List<Phone> phones,
                                List<Website> websites,
                                ServiceContext serviceContext)
                                throws PortalException,
                                       SystemException
Updates the organization with additional parameters.

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 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, if the user did not have permission to update the organization information, or if the new information was invalid
SystemException - if a system exception occurred

updateOrganization

Organization updateOrganization(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:
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 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, if the user did not have permission to update the organization, or if the new information was invalid
SystemException - if a system exception occurred

Liferay 6.1.2-ce-ga3