Class DiffRequest

java.lang.Object
com.gentics.contentnode.rest.model.request.DiffRequest

public class DiffRequest extends Object
Class representing a diff request sent to DiffResource. Encapsulates request data.
  • Field Details

    • DEFAULT_CHANGE_TEMPLATE

      public static final String DEFAULT_CHANGE_TEMPLATE
      Default template for changes
      See Also:
    • DEFAULT_INSERT_TEMPLATE

      public static final String DEFAULT_INSERT_TEMPLATE
      Default template for inserts
      See Also:
    • DEFAULT_REMOVE_TEMPALTE

      public static final String DEFAULT_REMOVE_TEMPALTE
      Default template for removals
      See Also:
    • DEFAULT_WORDS_BEFORE

      public static final int DEFAULT_WORDS_BEFORE
      Default number of words before the change to be shown
      See Also:
    • DEFAULT_WORDS_AFTER

      public static final int DEFAULT_WORDS_AFTER
      Default number of words after the change to be shown
      See Also:
    • content1

      protected String content1
      First content to be diff'ed
    • content2

      protected String content2
      Second content to be diff'ed
    • ignoreRegex

      protected String ignoreRegex
      Regex of content to be ignored while diffing
    • changeTemplate

      protected String changeTemplate
      Template for rendering changes
    • insertTemplate

      protected String insertTemplate
      Template for rendering inserts
    • removeTemplate

      protected String removeTemplate
      Template for rendering removals
    • wordsBefore

      protected Integer wordsBefore
      Number of words to be shown before the diff
    • wordsAfter

      protected Integer wordsAfter
      Number of words to be shown after the diff
  • Constructor Details

    • DiffRequest

      public DiffRequest()
      Create an empty instance (Used by JAXB)
  • Method Details

    • getContent1

      public String getContent1()
      Return the content1.
      Returns:
      the content1
    • setContent1

      public void setContent1(String content1)
      Set the content1.
      Parameters:
      content1 - the content1 to set
    • getContent2

      public String getContent2()
      Return the content2.
      Returns:
      the content2
    • setContent2

      public void setContent2(String content2)
      Set the content2.
      Parameters:
      content2 - the content2 to set
    • getIgnoreRegex

      public String getIgnoreRegex()
      Return the ignore regex that will be used to sanitize the content before the diff is invoked.
      Returns:
      the ignoreRegex
    • setIgnoreRegex

      public void setIgnoreRegex(String ignoreRegex)
      Set the ignore regex that will be used to sanitize the content before the diff is invoked.
      Parameters:
      ignoreRegex - the ignoreRegex to set
    • getChangeTemplate

      public String getChangeTemplate()
      Return the change template.

       
       The following default template will be used when no template has been set:
       <del class='diff modified gtx-diff'>$remove</del><ins class='diff modified gtx-diff'>$insert</ins>
       
       
      Returns:
      the changeTemplate
    • setChangeTemplate

      public void setChangeTemplate(String changeTemplate)
      Set the change template.

      The following default template will be used when no template has been set:

       
       <del class='diff modified gtx-diff'>$remove</del><ins class='diff modified gtx-diff'>$insert</ins>
       
       
      Parameters:
      changeTemplate - the template to set
    • getInsertTemplate

      public String getInsertTemplate()
      Return the insert template.

       
       The following default template will be used when no template has been set:
       <ins class='diff modified gtx-diff'>$insert</ins>
       
       
      Returns:
      the insertTemplate
    • setInsertTemplate

      public void setInsertTemplate(String insertTemplate)
      Set the insert template for the diff request.

      The following default template will be used when no template has been set:

       
       <ins class='diff modified gtx-diff'>$insert</ins>
       
       
      Parameters:
      insertTemplate - the template to set
    • getRemoveTemplate

      public String getRemoveTemplate()
      Return the remove template.

      The following default template will be used when no template has been set:

       
       <del class='diff modified gtx-diff'>$remove</del>
       
       
      Returns:
      the removeTemplate
    • setRemoveTemplate

      public void setRemoveTemplate(String removeTemplate)
      Set the remove template.

      The following default template will be used when no template has been set:

       
       <del class='diff modified gtx-diff'>$remove</del>
       
       
      Parameters:
      removeTemplate - the removeTemplate to set
    • getWordsBefore

      public Integer getWordsBefore()
      Return the number of words before the change to be shown. Default value: 10
      Returns:
      the wordsBefore
    • setWordsBefore

      public void setWordsBefore(Integer wordsBefore)
      Set the amount of words that should be displayed before the actual diff. Default value: 10
      Parameters:
      wordsBefore - the wordsBefore to set
    • getWordsAfter

      public Integer getWordsAfter()
      Return the amount of words that should be displayed after the actual diff. Default value: 10
      Returns:
      the wordsAfter
    • setWordsAfter

      public void setWordsAfter(Integer wordsAfter)
      Set the amount of words that should be displayed after the actual diff. Default value: 10
      Parameters:
      wordsAfter - the wordsAfter to set