@ProviderType public class OrganizationLocalServiceWrapper extends Object implements OrganizationLocalService, ServiceWrapper<OrganizationLocalService>
OrganizationLocalService
.OrganizationLocalService
Constructor and Description |
---|
OrganizationLocalServiceWrapper(OrganizationLocalService organizationLocalService) |
Modifier and Type | Method and Description |
---|---|
void |
addGroupOrganization(long groupId,
long organizationId) |
void |
addGroupOrganization(long groupId,
Organization organization) |
void |
addGroupOrganizations(long groupId,
List<Organization> organizations) |
void |
addGroupOrganizations(long groupId,
long[] organizationIds) |
Organization |
addOrganization(long userId,
long parentOrganizationId,
String name,
boolean site)
Adds an organization.
|
Organization |
addOrganization(long userId,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean site,
ServiceContext serviceContext)
Adds an organization.
|
Organization |
addOrganization(Organization organization)
Adds the organization to the database.
|
void |
addOrganizationResources(long userId,
Organization organization)
Adds a resource for each type of permission available on the
organization.
|
void |
addPasswordPolicyOrganizations(long passwordPolicyId,
long[] organizationIds)
Assigns the password policy to the organizations, removing any other
currently assigned password policies.
|
void |
addUserOrganization(long userId,
long organizationId) |
void |
addUserOrganization(long userId,
Organization organization) |
void |
addUserOrganizations(long userId,
List<Organization> organizations) |
void |
addUserOrganizations(long userId,
long[] organizationIds) |
void |
clearGroupOrganizations(long groupId) |
void |
clearUserOrganizations(long userId) |
Organization |
createOrganization(long organizationId)
Creates a new organization with the primary key.
|
void |
deleteGroupOrganization(long groupId,
long organizationId) |
void |
deleteGroupOrganization(long groupId,
Organization organization) |
void |
deleteGroupOrganizations(long groupId,
List<Organization> organizations) |
void |
deleteGroupOrganizations(long groupId,
long[] organizationIds) |
void |
deleteLogo(long organizationId)
Deletes the organization's logo.
|
Organization |
deleteOrganization(long organizationId)
Deletes the organization with the primary key from the database.
|
Organization |
deleteOrganization(Organization organization)
Deletes the organization from the database.
|
PersistedModel |
deletePersistedModel(PersistedModel persistedModel) |
void |
deleteUserOrganization(long userId,
long organizationId) |
void |
deleteUserOrganization(long userId,
Organization organization) |
void |
deleteUserOrganizations(long userId,
List<Organization> organizations) |
void |
deleteUserOrganizations(long userId,
long[] organizationIds) |
DynamicQuery |
dynamicQuery() |
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery)
Performs a dynamic query on the database and returns the matching rows.
|
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end)
Performs a dynamic query on the database and returns a range of the matching rows.
|
<T> List<T> |
dynamicQuery(DynamicQuery dynamicQuery,
int start,
int end,
OrderByComparator<T> orderByComparator)
Performs a dynamic query on the database and returns an ordered range of the matching rows.
|
long |
dynamicQueryCount(DynamicQuery dynamicQuery)
Returns the number of rows matching the dynamic query.
|
long |
dynamicQueryCount(DynamicQuery dynamicQuery,
Projection projection)
Returns the number of rows matching the dynamic query.
|
Organization |
fetchOrganization(long organizationId) |
Organization |
fetchOrganization(long companyId,
String name)
Returns the organization with the name.
|
Organization |
fetchOrganizationByUuidAndCompanyId(String uuid,
long companyId)
Returns the organization with the matching UUID and company.
|
ActionableDynamicQuery |
getActionableDynamicQuery() |
ExportActionableDynamicQuery |
getExportActionableDynamicQuery(PortletDataContext portletDataContext) |
List<Organization> |
getGroupOrganizations(long groupId) |
List<Organization> |
getGroupOrganizations(long groupId,
int start,
int end) |
List<Organization> |
getGroupOrganizations(long groupId,
int start,
int end,
OrderByComparator<Organization> orderByComparator) |
int |
getGroupOrganizationsCount(long groupId) |
long[] |
getGroupPrimaryKeys(long organizationId)
Returns the groupIds of the groups associated with the organization.
|
List<Organization> |
getGroupUserOrganizations(long groupId,
long userId) |
IndexableActionableDynamicQuery |
getIndexableActionableDynamicQuery() |
List<Organization> |
getNoAssetOrganizations() |
Organization |
getOrganization(long organizationId)
Returns the organization with the primary key.
|
Organization |
getOrganization(long companyId,
String name)
Returns the organization with the name.
|
Organization |
getOrganizationByUuidAndCompanyId(String uuid,
long companyId)
Returns the organization with the matching UUID and company.
|
long |
getOrganizationId(long companyId,
String name)
Returns the primary key of the organization with the name.
|
List<Organization> |
getOrganizations(int start,
int end)
Returns a range of all the organizations.
|
List<Organization> |
getOrganizations(long[] organizationIds)
Returns the organizations with the primary keys.
|
List<Organization> |
getOrganizations(long userId,
int start,
int end,
OrderByComparator<Organization> obc) |
List<Organization> |
getOrganizations(long companyId,
long parentOrganizationId)
Returns all the organizations belonging to the parent organization.
|
List<Organization> |
getOrganizations(long companyId,
long parentOrganizationId,
int start,
int end)
Returns a range of all the organizations belonging to the parent
organization.
|
List<Organization> |
getOrganizations(long companyId,
long parentOrganizationId,
String name,
int start,
int end) |
List<Organization> |
getOrganizations(long companyId,
String treePath) |
int |
getOrganizationsCount()
Returns the number of organizations.
|
int |
getOrganizationsCount(long companyId,
long parentOrganizationId)
Returns the number of organizations belonging to the parent organization.
|
int |
getOrganizationsCount(long companyId,
long parentOrganizationId,
String name) |
String |
getOSGiServiceIdentifier()
Returns the OSGi service identifier.
|
List<Organization> |
getParentOrganizations(long organizationId)
Returns the parent organizations in order by closest ancestor.
|
PersistedModel |
getPersistedModel(Serializable primaryKeyObj) |
List<Organization> |
getSuborganizations(List<Organization> organizations)
Returns the suborganizations of the organizations.
|
List<Organization> |
getSuborganizations(long companyId,
long organizationId)
Returns the suborganizations of the organization.
|
int |
getSuborganizationsCount(long companyId,
long organizationId)
Returns the count of suborganizations of the organization.
|
List<Organization> |
getSubsetOrganizations(List<Organization> allOrganizations,
List<Organization> availableOrganizations)
Returns the intersection of
allOrganizations and
availableOrganizations . |
long[] |
getUserOrganizationIds(long userId,
boolean includeAdministrative)
Returns all the IDs of organizations with which the user is explicitly
associated, optionally including the IDs of organizations that the user
administers or owns.
|
List<Organization> |
getUserOrganizations(long userId) |
List<Organization> |
getUserOrganizations(long userId,
boolean includeAdministrative)
Returns all the organizations with which the user is explicitly
associated, optionally including the organizations that the user
administers or owns.
|
List<Organization> |
getUserOrganizations(long userId,
int start,
int end) |
List<Organization> |
getUserOrganizations(long userId,
int start,
int end,
OrderByComparator<Organization> orderByComparator) |
int |
getUserOrganizationsCount(long userId) |
long[] |
getUserPrimaryKeys(long organizationId)
Returns the userIds of the users associated with the organization.
|
OrganizationLocalService |
getWrappedService() |
boolean |
hasGroupOrganization(long groupId,
long organizationId) |
boolean |
hasGroupOrganizations(long groupId) |
boolean |
hasPasswordPolicyOrganization(long passwordPolicyId,
long organizationId)
Returns
true if the password policy has been assigned to the
organization. |
boolean |
hasUserOrganization(long userId,
long organizationId) |
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. |
boolean |
hasUserOrganizations(long userId) |
void |
rebuildTree(long companyId)
Rebuilds the organization's tree.
|
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.
|
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.
|
List<Organization> |
search(long companyId,
long parentOrganizationId,
String keywords,
String type,
Long regionId,
Long countryId,
LinkedHashMap<String,Object> params,
int start,
int end,
OrderByComparator<Organization> obc)
Returns an ordered range of all the organizations that match the
keywords, type, region, and country, without using the indexer.
|
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.
|
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<Organization> 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.
|
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.
|
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.
|
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.
|
BaseModelSearchResult<Organization> |
searchOrganizations(long companyId,
long parentOrganizationId,
String keywords,
LinkedHashMap<String,Object> params,
int start,
int end,
Sort sort) |
BaseModelSearchResult<Organization> |
searchOrganizations(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) |
void |
setGroupOrganizations(long groupId,
long[] organizationIds) |
void |
setUserOrganizations(long userId,
long[] organizationIds) |
void |
setWrappedService(OrganizationLocalService organizationLocalService) |
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.
|
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.
|
Organization |
updateOrganization(long companyId,
long organizationId,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean logo,
byte[] logoBytes,
boolean site,
ServiceContext serviceContext)
Updates the organization.
|
Organization |
updateOrganization(long companyId,
long organizationId,
long parentOrganizationId,
String name,
String type,
long regionId,
long countryId,
long statusId,
String comments,
boolean site,
ServiceContext serviceContext)
Deprecated.
As of Wilberforce (7.0.x), replaced by
updateOrganization(long, long, long, String, String, long,
long, long, String, boolean, byte[], boolean,
ServiceContext) |
Organization |
updateOrganization(Organization organization)
Updates the organization in the database or adds it if it does not yet exist.
|
public OrganizationLocalServiceWrapper(OrganizationLocalService organizationLocalService)
public void addGroupOrganization(long groupId, long organizationId)
addGroupOrganization
in interface OrganizationLocalService
public void addGroupOrganization(long groupId, Organization organization)
addGroupOrganization
in interface OrganizationLocalService
public void addGroupOrganizations(long groupId, List<Organization> organizations)
addGroupOrganizations
in interface OrganizationLocalService
public void addGroupOrganizations(long groupId, long[] organizationIds)
addGroupOrganizations
in interface OrganizationLocalService
public Organization addOrganization(long userId, long parentOrganizationId, String name, boolean site) throws PortalException
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)
.
addOrganization
in interface OrganizationLocalService
userId
- the primary key of the creator/owner of the organizationparentOrganizationId
- the primary key of the organization's parent
organizationname
- the organization's namesite
- whether the organization is to be associated with a main
sitePortalException
public Organization addOrganization(long userId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusId, String comments, boolean site, ServiceContext serviceContext) throws PortalException
This method handles the creation and bookkeeping of the organization
including its resources, metadata, and internal data structures. It is
not necessary to make a subsequent call to addOrganizationResources(long, Organization)
.
addOrganization
in interface OrganizationLocalService
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 typeregionId
- 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 service context to be applied (optionally
null
). Can set asset category IDs, asset tag names,
and expando bridge attributes for the organization.PortalException
public Organization addOrganization(Organization organization)
addOrganization
in interface OrganizationLocalService
organization
- the organizationpublic void addOrganizationResources(long userId, Organization organization) throws PortalException
addOrganizationResources
in interface OrganizationLocalService
userId
- the primary key of the creator/owner of the organizationorganization
- the organizationPortalException
public void addPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
addPasswordPolicyOrganizations
in interface OrganizationLocalService
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizationspublic void addUserOrganization(long userId, long organizationId)
addUserOrganization
in interface OrganizationLocalService
public void addUserOrganization(long userId, Organization organization)
addUserOrganization
in interface OrganizationLocalService
public void addUserOrganizations(long userId, List<Organization> organizations)
addUserOrganizations
in interface OrganizationLocalService
public void addUserOrganizations(long userId, long[] organizationIds)
addUserOrganizations
in interface OrganizationLocalService
public void clearGroupOrganizations(long groupId)
clearGroupOrganizations
in interface OrganizationLocalService
public void clearUserOrganizations(long userId)
clearUserOrganizations
in interface OrganizationLocalService
public Organization createOrganization(long organizationId)
createOrganization
in interface OrganizationLocalService
organizationId
- the primary key for the new organizationpublic void deleteGroupOrganization(long groupId, long organizationId)
deleteGroupOrganization
in interface OrganizationLocalService
public void deleteGroupOrganization(long groupId, Organization organization)
deleteGroupOrganization
in interface OrganizationLocalService
public void deleteGroupOrganizations(long groupId, List<Organization> organizations)
deleteGroupOrganizations
in interface OrganizationLocalService
public void deleteGroupOrganizations(long groupId, long[] organizationIds)
deleteGroupOrganizations
in interface OrganizationLocalService
public void deleteLogo(long organizationId) throws PortalException
deleteLogo
in interface OrganizationLocalService
organizationId
- the primary key of the organizationPortalException
public Organization deleteOrganization(long organizationId) throws PortalException
deleteOrganization
in interface OrganizationLocalService
organizationId
- the primary key of the organizationPortalException
- if a organization with the primary key could not be foundpublic Organization deleteOrganization(Organization organization) throws PortalException
deleteOrganization
in interface OrganizationLocalService
organization
- the organizationPortalException
public PersistedModel deletePersistedModel(PersistedModel persistedModel) throws PortalException
deletePersistedModel
in interface OrganizationLocalService
deletePersistedModel
in interface PersistedModelLocalService
PortalException
public void deleteUserOrganization(long userId, long organizationId)
deleteUserOrganization
in interface OrganizationLocalService
public void deleteUserOrganization(long userId, Organization organization)
deleteUserOrganization
in interface OrganizationLocalService
public void deleteUserOrganizations(long userId, List<Organization> organizations)
deleteUserOrganizations
in interface OrganizationLocalService
public void deleteUserOrganizations(long userId, long[] organizationIds)
deleteUserOrganizations
in interface OrganizationLocalService
public DynamicQuery dynamicQuery()
dynamicQuery
in interface OrganizationLocalService
public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery)
dynamicQuery
in interface OrganizationLocalService
dynamicQuery
- the dynamic querypublic <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from OrganizationModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery
in interface OrganizationLocalService
dynamicQuery
- the dynamic querystart
- the lower bound of the range of model instancesend
- the upper bound of the range of model instances (not inclusive)public <T> List<T> dynamicQuery(DynamicQuery dynamicQuery, int start, int end, OrderByComparator<T> orderByComparator)
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. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from OrganizationModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
dynamicQuery
in interface OrganizationLocalService
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
)public long dynamicQueryCount(DynamicQuery dynamicQuery)
dynamicQueryCount
in interface OrganizationLocalService
dynamicQuery
- the dynamic querypublic long dynamicQueryCount(DynamicQuery dynamicQuery, Projection projection)
dynamicQueryCount
in interface OrganizationLocalService
dynamicQuery
- the dynamic queryprojection
- the projection to apply to the querypublic Organization fetchOrganization(long organizationId)
fetchOrganization
in interface OrganizationLocalService
public Organization fetchOrganization(long companyId, String name)
fetchOrganization
in interface OrganizationLocalService
companyId
- the primary key of the organization's companyname
- the organization's namenull
if no
organization could be foundpublic Organization fetchOrganizationByUuidAndCompanyId(String uuid, long companyId)
fetchOrganizationByUuidAndCompanyId
in interface OrganizationLocalService
uuid
- the organization's UUIDcompanyId
- the primary key of the companynull
if a matching organization could not be foundpublic ActionableDynamicQuery getActionableDynamicQuery()
getActionableDynamicQuery
in interface OrganizationLocalService
public ExportActionableDynamicQuery getExportActionableDynamicQuery(PortletDataContext portletDataContext)
getExportActionableDynamicQuery
in interface OrganizationLocalService
public List<Organization> getGroupOrganizations(long groupId)
getGroupOrganizations
in interface OrganizationLocalService
public List<Organization> getGroupOrganizations(long groupId, int start, int end)
getGroupOrganizations
in interface OrganizationLocalService
public List<Organization> getGroupOrganizations(long groupId, int start, int end, OrderByComparator<Organization> orderByComparator)
getGroupOrganizations
in interface OrganizationLocalService
public int getGroupOrganizationsCount(long groupId)
getGroupOrganizationsCount
in interface OrganizationLocalService
public long[] getGroupPrimaryKeys(long organizationId)
getGroupPrimaryKeys
in interface OrganizationLocalService
organizationId
- the organizationId of the organizationpublic List<Organization> getGroupUserOrganizations(long groupId, long userId) throws PortalException
getGroupUserOrganizations
in interface OrganizationLocalService
PortalException
public IndexableActionableDynamicQuery getIndexableActionableDynamicQuery()
getIndexableActionableDynamicQuery
in interface OrganizationLocalService
public List<Organization> getNoAssetOrganizations()
getNoAssetOrganizations
in interface OrganizationLocalService
public Organization getOrganization(long organizationId) throws PortalException
getOrganization
in interface OrganizationLocalService
organizationId
- the primary key of the organizationPortalException
- if a organization with the primary key could not be foundpublic Organization getOrganization(long companyId, String name) throws PortalException
getOrganization
in interface OrganizationLocalService
companyId
- the primary key of the organization's companyname
- the organization's namePortalException
public Organization getOrganizationByUuidAndCompanyId(String uuid, long companyId) throws PortalException
getOrganizationByUuidAndCompanyId
in interface OrganizationLocalService
uuid
- the organization's UUIDcompanyId
- the primary key of the companyPortalException
- if a matching organization could not be foundpublic long getOrganizationId(long companyId, String name)
getOrganizationId
in interface OrganizationLocalService
companyId
- the primary key of the organization's companyname
- the organization's name0
if the organization could not be foundpublic List<Organization> getOrganizations(int start, int end)
Useful when paginating results. Returns a maximum of end - start
instances. start
and end
are not primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil.ALL_POS
will return the full result set. If orderByComparator
is specified, then the query will include the given ORDER BY logic. If orderByComparator
is absent and pagination is required (start
and end
are not QueryUtil.ALL_POS
), then the query will include the default ORDER BY logic from OrganizationModelImpl
. If both orderByComparator
and pagination are absent, for performance reasons, the query will not have an ORDER BY clause and the returned result set will be sorted on by the primary key in an ascending order.
getOrganizations
in interface OrganizationLocalService
start
- the lower bound of the range of organizationsend
- the upper bound of the range of organizations (not inclusive)public List<Organization> getOrganizations(long userId, int start, int end, OrderByComparator<Organization> obc) throws PortalException
getOrganizations
in interface OrganizationLocalService
PortalException
public List<Organization> getOrganizations(long companyId, long parentOrganizationId)
getOrganizations
in interface OrganizationLocalService
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationpublic List<Organization> getOrganizations(long companyId, long parentOrganizationId, int start, int end)
Useful when paginating results. Returns a maximum of end -
start
instances. start
and end
are not
primary keys, they are indexes in the result set. Thus, 0
refers to the first result in the set. Setting both start
and end
to QueryUtil#ALL_POS
will return the full
result set.
getOrganizations
in interface OrganizationLocalService
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)OrganizationPersistence.findByC_P(
long, long, int, int)
public List<Organization> getOrganizations(long companyId, long parentOrganizationId, String name, int start, int end)
getOrganizations
in interface OrganizationLocalService
public List<Organization> getOrganizations(long companyId, String treePath)
getOrganizations
in interface OrganizationLocalService
public List<Organization> getOrganizations(long[] organizationIds) throws PortalException
getOrganizations
in interface OrganizationLocalService
organizationIds
- the primary keys of the organizationsPortalException
public int getOrganizationsCount()
getOrganizationsCount
in interface OrganizationLocalService
public int getOrganizationsCount(long companyId, long parentOrganizationId)
getOrganizationsCount
in interface OrganizationLocalService
companyId
- the primary key of the organization's companyparentOrganizationId
- the primary key of the organization's parent
organizationpublic int getOrganizationsCount(long companyId, long parentOrganizationId, String name)
getOrganizationsCount
in interface OrganizationLocalService
public String getOSGiServiceIdentifier()
getOSGiServiceIdentifier
in interface OrganizationLocalService
public List<Organization> getParentOrganizations(long organizationId) throws PortalException
getParentOrganizations
in interface OrganizationLocalService
organizationId
- the primary key of the organizationPortalException
public PersistedModel getPersistedModel(Serializable primaryKeyObj) throws PortalException
getPersistedModel
in interface OrganizationLocalService
getPersistedModel
in interface PersistedModelLocalService
PortalException
public List<Organization> getSuborganizations(List<Organization> organizations)
getSuborganizations
in interface OrganizationLocalService
organizations
- the organizations from which to get
suborganizationspublic List<Organization> getSuborganizations(long companyId, long organizationId)
getSuborganizations
in interface OrganizationLocalService
companyId
- the primary key of the organization's companyorganizationId
- the primary key of the organizationpublic int getSuborganizationsCount(long companyId, long organizationId)
getSuborganizationsCount
in interface OrganizationLocalService
companyId
- the primary key of the organization's companyorganizationId
- the primary key of the organizationpublic List<Organization> getSubsetOrganizations(List<Organization> allOrganizations, List<Organization> availableOrganizations)
allOrganizations
and
availableOrganizations
.getSubsetOrganizations
in interface OrganizationLocalService
allOrganizations
- the organizations to check for availabilityavailableOrganizations
- the available organizationsallOrganizations
and
availableOrganizations
public long[] getUserOrganizationIds(long userId, boolean includeAdministrative) throws PortalException
A user is considered to be explicitly associated with an organization if his account is individually created within the organization or if the user is later added to it.
getUserOrganizationIds
in interface OrganizationLocalService
userId
- the primary key of the userincludeAdministrative
- whether to include the IDs of organizations
that the user administers or owns, even if he's not a member of
the organizationsPortalException
public List<Organization> getUserOrganizations(long userId)
getUserOrganizations
in interface OrganizationLocalService
public List<Organization> getUserOrganizations(long userId, boolean includeAdministrative) throws PortalException
A user is considered to be explicitly associated with an organization if his account is individually created within the organization or if the user is later added as a member.
getUserOrganizations
in interface OrganizationLocalService
userId
- the primary key of the userincludeAdministrative
- whether to include the IDs of organizations
that the user administers or owns, even if he's not a member of
the organizationsPortalException
public List<Organization> getUserOrganizations(long userId, int start, int end)
getUserOrganizations
in interface OrganizationLocalService
public List<Organization> getUserOrganizations(long userId, int start, int end, OrderByComparator<Organization> orderByComparator)
getUserOrganizations
in interface OrganizationLocalService
public int getUserOrganizationsCount(long userId)
getUserOrganizationsCount
in interface OrganizationLocalService
public long[] getUserPrimaryKeys(long organizationId)
getUserPrimaryKeys
in interface OrganizationLocalService
organizationId
- the organizationId of the organizationpublic boolean hasGroupOrganization(long groupId, long organizationId)
hasGroupOrganization
in interface OrganizationLocalService
public boolean hasGroupOrganizations(long groupId)
hasGroupOrganizations
in interface OrganizationLocalService
public boolean hasPasswordPolicyOrganization(long passwordPolicyId, long organizationId)
true
if the password policy has been assigned to the
organization.hasPasswordPolicyOrganization
in interface OrganizationLocalService
passwordPolicyId
- the primary key of the password policyorganizationId
- the primary key of the organizationtrue
if the password policy has been assigned to the
organization; false
otherwisepublic boolean hasUserOrganization(long userId, long organizationId)
hasUserOrganization
in interface OrganizationLocalService
public boolean hasUserOrganization(long userId, long organizationId, boolean inheritSuborganizations, boolean includeSpecifiedOrganization) throws PortalException
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.
hasUserOrganization
in interface OrganizationLocalService
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 determinationtrue
if the user has access to the organization;
false
otherwisePortalException
OrganizationFinder
public boolean hasUserOrganizations(long userId)
hasUserOrganizations
in interface OrganizationLocalService
public void rebuildTree(long companyId) throws PortalException
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.
rebuildTree
in interface OrganizationLocalService
companyId
- the primary key of the organization's companyPortalException
public Hits search(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String,Object> params, int start, int end, Sort sort)
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.
search
in interface OrganizationLocalService
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 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
)OrganizationIndexer
public List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params, int start, int end)
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.
search
in interface OrganizationLocalService
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)OrganizationFinder
public List<Organization> search(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params, int start, int end, OrderByComparator<Organization> obc)
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.
search
in interface OrganizationLocalService
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
OrganizationFinder
public 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)
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.
search
in interface OrganizationLocalService
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)OrganizationFinder
public 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<Organization> obc)
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.
search
in interface OrganizationLocalService
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
OrganizationFinder
public 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)
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.
search
in interface OrganizationLocalService
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 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
OrganizationIndexer
public int searchCount(long companyId, long parentOrganizationId, String keywords, String type, Long regionId, Long countryId, LinkedHashMap<String,Object> params)
searchCount
in interface OrganizationLocalService
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
OrganizationFinder
public 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)
searchCount
in interface OrganizationLocalService
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'".OrganizationFinder
public BaseModelSearchResult<Organization> searchOrganizations(long companyId, long parentOrganizationId, String keywords, LinkedHashMap<String,Object> params, int start, int end, Sort sort) throws PortalException
searchOrganizations
in interface OrganizationLocalService
PortalException
public BaseModelSearchResult<Organization> searchOrganizations(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 PortalException
searchOrganizations
in interface OrganizationLocalService
PortalException
public void setGroupOrganizations(long groupId, long[] organizationIds)
setGroupOrganizations
in interface OrganizationLocalService
public void setUserOrganizations(long userId, long[] organizationIds)
setUserOrganizations
in interface OrganizationLocalService
public void unsetGroupOrganizations(long groupId, long[] organizationIds)
unsetGroupOrganizations
in interface OrganizationLocalService
groupId
- the primary key of the grouporganizationIds
- the primary keys of the organizationspublic void unsetPasswordPolicyOrganizations(long passwordPolicyId, long[] organizationIds)
unsetPasswordPolicyOrganizations
in interface OrganizationLocalService
passwordPolicyId
- the primary key of the password policyorganizationIds
- the primary keys of the organizationspublic void updateAsset(long userId, Organization organization, long[] assetCategoryIds, String[] assetTagNames) throws PortalException
updateAsset
in interface OrganizationLocalService
userId
- the primary key of the userorganization
- the organizationassetCategoryIds
- the primary keys of the asset categoriesassetTagNames
- the asset tag namesPortalException
public Organization updateOrganization(long companyId, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusId, String comments, boolean logo, byte[] logoBytes, boolean site, ServiceContext serviceContext) throws PortalException
updateOrganization
in interface OrganizationLocalService
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 typeregionId
- 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 organizationlogo
- whether to update the ogranization's logologoBytes
- the new logo image datasite
- whether the organization is to be associated with a main
siteserviceContext
- the service context to be applied (optionally
null
). Can set asset category IDs and asset tag
names for the organization, and merge expando bridge attributes
for the organization.PortalException
@Deprecated public Organization updateOrganization(long companyId, long organizationId, long parentOrganizationId, String name, String type, long regionId, long countryId, long statusId, String comments, boolean site, ServiceContext serviceContext) throws PortalException
updateOrganization(long, long, long, String, String, long,
long, long, String, boolean, byte[], boolean,
ServiceContext)
updateOrganization
in interface OrganizationLocalService
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 typeregionId
- 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 service context to be applied (optionally
null
). Can set asset category IDs and asset tag
names for the organization, and merge expando bridge
attributes for the organization.PortalException
public Organization updateOrganization(Organization organization)
updateOrganization
in interface OrganizationLocalService
organization
- the organizationpublic OrganizationLocalService getWrappedService()
getWrappedService
in interface ServiceWrapper<OrganizationLocalService>
public void setWrappedService(OrganizationLocalService organizationLocalService)
setWrappedService
in interface ServiceWrapper<OrganizationLocalService>