|
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.OrganizationLocalServiceUtil
public class OrganizationLocalServiceUtil
The utility for the organization local service. This utility wraps OrganizationLocalServiceImpl
and is the primary access point for service operations in application layer code running on the local server.
This is a local service. Methods of this service will not have security checks based on the propagated JAAS credentials because this service can only be accessed from within the same VM.
OrganizationLocalService
,
OrganizationLocalServiceBaseImpl
,
OrganizationLocalServiceImpl
Constructor Summary | |
---|---|
OrganizationLocalServiceUtil()
|
Method Summary | |
---|---|
static void |
addGroupOrganization(long groupId,
long organizationId)
|
static void |
addGroupOrganization(long groupId,
Organization organization)
|
static void |
addGroupOrganizations(long groupId,
List<Organization> Organizations)
|
static void |
addGroupOrganizations(long groupId,
long[] organizationIds)
|
static Organization |
addOrganization(long userId,
long parentOrganizationId,
String name,
String type,
boolean recursable,
long regionId,
long countryId,
int statusId,
String comments,
boolean site,
ServiceContext serviceContext)
Adds an organization. |
static Organization |
addOrganization(Organization organization)
Adds the organization to the database. |
static void |
addOrganizationResources(long userId,
Organization organization)
Adds a resource for each type of permission available on the organization. |
static void |
addPasswordPolicyOrganizations(long passwordPolicyId,
long[] organizationIds)
Assigns the password policy to the organizations, removing any other currently assigned password policies. |
static void |
addUserOrganization(long userId,
long organizationId)
|
static void |
addUserOrganization(long userId,
Organization organization)
|
static void |
addUserOrganizations(long userId,
List<Organization> Organizations)
|
static void |
addUserOrganizations(long userId,
long[] organizationIds)
|
static void |
clearGroupOrganizations(long groupId)
|
static void |
clearUserOrganizations(long userId)
|
static Organization |
createOrganization(long organizationId)
Creates a new organization with the primary key. |
static void |
deleteGroupOrganization(long groupId,
long organizationId)
|
static void |
deleteGroupOrganization(long groupId,
Organization organization)
|
static void |
deleteGroupOrganizations(long groupId,
List<Organization> Organizations)
|
static void |
deleteGroupOrganizations(long groupId,
long[] organizationIds)
|
static void |
deleteLogo(long organizationId)
Deletes the logo of the organization. |
static Organization |
deleteOrganization(long organizationId)
Deletes the organization with the primary key from the database. |
static Organization |
deleteOrganization(Organization organization)
Deletes the organization from the database. |
static void |
deleteUserOrganization(long userId,
long organizationId)
|
static void |
deleteUserOrganization(long userId,
Organization organization)
|
static void |
deleteUserOrganizations(long userId,
List<Organization> Organizations)
|
static void |
deleteUserOrganizations(long userId,
long[] organizationIds)
|
static DynamicQuery |
dynamicQuery()
|
static List |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows. |
static List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows. |
static List |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows. |
static long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows that match the dynamic query. |
static Organization |
fetchOrganization(long organizationId)
|
static String |
getBeanIdentifier()
Returns the Spring bean ID for this bean. |
static List<Organization> |
getGroupOrganizations(long groupId)
|
static List<Organization> |
getGroupOrganizations(long groupId,
int start,
int end)
|
static List<Organization> |
getGroupOrganizations(long groupId,
int start,
int end,
OrderByComparator orderByComparator)
|
static int |
getGroupOrganizationsCount(long groupId)
|
static Organization |
getOrganization(long organizationId)
Returns the organization with the primary key. |
static Organization |
getOrganization(long companyId,
String name)
Returns the organization with the name. |
static long |
getOrganizationId(long companyId,
String name)
Returns the primary key of the organization with the name. |
static List<Organization> |
getOrganizations(int start,
int end)
Returns a range of all the organizations. |
static List<Organization> |
getOrganizations(long[] organizationIds)
Returns the organizations with the primary keys. |
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()
Returns the number of organizations. |
static int |
getOrganizationsCount(long companyId,
long parentOrganizationId)
Returns the number of organizations belonging to the parent organization. |
static List<Organization> |
getParentOrganizations(long organizationId)
Returns the parent organizations in order by closest ancestor. |
static PersistedModel |
getPersistedModel(Serializable primaryKeyObj)
|
static OrganizationLocalService |
getService()
|
static List<Organization> |
getSuborganizations(List<Organization> organizations)
Returns the suborganizations of the organizations. |
static List<Organization> |
getSuborganizations(long companyId,
long organizationId)
Returns the suborganizations of the organization. |
static int |
getSuborganizationsCount(long companyId,
long organizationId)
Returns the count of suborganizations of the organization. |
static List<Organization> |
getSubsetOrganizations(List<Organization> allOrganizations,
List<Organization> availableOrganizations)
Returns the intersection of allOrganizations and
availableOrganizations . |
static List<Organization> |
getUserOrganizations(long userId)
|
static List<Organization> |
getUserOrganizations(long userId,
boolean includeAdministrative)
Returns all the organizations associated with the user. |
static List<Organization> |
getUserOrganizations(long userId,
int start,
int end)
|
static List<Organization> |
getUserOrganizations(long userId,
int start,
int end,
OrderByComparator orderByComparator)
|
static int |
getUserOrganizationsCount(long userId)
|
static boolean |
hasGroupOrganization(long groupId,
long organizationId)
|
static boolean |
hasGroupOrganizations(long groupId)
|
static boolean |
hasPasswordPolicyOrganization(long passwordPolicyId,
long organizationId)
Returns true if the password policy has been assigned to the
organization. |
static boolean |
hasUserOrganization(long userId,
long organizationId)
|
static boolean |
hasUserOrganization(long userId,
long organizationId,
boolean inheritSuborganizations,
boolean includeSpecifiedOrganization)
Returns true if the user is a member of the organization,
optionally focusing on suborganizations or the specified organization. |
static boolean |
hasUserOrganizations(long userId)
|
static void |
rebuildTree(long companyId)
Rebuilds the organizations tree. |
static List<Organization> |
search(long companyId,
LinkedHashMap<String,Object> params,
int start,
int end)
Returns a range of all the organizations of the company. |
static Hits |
search(long companyId,
long parentOrganizationId,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end,
Sort sort)
Returns an ordered range of all the organizations that match the keywords, using the indexer. |
static List<Organization> |
search(long companyId,
long parentOrganizationId,
String keywords,
String type,
Long regionId,
Long countryId,
LinkedHashMap<String,Object> params,
int start,
int end)
Returns a name ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer. |
static List<Organization> |
search(long companyId,
long parentOrganizationId,
String keywords,
String type,
Long regionId,
Long countryId,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the organizations that match the keywords, type, region, and country, without using the indexer. |
static List<Organization> |
search(long companyId,
long parentOrganizationId,
String name,
String type,
String street,
String city,
String zip,
Long regionId,
Long countryId,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end)
Returns a name ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer. |
static List<Organization> |
search(long companyId,
long parentOrganizationId,
String name,
String type,
String street,
String city,
String zip,
Long regionId,
Long countryId,
LinkedHashMap<String,Object> params,
boolean andOperator,
int start,
int end,
OrderByComparator obc)
Returns an ordered range of all the organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them, without using the indexer. |
static Hits |
search(long companyId,
long parentOrganizationId,
String name,
String type,
String street,
String city,
String zip,
String region,
String country,
LinkedHashMap<String,Object> params,
boolean andSearch,
int start,
int end,
Sort sort)
Returns an ordered range of all the organizations whose name, type, or location fields match the keywords specified for them, using the indexer. |
static int |
searchCount(long companyId,
long parentOrganizationId,
String keywords,
String type,
Long regionId,
Long countryId,
LinkedHashMap<String,Object> params)
Returns the number of organizations that match the keywords, type, region, and country. |
static int |
searchCount(long companyId,
long parentOrganizationId,
String name,
String type,
String street,
String city,
String zip,
Long regionId,
Long countryId,
LinkedHashMap<String,Object> params,
boolean andOperator)
Returns the number of organizations with the type, region, and country, and whose name, street, city, and zipcode match the keywords specified for them. |
static void |
setBeanIdentifier(String beanIdentifier)
Sets the Spring bean ID for this bean. |
static void |
setGroupOrganizations(long groupId,
long[] organizationIds)
|
void |
setService(OrganizationLocalService service)
Deprecated. |
static void |
setUserOrganizations(long userId,
long[] organizationIds)
|
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 void |
updateAsset(long userId,
Organization organization,
long[] assetCategoryIds,
String[] assetTagNames)
Updates the organization's asset with the new asset categories and tag names, removing and adding asset categories and tag names as necessary. |
static Organization |
updateOrganization(long companyId,
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. |
static Organization |
updateOrganization(Organization organization)
Updates the organization in the database or adds it if it does not yet exist. |
static Organization |
updateOrganization(Organization organization,
boolean merge)
Updates the organization in the database or adds it if it does not yet exist. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public OrganizationLocalServiceUtil()
Method Detail |
---|
public static Organization addOrganization(Organization organization) throws SystemException
organization
- the organization
SystemException
- if a system exception occurredpublic static Organization createOrganization(long organizationId)
organizationId
- the primary key for the new organization
public static Organization deleteOrganization(long organizationId) throws PortalException, SystemException
organizationId
- the primary key of the organization
PortalException
- if a organization with the primary key could not be found
SystemException
- if a system exception occurredpublic static Organization deleteOrganization(Organization organization) throws PortalException, SystemException
organization
- the organization
PortalException
SystemException
- if a system exception occurredpublic static DynamicQuery dynamicQuery()
public static List dynamicQuery(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic static List dynamicQuery(DynamicQuery dynamicQuery, 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.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)
SystemException
- if a system exception occurredpublic static List dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator orderByComparator) 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.
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)orderByComparator
- the comparator to order the results by (optionally null
)
SystemException
- if a system exception occurredpublic static long dynamicQueryCount(DynamicQuery dynamicQuery) throws SystemException
dynamicQuery
- the dynamic query
SystemException
- if a system exception occurredpublic static Organization fetchOrganization(long organizationId) throws SystemException
SystemException
public static Organization getOrganization(long organizationId) throws PortalException, SystemException
organizationId
- the primary key of the organization
PortalException
- if a organization with the primary key could not be found
SystemException
- if a system exception occurredpublic static PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException, SystemException
PortalException
SystemException
public static List<Organization> getOrganizations(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.
start
- the lower bound of the range of organizationsend
- the upper bound of the range of organizations (not inclusive)
SystemException
- if a system exception occurredpublic static int getOrganizationsCount() throws SystemException
SystemException
- if a system exception occurredpublic static Organization updateOrganization(Organization organization) throws SystemException
organization
- the organization
SystemException
- if a system exception occurredpublic static Organization updateOrganization(Organization organization, boolean merge) throws SystemException
organization
- the organizationmerge
- whether to merge the organization with the current session. See BatchSession.update(com.liferay.portal.kernel.dao.orm.Session, com.liferay.portal.model.BaseModel, boolean)
for an explanation.
SystemException
- if a system exception occurredpublic static void addGroupOrganization(long groupId, long organizationId) throws SystemException
SystemException
- if a system exception occurredpublic static void addGroupOrganization(long groupId, Organization organization) throws SystemException
SystemException
- if a system exception occurredpublic static void addGroupOrganizations(long groupId, long[] organizationIds) throws PortalException, SystemException
PortalException
SystemException
- if a system exception occurredpublic static void addGroupOrganizations(long groupId, List<Organization> Organizations) throws PortalException, SystemException
PortalException
SystemException
- if a system exception occurredpublic static void clearGroupOrganizations(long groupId) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteGroupOrganization(long groupId, long organizationId) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteGroupOrganization(long groupId, Organization organization) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteGroupOrganizations(long groupId, long[] organizationIds) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteGroupOrganizations(long groupId, List<Organization> Organizations) throws SystemException
SystemException
- if a system exception occurredpublic static List<Organization> getGroupOrganizations(long groupId) throws SystemException
SystemException
- if a system exception occurredpublic static List<Organization> getGroupOrganizations(long groupId, int start, int end) throws SystemException
SystemException
- if a system exception occurredpublic static List<Organization> getGroupOrganizations(long groupId, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
- if a system exception occurredpublic static int getGroupOrganizationsCount(long groupId) throws SystemException
SystemException
- if a system exception occurredpublic static boolean hasGroupOrganization(long groupId, long organizationId) throws SystemException
SystemException
- if a system exception occurredpublic static boolean hasGroupOrganizations(long groupId) throws SystemException
SystemException
- if a system exception occurredpublic static void setGroupOrganizations(long groupId, long[] organizationIds) throws PortalException, SystemException
PortalException
SystemException
- if a system exception occurredpublic static void addUserOrganization(long userId, long organizationId) throws SystemException
SystemException
- if a system exception occurredpublic static void addUserOrganization(long userId, Organization organization) throws SystemException
SystemException
- if a system exception occurredpublic static void addUserOrganizations(long userId, long[] organizationIds) throws SystemException
SystemException
- if a system exception occurredpublic static void addUserOrganizations(long userId, List<Organization> Organizations) throws SystemException
SystemException
- if a system exception occurredpublic static void clearUserOrganizations(long userId) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteUserOrganization(long userId, long organizationId) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteUserOrganization(long userId, Organization organization) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteUserOrganizations(long userId, long[] organizationIds) throws SystemException
SystemException
- if a system exception occurredpublic static void deleteUserOrganizations(long userId, List<Organization> Organizations) throws SystemException
SystemException
- if a system exception occurredpublic static List<Organization> getUserOrganizations(long userId) throws PortalException, SystemException
PortalException
SystemException
- if a system exception occurredpublic static List<Organization> getUserOrganizations(long userId, int start, int end) throws PortalException, SystemException
PortalException
SystemException
- if a system exception occurredpublic static List<Organization> getUserOrganizations(long userId, int start, int end, OrderByComparator orderByComparator) throws SystemException
SystemException
- if a system exception occurredpublic static int getUserOrganizationsCount(long userId) throws SystemException
SystemException
- if a system exception occurredpublic static boolean hasUserOrganization(long userId, long organizationId) throws SystemException
SystemException
- if a system exception occurredpublic static boolean hasUserOrganizations(long userId) throws SystemException
SystemException
- if a system exception occurredpublic static void setUserOrganizations(long userId, long[] organizationIds) throws SystemException
SystemException
- if a system exception occurredpublic static String getBeanIdentifier()
public static void setBeanIdentifier(String beanIdentifier)
beanIdentifier
- the Spring bean ID for this beanpublic static Organization addOrganization(long userId, 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. It is
not necessary to make a subsequent call to addOrganizationResources(long, Organization)
.
userId
- the primary key of the creator/owner 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
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 a creator or parent organization with the
primary key could not be found or if the organization's
information was invalid
SystemException
- if a system exception occurredpublic static void addOrganizationResources(long userId, Organization organization) throws PortalException, SystemException
userId
- the primary key of the creator/owner of the organizationorganization
- the organization
PortalException
- if a portal exception occurred
SystemException
- if a system exception occurredpublic static void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) throws SystemException
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizations
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 or parent organization with
the primary key could not be found or if the organization's logo
could not be found
SystemException
- if a system exception occurredpublic static Organization getOrganization(long companyId, String name) throws PortalException, SystemException
companyId
- the primary key of the organization's companyname
- the organization's name
PortalException
- if the organization with the name could not be
found
SystemException
- if a system exception occurredpublic static long getOrganizationId(long companyId, String name) throws SystemException
companyId
- the primary key of the organization's companyname
- the organization's name
0
if the organization could not be found
SystemException
- if a system exception occurredpublic static List<Organization> getOrganizations(long companyId, long parentOrganizationId) throws SystemException
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's 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 organization's companyparentOrganizationId
- the primary key of the organization's 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 occurredOrganizationPersistence.findByC_P(
long, long, int, int)
public static List<Organization> getOrganizations(long[] organizationIds) throws PortalException, SystemException
organizationIds
- the primary keys of the organizations
PortalException
- if any one of the organizations could not be
found
SystemException
- if a system exception occurredpublic static int getOrganizationsCount(long companyId, long parentOrganizationId) throws SystemException
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent
organization
SystemException
- if a system exception occurredpublic static List<Organization> getParentOrganizations(long organizationId) throws PortalException, SystemException
organizationId
- the primary key of the organization
PortalException
- if an organization with the primary key could not
be found
SystemException
- if a system exception occurredpublic static List<Organization> getSuborganizations(List<Organization> organizations) throws SystemException
organizations
- the organizations from which to get
suborganizations
SystemException
- if a system exception occurredpublic static List<Organization> getSuborganizations(long companyId, long organizationId) throws SystemException
companyId
- the primary key of the organization's companyorganizationId
- the primary key of the organization
SystemException
- if a system exception occurredpublic static int getSuborganizationsCount(long companyId, long organizationId) throws SystemException
companyId
- the primary key of the organization's companyorganizationId
- the primary key of the organization
SystemException
- if a system exception occurredpublic static List<Organization> getSubsetOrganizations(List<Organization> allOrganizations, List<Organization> availableOrganizations)
allOrganizations
and
availableOrganizations
.
allOrganizations
- the organizations to check for availabilityavailableOrganizations
- the available organizations
allOrganizations
and
availableOrganizations
public static List<Organization> getUserOrganizations(long userId, boolean includeAdministrative) throws PortalException, SystemException
true
, the result includes those
organizations that are not directly associated to the user but he is an
administrator or an owner of the organization.
userId
- the primary key of the userincludeAdministrative
- whether to includes organizations that are
indirectly associated to the user because he is an administrator
or an owner of the organization
PortalException
- if a user with the primary key could not be found
SystemException
- if a system exception occurredpublic static boolean hasPasswordPolicyOrganization(long passwordPolicyId, long organizationId) throws SystemException
true
if the password policy has been assigned to the
organization.
passwordPolicyId
- the primary key of the password policyorganizationId
- the primary key of the organization
true
if the password policy has been assigned to the
organization; false
otherwise
SystemException
- if a system exception occurredpublic static boolean hasUserOrganization(long userId, long organizationId, boolean inheritSuborganizations, boolean includeSpecifiedOrganization) throws PortalException, SystemException
true
if the user is a member of the organization,
optionally focusing on suborganizations or the specified organization.
This method is usually called to determine if the user has view access to
a resource belonging to the organization.
inheritSuborganizations=false
:
the method checks whether the user belongs to the organization specified
by organizationId
. The parameter
includeSpecifiedOrganization
is ignored.
includeSpecifiedOrganization
is
ignored unless inheritSuborganizations
is also
true
.
inheritSuborganizations=true
and
includeSpecifiedOrganization=false
: the method
checks
whether the user belongs to one of the child organizations of the one
specified by organizationId
.
inheritSuborganizations=true
and
includeSpecifiedOrganization=true
: the method
checks whether
the user belongs to the organization specified by
organizationId
or any of
its child organizations.
userId
- the primary key of the organization's userorganizationId
- the primary key of the organizationinheritSuborganizations
- if true
suborganizations are
considered in the determinationincludeSpecifiedOrganization
- if true
the
organization specified by organizationId
is
considered in the determination
true
if the user has access to the organization;
false
otherwise
PortalException
- if an organization with the primary key could not
be found
SystemException
- if a system exception occurredOrganizationFinder
public static void rebuildTree(long companyId) throws PortalException, SystemException
Only call this method if the tree has become stale through operations other than normal CRUD. Under normal circumstances the tree is automatically rebuilt whenever necessary.
companyId
- the primary key of the organization's company
PortalException
- if an organization with the primary key could not
be found
SystemException
- if a system exception occurredcom.liferay.portal.service.persistence.OrganizationPersistence#rebuildTree(
long, boolean)
public static List<Organization> search(long companyId, LinkedHashMap<String,Object> params, 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 companyparams
- the finder parameters (optionally null
). For
more information see com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer
start
- 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 Hits search(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String,Object> params, int start, int end, Sort sort) 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 organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationkeywords
- the keywords (space separated), which may occur in the
organization's name, street, city, zipcode, type, region or
country (optionally null
)params
- the finder parameters (optionally null
). For
more information see com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer
start
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not
inclusive)sort
- the field and direction by which to sort (optionally
null
)
SystemException
- if a system exception occurredcom.liferay.portlet.enterpriseadmin.util.OrganizationIndexer
public static List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params, int start, int end) throws SystemException
search(long, long, String,
LinkedHashMap, int, int, Sort)
instead of this method wherever possible
for performance reasons.
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 organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationkeywords
- the keywords (space separated), which may occur in the
organization's name, street, city, or zipcode (optionally
null
)type
- the organization's type (optionally null
)regionId
- the primary key of the organization's region (optionally
null
)countryId
- the primary key of the organization's country
(optionally null
)params
- the finder params. For more information see OrganizationFinder
start
- 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 occurredOrganizationFinder
public static List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator obc) throws SystemException
search(long, long, String,
String, String, String, String, String, String, LinkedHashMap, boolean,
int, int, Sort)
instead of this method wherever possible for performance
reasons.
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 organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationkeywords
- the keywords (space separated), which may occur in the
organization's name, street, city, or zipcode (optionally
null
)type
- the organization's type (optionally null
)regionId
- the primary key of the organization's region (optionally
null
)countryId
- the primary key of the organization's country
(optionally null
)params
- the finder params. For more information see OrganizationFinder
start
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not
inclusive)obc
- the comparator to order the organizations (optionally
null
)
obc
SystemException
- if a system exception occurredOrganizationFinder
public static List<Organization> search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end) throws SystemException
search(long, long, String, String,
String, String, String, String, String, LinkedHashMap, boolean, int, int,
Sort)
instead of this method wherever possible for performance reasons.
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 organization's companyparentOrganizationId
- the primary key of the organization's parentname
- the name keywords (space separated, optionally
null
)type
- the organization's type (optionally null
)street
- the street keywords (optionally null
)city
- the city keywords (optionally null
)zip
- the zipcode keywords (optionally null
)regionId
- the primary key of the organization's region (optionally
null
)countryId
- the primary key of the organization's country
(optionally null
)params
- the finder parameters (optionally null
). For
more information see OrganizationFinder
andOperator
- whether every field must match its keywords, or just
one field. For example, "organizations with the name
'Employees' and city 'Chicago'" vs "organizations with
the name 'Employees' or the city 'Chicago'".start
- 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 occurredOrganizationFinder
public static List<Organization> search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String,Object> params, boolean andOperator, int start, int end, OrderByComparator obc) throws SystemException
search(long, long, String, String, String,
String, String, String, String, LinkedHashMap, boolean, int, int, Sort)
instead of this method wherever possible for performance reasons.
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 organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationname
- the name keywords (space separated, optionally
null
)type
- the organization's type (optionally null
)street
- the street keywords (optionally null
)city
- the city keywords (optionally null
)zip
- the zipcode keywords (optionally null
)regionId
- the primary key of the organization's region (optionally
null
)countryId
- the primary key of the organization's country
(optionally null
)params
- the finder parameters (optionally null
). For
more information see OrganizationFinder
andOperator
- whether every field must match its keywords, or just
one field. For example, "organizations with the name
'Employees' and city 'Chicago'" vs "organizations with
the name 'Employees' or the city 'Chicago'".start
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not
inclusive)obc
- the comparator to order the organizations (optionally
null
)
obc
SystemException
- if a system exception occurredOrganizationFinder
public static Hits search(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, String region, String country, LinkedHashMap<String,Object> params, boolean andSearch, int start, int end, Sort sort) 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 organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationname
- the name keywords (space separated, optionally
null
)type
- the type keywords (optionally null
)street
- the street keywords (optionally null
)city
- the city keywords (optionally null
)zip
- the zipcode keywords (optionally null
)region
- the region keywords (optionally null
)country
- the country keywords (optionally null
)params
- the finder parameters (optionally null
). For
more information see com.liferay.portlet.enterpriseadmin.util.OrganizationIndexer
.andSearch
- whether every field must match its keywords or just one
fieldstart
- the lower bound of the range of organizations to returnend
- the upper bound of the range of organizations to return (not
inclusive)sort
- the field and direction by which to sort (optionally
null
)
sort
SystemException
- if a system exception occurredcom.liferay.portlet.enterpriseadmin.util.OrganizationIndexer
public static int searchCount(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params) throws SystemException
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationkeywords
- the keywords (space separated), which may occur in the
organization's name, street, city, or zipcode (optionally
null
)type
- the organization's type (optionally null
)regionId
- the primary key of the organization's region (optionally
null
)countryId
- the primary key of the organization's country
(optionally null
)params
- the finder parameters (optionally null
). For
more information see OrganizationFinder
SystemException
- if a system exception occurredOrganizationFinder
public static int searchCount(long companyId, long parentOrganizationId, String name, String type, String street, String city, String zip, Long regionId, Long countryId, LinkedHashMap<String,Object> params, boolean andOperator) throws SystemException
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationname
- the name keywords (space separated, optionally
null
)type
- the organization's type (optionally null
)street
- the street keywords (optionally null
)city
- the city keywords (optionally null
)zip
- the zipcode keywords (optionally null
)regionId
- the primary key of the organization's region (optionally
null
)countryId
- the primary key of the organization's country
(optionally null
)params
- the finder parameters (optionally null
). For
more information see OrganizationFinder
andOperator
- whether every field must match its keywords, or just
one field. For example, "organizations with the name
'Employees' and city 'Chicago'" vs "organizations with
the name 'Employees' or the city 'Chicago'".
SystemException
- if a system exception occurredOrganizationFinder
public 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 portal exception occurred
SystemException
- if a system exception occurredpublic static void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds) throws SystemException
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizations
SystemException
- if a system exception occurredpublic static void updateAsset(long userId, Organization organization, long[] assetCategoryIds, String[] assetTagNames) throws PortalException, SystemException
userId
- the primary key of the userorganization
- the organizationassetCategoryIds
- the primary keys of the asset categoriesassetTagNames
- the asset tag names
PortalException
- if a user with the primary key could not be found
SystemException
- if a system exception occurredpublic static Organization updateOrganization(long companyId, 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
companyId
- the primary key of the organization's companyorganizationId
- the primary key of the organizationparentOrganizationId
- the primary key of 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 or if the new information was
invalid
SystemException
- if a system exception occurredpublic static OrganizationLocalService getService()
public void setService(OrganizationLocalService service)
|
Liferay 6.1.2-ce-ga3 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |