|
Liferay 7.0-ce-m6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.liferay.portal.service.BaseServiceImpl
com.liferay.portlet.dynamicdatamapping.service.base.DDMTemplateServiceBaseImpl
com.liferay.portlet.dynamicdatamapping.service.impl.DDMTemplateServiceImpl
public class DDMTemplateServiceImpl
Provides the remote service for accessing, adding, copying, deleting, and updating dynamic data mapping (DDM) templates. Its methods include security checks.
DDMTemplateLocalServiceImpl| Field Summary |
|---|
| Fields inherited from class com.liferay.portal.service.BaseServiceImpl |
|---|
ANONYMOUS_NAMES, JRUN_ANONYMOUS, ORACLE_ANONYMOUS, SUN_ANONYMOUS, WEBLOGIC_ANONYMOUS |
| Constructor Summary | |
|---|---|
DDMTemplateServiceImpl()
|
|
| Method Summary | |
|---|---|
DDMTemplate |
addTemplate(long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String type,
String mode,
String language,
String script,
ServiceContext serviceContext)
Adds a template. |
DDMTemplate |
addTemplate(long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String templateKey,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String type,
String mode,
String language,
String script,
boolean cacheable,
boolean smallImage,
String smallImageURL,
File smallImageFile,
ServiceContext serviceContext)
Adds a template with additional parameters. |
DDMTemplate |
copyTemplate(long templateId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
ServiceContext serviceContext)
Copies the template, creating a new template with all the values extracted from the original one. |
DDMTemplate |
copyTemplate(long templateId,
ServiceContext serviceContext)
|
List<DDMTemplate> |
copyTemplates(long classNameId,
long oldClassPK,
long resourceClassNameId,
long newClassPK,
String type,
ServiceContext serviceContext)
Copies all the templates matching the class name ID, class PK, and type. |
void |
deleteTemplate(long templateId)
Deletes the template and its resources. |
DDMTemplate |
fetchTemplate(long groupId,
long classNameId,
String templateKey)
Returns the template matching the group and template key. |
DDMTemplate |
getTemplate(long templateId)
Returns the template with the ID. |
DDMTemplate |
getTemplate(long groupId,
long classNameId,
String templateKey)
Returns the template matching the group and template key. |
DDMTemplate |
getTemplate(long groupId,
long classNameId,
String templateKey,
boolean includeAncestorTemplates)
Returns the template matching the group and template key, optionally searching ancestor sites (that have sharing enabled) and global scoped sites. |
List<DDMTemplate> |
getTemplates(long groupId,
long classNameId)
Returns all the templates matching the group and class name ID. |
List<DDMTemplate> |
getTemplates(long groupId,
long classNameId,
long classPK)
Returns all the templates matching the group, class name ID, and class PK. |
List<DDMTemplate> |
getTemplates(long groupId,
long classNameId,
long classPK,
boolean includeAncestorTemplates)
|
List<DDMTemplate> |
getTemplates(long groupId,
long classNameId,
long classPK,
String type)
Returns all the templates matching the class name ID, class PK, type, and mode. |
List<DDMTemplate> |
getTemplates(long groupId,
long classNameId,
long classPK,
String type,
String mode)
|
List<DDMTemplate> |
getTemplatesByClassPK(long groupId,
long classPK)
Returns all the templates matching the group and class PK. |
List<DDMTemplate> |
getTemplatesByStructureClassNameId(long groupId,
long structureClassNameId,
int start,
int end,
OrderByComparator<DDMTemplate> orderByComparator)
Returns an ordered range of all the templates matching the group and structure class name ID and all the generic templates matching the group. |
int |
getTemplatesByStructureClassNameIdCount(long groupId,
long structureClassNameId)
Returns the number of templates matching the group and structure class name ID plus the number of generic templates matching the group. |
void |
revertTemplate(long templateId,
String version,
ServiceContext serviceContext)
|
List<DDMTemplate> |
search(long companyId,
long[] groupIds,
long[] classNameIds,
long[] classPKs,
long resourceClassNameId,
String keywords,
String type,
String mode,
int start,
int end,
OrderByComparator<DDMTemplate> orderByComparator)
Returns an ordered range of all the templates matching the group IDs, class name IDs, class PK, type, and mode, and matching the keywords in the template names and descriptions. |
List<DDMTemplate> |
search(long companyId,
long[] groupIds,
long[] classNameIds,
long[] classPKs,
long resourceClassNameId,
String name,
String description,
String type,
String mode,
String language,
boolean andOperator,
int start,
int end,
OrderByComparator<DDMTemplate> orderByComparator)
Returns an ordered range of all the templates matching the group IDs, class name IDs, class PK, name keyword, description keyword, type, mode, and language. |
List<DDMTemplate> |
search(long companyId,
long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String keywords,
String type,
String mode,
int start,
int end,
OrderByComparator<DDMTemplate> orderByComparator)
Returns an ordered range of all the templates matching the group, class name ID, class PK, type, and mode, and matching the keywords in the template names and descriptions. |
List<DDMTemplate> |
search(long companyId,
long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String name,
String description,
String type,
String mode,
String language,
boolean andOperator,
int start,
int end,
OrderByComparator<DDMTemplate> orderByComparator)
Returns an ordered range of all the templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, and language. |
int |
searchCount(long companyId,
long[] groupIds,
long[] classNameIds,
long[] classPKs,
long resourceClassNameId,
String keywords,
String type,
String mode)
Returns the number of templates matching the group IDs, class name IDs, class PK, type, and mode, and matching the keywords in the template names and descriptions. |
int |
searchCount(long companyId,
long[] groupIds,
long[] classNameIds,
long[] classPKs,
long resourceClassNameId,
String name,
String description,
String type,
String mode,
String language,
boolean andOperator)
Returns the number of templates matching the group IDs, class name IDs, class PK, name keyword, description keyword, type, mode, and language. |
int |
searchCount(long companyId,
long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String keywords,
String type,
String mode)
Returns the number of templates matching the group, class name ID, class PK, type, and mode, and matching the keywords in the template names and descriptions. |
int |
searchCount(long companyId,
long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String name,
String description,
String type,
String mode,
String language,
boolean andOperator)
Returns the number of templates matching the group, class name ID, class PK, name keyword, description keyword, type, mode, and language. |
DDMTemplate |
updateTemplate(long templateId,
long classPK,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String type,
String mode,
String language,
String script,
boolean cacheable,
boolean smallImage,
String smallImageURL,
File smallImageFile,
ServiceContext serviceContext)
Updates the template matching the ID. |
DDMTemplate |
updateTemplate(long templateId,
long classPK,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String type,
String mode,
String language,
String script,
boolean cacheable,
ServiceContext serviceContext)
Updates the template matching the ID. |
| Methods inherited from class com.liferay.portal.service.BaseServiceImpl |
|---|
getClassLoader, getGuestOrUser, getGuestOrUserId, getPermissionChecker, getUser, getUserId |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DDMTemplateServiceImpl()
| Method Detail |
|---|
public DDMTemplate addTemplate(long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String type,
String mode,
String language,
String script,
ServiceContext serviceContext)
throws PortalException
groupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modelclassPK - the primary key of the template's related entityresourceClassNameId - the primary key of the class name for
template's resource modelnameMap - the template's locales and localized namesdescriptionMap - the template's locales and localized descriptionstype - the template's type. For more information, see DDMTemplateConstants.mode - the template's mode. For more information, see DDMTemplateConstants.language - the template's script language. For more information,
see DDMTemplateConstants.script - the template's scriptserviceContext - the service context to be applied. Must have the
ddmResource attribute to check permissions. Can set
the UUID, creation date, modification date, guest permissions,
and group permissions for the template.
PortalException - if the user did not have permission to add the
template or if a portal exception occurred
public DDMTemplate addTemplate(long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String templateKey,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String type,
String mode,
String language,
String script,
boolean cacheable,
boolean smallImage,
String smallImageURL,
File smallImageFile,
ServiceContext serviceContext)
throws PortalException
groupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modelclassPK - the primary key of the template's related entityresourceClassNameId - the primary key of the class name for
template's resource modeltemplateKey - the unique string identifying the template
(optionally null)nameMap - the template's locales and localized namesdescriptionMap - the template's locales and localized descriptionstype - the template's type. For more information, see DDMTemplateConstants.mode - the template's mode. For more information, see DDMTemplateConstants.language - the template's script language. For more information,
see DDMTemplateConstants.script - the template's scriptcacheable - whether the template is cacheablesmallImage - whether the template has a small imagesmallImageURL - the template's small image URL (optionally
null)smallImageFile - the template's small image file (optionally
null)serviceContext - the service context to be applied. Must have the
ddmResource attribute to check permissions. Can set
the UUID, creation date, modification date, guest permissions,
and group permissions for the template.
PortalException - if the user did not have permission to add the
template or if a portal exception occurred
public DDMTemplate copyTemplate(long templateId,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
ServiceContext serviceContext)
throws PortalException
templateId - the primary key of the template to be copiednameMap - the new template's locales and localized namesdescriptionMap - the new template's locales and localized
descriptionsserviceContext - the service context to be applied. Must have the
ddmResource attribute to check permissions. Can set
the UUID, creation date, modification date, guest permissions,
and group permissions for the template.
PortalException - if the user did not have permission to add the
template or if a portal exception occurred
public DDMTemplate copyTemplate(long templateId,
ServiceContext serviceContext)
throws PortalException
PortalException
public List<DDMTemplate> copyTemplates(long classNameId,
long oldClassPK,
long resourceClassNameId,
long newClassPK,
String type,
ServiceContext serviceContext)
throws PortalException
classNameId - the primary key of the class name for template's
related modeloldClassPK - the primary key of the old template's related entityresourceClassNameId - the primary key of the class name for
template's resource modelnewClassPK - the primary key of the new template's related entitytype - the template's type. For more information, see DDMTemplateConstants.serviceContext - the service context to be applied. Must have the
ddmResource attribute to check permissions. Can set
the UUID, creation date, modification date, guest permissions,
and group permissions for the template.
PortalException - if the user did not have permission to add the
template or if a portal exception occurred
public void deleteTemplate(long templateId)
throws PortalException
templateId - the primary key of the template to be deleted
PortalException - if the user did not have permission to delete the
template or if a portal exception occurred
public DDMTemplate fetchTemplate(long groupId,
long classNameId,
String templateKey)
throws PortalException
groupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modeltemplateKey - the unique string identifying the template
null if a matching
template could not be found
PortalException - if the user did not have permission to view the
template
public DDMTemplate getTemplate(long templateId)
throws PortalException
templateId - the primary key of the template
PortalException - if the user did not have permission to view the
template or if a matching template could not be found
public DDMTemplate getTemplate(long groupId,
long classNameId,
String templateKey)
throws PortalException
groupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modeltemplateKey - the unique string identifying the template
PortalException - if a matching template could not be found
public DDMTemplate getTemplate(long groupId,
long classNameId,
String templateKey,
boolean includeAncestorTemplates)
throws PortalException
This method first searches in the group. If the template is still not
found and includeAncestorTemplates is set to
true, this method searches the group's ancestor sites (that
have sharing enabled) and lastly searches global scoped sites.
groupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modeltemplateKey - the unique string identifying the templateincludeAncestorTemplates - whether to include ancestor sites (that
have sharing enabled) and include global scoped sites in the
search
PortalException - if a matching template could not be found
public List<DDMTemplate> getTemplates(long groupId,
long classNameId)
groupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related model
public List<DDMTemplate> getTemplates(long groupId,
long classNameId,
long classPK)
groupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modelclassPK - the primary key of the template's related entity
public List<DDMTemplate> getTemplates(long groupId,
long classNameId,
long classPK,
boolean includeAncestorTemplates)
throws PortalException
PortalException
public List<DDMTemplate> getTemplates(long groupId,
long classNameId,
long classPK,
String type)
groupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modelclassPK - the primary key of the template's related entitytype - the template's type. For more information, see DDMTemplateConstants.
public List<DDMTemplate> getTemplates(long groupId,
long classNameId,
long classPK,
String type,
String mode)
public List<DDMTemplate> getTemplatesByClassPK(long groupId,
long classPK)
groupId - the primary key of the groupclassPK - the primary key of the template's related entity
public List<DDMTemplate> getTemplatesByStructureClassNameId(long groupId,
long structureClassNameId,
int start,
int end,
OrderByComparator<DDMTemplate> 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.
groupId - the primary key of the groupstructureClassNameId - the primary key of the class name for the
template's related structure (optionally 0). Specify
0 to return generic templates only.start - the lower bound of the range of templates to returnend - the upper bound of the range of templates to return (not
inclusive)orderByComparator - the comparator to order the templates
(optionally null)
public int getTemplatesByStructureClassNameIdCount(long groupId,
long structureClassNameId)
groupId - the primary key of the groupstructureClassNameId - the primary key of the class name for the
template's related structure (optionally 0). Specify
0 to count generic templates only.
public void revertTemplate(long templateId,
String version,
ServiceContext serviceContext)
throws PortalException
PortalException
public List<DDMTemplate> search(long companyId,
long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String keywords,
String type,
String mode,
int start,
int end,
OrderByComparator<DDMTemplate> 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.
companyId - the primary key of the template's companygroupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modelclassPK - the primary key of the template's related entityresourceClassNameId - the primary key of the class name for
template's resource modelkeywords - the keywords (space separated), which may occur in the
template's name or description (optionally null)type - the template's type (optionally null). For more
information, see DDMTemplateConstants.mode - the template's mode (optionally null) For more
information, see DDMTemplateConstants.start - the lower bound of the range of templates to returnend - the upper bound of the range of templates to return (not
inclusive)orderByComparator - the comparator to order the templates
(optionally null)
public List<DDMTemplate> search(long companyId,
long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String name,
String description,
String type,
String mode,
String language,
boolean andOperator,
int start,
int end,
OrderByComparator<DDMTemplate> 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.
companyId - the primary key of the template's companygroupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modelclassPK - the primary key of the template's related entityresourceClassNameId - the primary key of the class name for
template's resource modelname - the name keywords (optionally null)description - the description keywords (optionally
null)type - the template's type (optionally null). For more
information, see DDMTemplateConstants.mode - the template's mode (optionally null). For more
information, see DDMTemplateConstants.language - the template's script language (optionally
null). For more information, see DDMTemplateConstants.andOperator - whether every field must match its keywords, or just
one field.start - the lower bound of the range of templates to returnend - the upper bound of the range of templates to return (not
inclusive)orderByComparator - the comparator to order the templates
(optionally null)
public List<DDMTemplate> search(long companyId,
long[] groupIds,
long[] classNameIds,
long[] classPKs,
long resourceClassNameId,
String keywords,
String type,
String mode,
int start,
int end,
OrderByComparator<DDMTemplate> 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.
companyId - the primary key of the template's companygroupIds - the primary keys of the groupsclassNameIds - the primary keys of the entity's instances the
templates are related toclassPKs - the primary keys of the template's related entitiesresourceClassNameId - the primary key of the class name for
template's resource modelkeywords - the keywords (space separated), which may occur in the
template's name or description (optionally null)type - the template's type (optionally null). For more
information, see DDMTemplateConstants.mode - the template's mode (optionally null). For more
information, see DDMTemplateConstants.start - the lower bound of the range of templates to returnend - the upper bound of the range of templates to return (not
inclusive)orderByComparator - the comparator to order the templates
(optionally null)
public List<DDMTemplate> search(long companyId,
long[] groupIds,
long[] classNameIds,
long[] classPKs,
long resourceClassNameId,
String name,
String description,
String type,
String mode,
String language,
boolean andOperator,
int start,
int end,
OrderByComparator<DDMTemplate> 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.
companyId - the primary key of the template's companygroupIds - the primary keys of the groupsclassNameIds - the primary keys of the entity's instances the
templates are related toclassPKs - the primary keys of the template's related entitiesresourceClassNameId - the primary key of the class name for
template's resource modelname - the name keywords (optionally null)description - the description keywords (optionally
null)type - the template's type (optionally null). For more
information, see DDMTemplateConstants.mode - the template's mode (optionally null). For more
information, see DDMTemplateConstants.language - the template's script language (optionally
null). For more information, see DDMTemplateConstants.andOperator - whether every field must match its keywords, or just
one field.start - the lower bound of the range of templates to returnend - the upper bound of the range of templates to return (not
inclusive)orderByComparator - the comparator to order the templates
(optionally null)
public int searchCount(long companyId,
long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String keywords,
String type,
String mode)
companyId - the primary key of the template's companygroupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modelclassPK - the primary key of the template's related entityresourceClassNameId - the primary key of the class name for
template's resource modelkeywords - the keywords (space separated), which may occur in the
template's name or description (optionally null)type - the template's type (optionally null). For more
information, see DDMTemplateConstants.mode - the template's mode (optionally null). For more
information, see DDMTemplateConstants.
public int searchCount(long companyId,
long groupId,
long classNameId,
long classPK,
long resourceClassNameId,
String name,
String description,
String type,
String mode,
String language,
boolean andOperator)
companyId - the primary key of the template's companygroupId - the primary key of the groupclassNameId - the primary key of the class name for template's
related modelclassPK - the primary key of the template's related entityresourceClassNameId - the primary key of the class name for
template's resource modelname - the name keywords (optionally null)description - the description keywords (optionally
null)type - the template's type (optionally null). For more
information, see DDMTemplateConstants.mode - the template's mode (optionally null). For more
information, see DDMTemplateConstants.language - the template's script language (optionally
null). For more information, see DDMTemplateConstants.andOperator - whether every field must match its keywords, or just
one field.
public int searchCount(long companyId,
long[] groupIds,
long[] classNameIds,
long[] classPKs,
long resourceClassNameId,
String keywords,
String type,
String mode)
companyId - the primary key of the template's companygroupIds - the primary keys of the groupsclassNameIds - the primary keys of the entity's instances the
templates are related toclassPKs - the primary keys of the template's related entitiesresourceClassNameId - the primary key of the class name for
template's resource modelkeywords - the keywords (space separated), which may occur in the
template's name or description (optionally null)type - the template's type (optionally null). For more
information, see DDMTemplateConstants.mode - the template's mode (optionally null). For more
information, see DDMTemplateConstants.
public int searchCount(long companyId,
long[] groupIds,
long[] classNameIds,
long[] classPKs,
long resourceClassNameId,
String name,
String description,
String type,
String mode,
String language,
boolean andOperator)
companyId - the primary key of the template's companygroupIds - the primary keys of the groupsclassNameIds - the primary keys of the entity's instances the
templates are related toclassPKs - the primary keys of the template's related entitiesresourceClassNameId - the primary key of the class name for
template's resource modelname - the name keywords (optionally null)description - the description keywords (optionally
null)type - the template's type (optionally null). For more
information, see DDMTemplateConstants.mode - the template's mode (optionally null). For more
information, see DDMTemplateConstants.language - the template's script language (optionally
null). For more information, see DDMTemplateConstants.andOperator - whether every field must match its keywords, or just
one field.
public DDMTemplate updateTemplate(long templateId,
long classPK,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String type,
String mode,
String language,
String script,
boolean cacheable,
boolean smallImage,
String smallImageURL,
File smallImageFile,
ServiceContext serviceContext)
throws PortalException
templateId - the primary key of the templateclassPK - the primary key of the template's related entitynameMap - the template's new locales and localized namesdescriptionMap - the template's new locales and localized
descriptiontype - the template's type. For more information, see DDMTemplateConstants.mode - the template's mode. For more information, see DDMTemplateConstants.language - the template's script language. For more information,
see DDMTemplateConstants.script - the template's scriptcacheable - whether the template is cacheablesmallImage - whether the template has a small imagesmallImageURL - the template's small image URL (optionally
null)smallImageFile - the template's small image file (optionally
null)serviceContext - the service context to be applied. Can set the
modification date.
PortalException - if the user did not have permission to update the
template or if a portal exception occurred
public DDMTemplate updateTemplate(long templateId,
long classPK,
Map<Locale,String> nameMap,
Map<Locale,String> descriptionMap,
String type,
String mode,
String language,
String script,
boolean cacheable,
ServiceContext serviceContext)
throws PortalException
templateId - the primary key of the templateclassPK - the primary key of the template's related entitynameMap - the template's new locales and localized namesdescriptionMap - the template's new locales and localized
descriptiontype - the template's type. For more information, see DDMTemplateConstants.mode - the template's mode. For more information, see DDMTemplateConstants.language - the template's script language. For more information,
see DDMTemplateConstants.script - the template's scriptcacheable - whether the template is cacheableserviceContext - the service context to be applied. Can set the
modification date.
PortalException - if the user did not have permission to update the
template or if a portal exception occurred
|
Liferay 7.0-ce-m6 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||