|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.liferay.portal.service.OrganizationServiceUtil
public class OrganizationServiceUtil
The utility for the organization remote service. This utility wraps OrganizationServiceImpl
and is the primary access point for service operations in application layer code running on a remote server.
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.
OrganizationService
,
OrganizationServiceBaseImpl
,
OrganizationServiceImpl
Constructor Summary | |
---|---|
OrganizationServiceUtil()
|
Method Summary | |
---|---|
static void |
addGroupOrganizations(long groupId,
long[] organizationIds)
Adds the organizations to the group. |
static 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. |
static 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. |
static void |
addPasswordPolicyOrganizations(long passwordPolicyId,
long[] organizationIds)
Assigns the password policy to the organizations, removing any other currently assigned password policies. |
static void |
deleteLogo(long organizationId)
Deletes the logo of the organization. |
static void |
deleteOrganization(long organizationId)
Deletes the organization. |
static String |
getBeanIdentifier()
Returns the Spring bean ID for this bean. |
static List<Organization> |
getManageableOrganizations(String actionId,
int max)
Deprecated. Replaced by getOrganizations(long, long, int, int) |
static Organization |
getOrganization(long organizationId)
Returns the organization with the primary key. |
static long |
getOrganizationId(long companyId,
String name)
Returns the primary key of the organization with the name. |
static List<Organization> |
getOrganizations(long companyId,
long parentOrganizationId)
Returns all the organizations belonging to the parent organization. |
static List<Organization> |
getOrganizations(long companyId,
long parentOrganizationId,
int start,
int end)
Returns a range of all the organizations belonging to the parent organization. |
static int |
getOrganizationsCount(long companyId,
long parentOrganizationId)
Returns the number of organizations belonging to the parent organization. |
static OrganizationService |
getService()
|
static List<Organization> |
getUserOrganizations(long userId)
Returns all the organizations associated with the user. |
static void |
setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean. |
static void |
setGroupOrganizations(long groupId,
long[] organizationIds)
Sets the organizations in the group, removing and adding organizations to the group as necessary. |
void |
setService(OrganizationService service)
Deprecated. |
static void |
unsetGroupOrganizations(long groupId,
long[] organizationIds)
Removes the organizations from the group. |
static void |
unsetPasswordPolicyOrganizations(long passwordPolicyId,
long[] organizationIds)
Removes the organizations from the password policy. |
static 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. |
static 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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrganizationServiceUtil()
Method Detail |
---|
public static String getBeanIdentifier()
public static void setBeanIdentifier(String beanIdentifier)
beanIdentifier
- the Spring bean ID for this beanpublic static void addGroupOrganizations(long groupId, long[] organizationIds) throws PortalException, SystemException
groupId
- the primary key of the grouporganizationIds
- the primary keys of the organizations
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 occurredpublic static 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
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 typerecursable
- whether the permissions of the organization are to be
inherited by its suborganizationsregionId
- 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 organization's service context (optionally
null
). Can set asset category IDs, asset tag names,
and expando bridge attributes for the organization.
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 occurredpublic static 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
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 typerecursable
- whether the permissions of the organization are to be
inherited by its suborganizationsregionId
- 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 organization's service context (optionally
null
). Can set asset category IDs, asset tag names,
and expando bridge attributes for the organization.
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 occurredpublic static void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) throws PortalException, SystemException
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizations
PortalException
- if the user did not have permission to update the
password policy
SystemException
- if a system exception occurredpublic static void deleteLogo(long organizationId) throws PortalException, SystemException
organizationId
- the primary key of the organization
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 occurredpublic static void deleteOrganization(long organizationId) throws PortalException, SystemException
organizationId
- the primary key of the organization
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 occurredpublic static List<Organization> getManageableOrganizations(String actionId, int max) throws PortalException, SystemException
getOrganizations(long, long, int, int)
actionId
- the permitted actionmax
- the maximum number of the organizations to be considered
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic static Organization getOrganization(long organizationId) throws PortalException, SystemException
organizationId
- the primary key of the organization
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 occurredpublic static long getOrganizationId(long companyId, String name) throws PortalException, SystemException
companyId
- the primary key of the organization's companyname
- the organization's name
0
if the organization could not be found
PortalException
- if the user did not have permission to view the
organization
SystemException
- if a system exception occurredpublic static List<Organization> getOrganizations(long companyId, long parentOrganizationId) throws SystemException
companyId
- the primary key of the organizations' companyparentOrganizationId
- the primary key of the organizations' parent
organization
SystemException
- if a system exception occurredpublic static List<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end) throws SystemException
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)
SystemException
- if a system exception occurredpublic static int getOrganizationsCount(long companyId, long parentOrganizationId) throws SystemException
companyId
- the primary key of the organizations' companyparentOrganizationId
- the primary key of the organizations' parent
organization
SystemException
- if a system exception occurredpublic static List<Organization> getUserOrganizations(long userId) throws PortalException, SystemException
userId
- the primary key of the user
PortalException
- if a user with the primary key could not be found
SystemException
- if a system exception occurredpublic static void setGroupOrganizations(long groupId, long[] organizationIds) throws PortalException, SystemException
groupId
- the primary key of the grouporganizationIds
- the primary keys of the organizations
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 occurredpublic static void unsetGroupOrganizations(long groupId, long[] organizationIds) throws PortalException, SystemException
groupId
- the primary key of the grouporganizationIds
- the primary keys of the organizations
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 occurredpublic static void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) throws PortalException, SystemException
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizations
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 occurredpublic static 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
organizationId
- the primary key of the organizationparentOrganizationId
- the primary key of the organization's parent
organizationname
- the organization's nametype
- the organization's typerecursable
- whether the permissions of the organization are to be
inherited by its suborganizationsregionId
- 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 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.
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 occurredpublic static 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
organizationId
- the primary key of the organizationparentOrganizationId
- the primary key of the organization's parent
organizationname
- the organization's nametype
- the organization's typerecursable
- whether permissions of the organization are to be
inherited by its suborganizationsregionId
- 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 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.
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 occurredpublic static OrganizationService getService()
public void setService(OrganizationService service)
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |