Codota Logo
DDMTemplateLocalServiceUtil
Code IndexAdd Codota to your IDE (free)

How to use
DDMTemplateLocalServiceUtil
in
com.liferay.dynamic.data.mapping.service

Best Java code snippets using com.liferay.dynamic.data.mapping.service.DDMTemplateLocalServiceUtil (Showing top 20 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
StringBuilder s =
  • Codota Iconnew StringBuilder()
  • Codota Iconnew StringBuilder(32)
  • Codota IconString str;new StringBuilder(str)
  • Smart code suggestions by Codota
}
origin: com.liferay/com.liferay.dynamic.data.mapping.service

@Override
public DDMTemplate getTemplate() throws PortalException {
  return DDMTemplateLocalServiceUtil.getTemplate(getTemplateId());
}
origin: com.liferay/com.liferay.dynamic.data.mapping.service

  @Override
  public void persist() {
    if (this.isNew()) {
      DDMTemplateLocalServiceUtil.addDDMTemplate(this);
    }
    else {
      DDMTemplateLocalServiceUtil.updateDDMTemplate(this);
    }
  }
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Deletes the ddm template from the database. Also notifies the appropriate model listeners.
*
* @param ddmTemplate the ddm template
* @return the ddm template that was removed
*/
public static com.liferay.dynamic.data.mapping.model.DDMTemplate deleteDDMTemplate(
  com.liferay.dynamic.data.mapping.model.DDMTemplate ddmTemplate) {
  return getService().deleteDDMTemplate(ddmTemplate);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.service

@Override
public List<DDMTemplate> getTemplates() {
  return DDMTemplateLocalServiceUtil.getTemplates(getStructureId());
}
origin: com.liferay/com.liferay.journal.service

@Override
public DDMTemplate getDDMTemplate() {
  return DDMTemplateLocalServiceUtil.fetchTemplate(
    PortalUtil.getSiteGroupId(getGroupId()),
    ClassNameLocalServiceUtil.getClassNameId(JournalArticle.class),
    getDDMTemplateKey(), true);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.service

protected DDMStructure getDDMStructure(
    long ddmStructureId, long ddmTemplateId)
  throws PortalException {
  DDMStructure ddmStructure = DDMStructureLocalServiceUtil.getStructure(
    ddmStructureId);
  DDMTemplate ddmTemplate = DDMTemplateLocalServiceUtil.fetchDDMTemplate(
    ddmTemplateId);
  if (ddmTemplate != null) {
    // Clone ddmStructure to make sure changes are never persisted
    ddmStructure = (DDMStructure)ddmStructure.clone();
    ddmStructure.setDefinition(ddmTemplate.getScript());
  }
  return ddmStructure;
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

public static void revertTemplate(long userId, long templateId,
  String version,
  com.liferay.portal.kernel.service.ServiceContext serviceContext)
  throws com.liferay.portal.kernel.exception.PortalException {
  getService().revertTemplate(userId, templateId, version, serviceContext);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.service

@Override
public DDMTemplate getTemplate() throws PortalException {
  return DDMTemplateLocalServiceUtil.getTemplate(getTemplateId());
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Returns the number of templates belonging to the group.
*
* @param groupId the primary key of the group
* @return the number of templates belonging to the group
*/
public static int getTemplatesCount(long groupId) {
  return getService().getTemplatesCount(groupId);
}
origin: com.liferay/com.liferay.journal.service

private static String _getTemplateScript(
    long groupId, String ddmTemplateKey, Map<String, String> tokens,
    String languageId, boolean transform)
  throws PortalException {
  DDMTemplate ddmTemplate = DDMTemplateLocalServiceUtil.getTemplate(
    groupId, PortalUtil.getClassNameId(DDMStructure.class),
    ddmTemplateKey, true);
  return _getTemplateScript(ddmTemplate, tokens, languageId, transform);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

public static java.util.List<com.liferay.dynamic.data.mapping.model.DDMTemplate> getTemplates(
  long groupId, long classNameId, long classPK,
  boolean includeAncestorTemplates)
  throws com.liferay.portal.kernel.exception.PortalException {
  return getService()
        .getTemplates(groupId, classNameId, classPK,
    includeAncestorTemplates);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.service

@Override
public DDMForm getDDMForm(long classNameId, long classPK)
  throws PortalException {
  if ((classNameId <= 0) || (classPK <= 0)) {
    return null;
  }
  long ddmStructureClassNameId = _portal.getClassNameId(
    DDMStructure.class);
  long ddmTemplateClassNameId = _portal.getClassNameId(DDMTemplate.class);
  if (classNameId == ddmStructureClassNameId) {
    DDMStructure structure = DDMStructureLocalServiceUtil.getStructure(
      classPK);
    DDMForm ddmForm = structure.getFullHierarchyDDMForm();
    return ddmForm;
  }
  else if (classNameId == ddmTemplateClassNameId) {
    DDMTemplate template = DDMTemplateLocalServiceUtil.getTemplate(
      classPK);
    return _ddmFormJSONDeserializer.deserialize(template.getScript());
  }
  return null;
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Returns all the templates with the class PK.
*
* @param classPK the primary key of the template's related entity
* @return the templates with the class PK
*/
public static java.util.List<com.liferay.dynamic.data.mapping.model.DDMTemplate> getTemplates(
  long classPK) {
  return getService().getTemplates(classPK);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* @throws PortalException
*/
public static com.liferay.portal.kernel.model.PersistedModel deletePersistedModel(
  com.liferay.portal.kernel.model.PersistedModel persistedModel)
  throws com.liferay.portal.kernel.exception.PortalException {
  return getService().deletePersistedModel(persistedModel);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Returns the number of templates matching the group and class name ID.
*
* @param groupId the primary key of the group
* @param classNameId the primary key of the class name for the template's
related model
* @return the number of matching templates
*/
public static int getTemplatesCount(long groupId, long classNameId) {
  return getService().getTemplatesCount(groupId, classNameId);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Creates a new ddm template with the primary key. Does not add the ddm template to the database.
*
* @param templateId the primary key for the new ddm template
* @return the new ddm template
*/
public static com.liferay.dynamic.data.mapping.model.DDMTemplate createDDMTemplate(
  long templateId) {
  return getService().createDDMTemplate(templateId);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Returns the template with the primary key.
*
* @param templateId the primary key of the template
* @return the matching template, or <code>null</code> if a matching
template could not be found
*/
public static com.liferay.dynamic.data.mapping.model.DDMTemplate fetchTemplate(
  long templateId) {
  return getService().fetchTemplate(templateId);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Deletes the template and its resources.
*
* @param templateId the primary key of the template to be deleted
* @throws PortalException if a portal exception occurred
*/
public static void deleteTemplate(long templateId)
  throws com.liferay.portal.kernel.exception.PortalException {
  getService().deleteTemplate(templateId);
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Returns the number of ddm templates.
*
* @return the number of ddm templates
*/
public static int getDDMTemplatesCount() {
  return getService().getDDMTemplatesCount();
}
origin: com.liferay/com.liferay.dynamic.data.mapping.api

/**
* Returns the template with the primary key.
*
* @param templateId the primary key of the template
* @return the template with the primary key
* @throws PortalException if a portal exception occurred
*/
public static com.liferay.dynamic.data.mapping.model.DDMTemplate getTemplate(
  long templateId)
  throws com.liferay.portal.kernel.exception.PortalException {
  return getService().getTemplate(templateId);
}
com.liferay.dynamic.data.mapping.serviceDDMTemplateLocalServiceUtil

Javadoc

Provides the local service utility for DDMTemplate. This utility wraps com.liferay.dynamic.data.mapping.service.impl.DDMTemplateLocalServiceImpl and is the primary access point for service operations in application layer code running on the local server. 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.

Most used methods

  • getTemplate
    Returns the template matching the group and template key, optionally searching ancestor sites (that
  • addDDMTemplate
    Adds the ddm template to the database. Also notifies the appropriate model listeners.
  • fetchDDMTemplate
  • fetchTemplate
    Returns the template matching the group and template key, optionally searching ancestor sites (that
  • getService
  • getTemplates
  • updateDDMTemplate
    Updates the ddm template in the database or adds it if it does not yet exist. Also notifies the appr

Popular in Java

  • Making http requests using okhttp
  • getSystemService (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • requestLocationUpdates (LocationManager)
  • PrintStream (java.io)
    A PrintStream adds functionality to another output stream, namely the ability to print representatio
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Pattern (java.util.regex)
    A compiled representation of a regular expression. A regular expression, specified as a string, must
  • Stream (java.util.stream)
    A sequence of elements supporting sequential and parallel aggregate operations. The following exampl
  • JFrame (javax.swing)
  • Runner (org.openjdk.jmh.runner)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now