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 PatternHTML_TAG_PATTERNMatches an opening or closing HTML tag.protected static PatternHTML_WHITESPACE_PATTERNSeveral 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 StringcancelledClass()StringgetComponentName()StringgetComponentPath()StringgetComponentTitle()StringgetDiffsDstInsertionsMarked()StringgetDiffsHTML()StringgetDiffsSrcInsertionsMarked()StringgetPath()StringgetPathInPage()Returns the path to the resource within the page - that is, after the jcr:content node.StringgetPropertyPathInComponent()AITranslatePropertyWrappergetWrapper()booleanisCancelled()booleanisProcessingNeeded()protected StringnormalizeForDiff(String text)Remove stuff that makes trouble with diffs.StringprocessingNeededClass()StringtoString()protected static StringwrapExcludingHTMLTags(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.
-
-