Class AutoTranslateMergeService.AutoTranslateProperty
- java.lang.Object
-
- com.composum.ai.aem.core.impl.autotranslate.AutoTranslateMergeService.AutoTranslateProperty
-
- Enclosing interface:
- AutoTranslateMergeService
public static class AutoTranslateMergeService.AutoTranslateProperty extends Object
Represents a translated property associated with a resource.
-
-
Field Summary
Fields Modifier and Type Field Description protected static Pattern
HTML_TAG_PATTERN
Matches an opening or closing HTML tag.protected static Pattern
HTML_WHITESPACE_PATTERN
Several kinds of whitespace in HTML.
-
Constructor Summary
Constructors Constructor Description AutoTranslateProperty(String path, String componentPath, AITranslatePropertyWrapper wrapper, String componentName, String componentTitle, com.day.cq.wcm.msm.api.LiveRelationship relationship, boolean processingNeeded)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description String
cancelledClass()
String
getComponentName()
String
getComponentPath()
String
getComponentTitle()
String
getDiffsDstInsertionsMarked()
String
getDiffsHTML()
String
getDiffsSrcInsertionsMarked()
String
getPath()
String
getPathInPage()
Returns the path to the resource within the page - that is, after the jcr:content node.String
getPropertyPathInComponent()
AITranslatePropertyWrapper
getWrapper()
boolean
isCancelled()
boolean
isProcessingNeeded()
protected String
normalizeForDiff(String text)
Remove stuff that makes trouble with diffs.String
processingNeededClass()
String
toString()
protected static String
wrapExcludingHTMLTags(String text, String wrapstart, String wrapstop)
We wrap the text into wrapstart and wrapstop.
-
-
-
Method Detail
-
getPropertyPathInComponent
public String getPropertyPathInComponent()
-
getPath
public String getPath()
-
getComponentName
public String getComponentName()
-
getComponentPath
public String getComponentPath()
-
getComponentTitle
public String getComponentTitle()
-
getWrapper
public AITranslatePropertyWrapper getWrapper()
-
isCancelled
public boolean isCancelled()
-
cancelledClass
public String cancelledClass()
-
isProcessingNeeded
public boolean isProcessingNeeded()
-
processingNeededClass
public String processingNeededClass()
-
getDiffsHTML
public String getDiffsHTML()
-
getDiffsSrcInsertionsMarked
public String getDiffsSrcInsertionsMarked()
-
getDiffsDstInsertionsMarked
public String getDiffsDstInsertionsMarked()
-
normalizeForDiff
protected String normalizeForDiff(String text)
Remove stuff that makes trouble with diffs. Currently rel="noopener noreferrer"
-
wrapExcludingHTMLTags
protected static String wrapExcludingHTMLTags(@Nonnull String text, @Nonnull String wrapstart, @Nonnull String wrapstop)
We wrap the text into wrapstart and wrapstop. If there is an opening or closing HTML tag we do not wrap that but only the texts in between.
-
getPathInPage
public String getPathInPage()
Returns the path to the resource within the page - that is, after the jcr:content node.
-
-