Package com.day.cq.wcm.msm.api
Interface LiveCopy
-
public interface LiveCopy
Defines a Live Copy configuration between a blueprint and its target. It can be seen as a configuration for aLiveRelationship
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
addExclusion(java.lang.String relativePath)
A LiveCopy can be effective on its Resource or any ancestor of it, if set to be deep, as byisDeep
.boolean
contains(java.lang.String absPath)
Check if the given Path is covered by this LiveCopy.java.lang.String
getBlueprintPath()
Returns the blueprint path of this Live Copy.java.util.Set<java.lang.String>
getExclusions()
All relative paths that have been set to be excluded from the LiveCopy by use ofaddExclusion(String)
.java.lang.String
getPath()
Returns the path of the Live Copy For example: "/content/copy"java.util.List<RolloutConfig>
getRolloutConfigs()
Returns the list ofRolloutConfig
attached to the currentLiveCopy
java.util.List<RolloutConfig>
getRolloutConfigs(RolloutManager.Trigger trigger)
Returns the list ofRolloutConfig
attached to the currentLiveCopy
filtered by the specified trigger.boolean
isDeep()
Returns if the Live Copy is deepboolean
isRoot()
Returns if the Live Copy is the root of a Live Copy treeboolean
isTrigger(RolloutManager.Trigger trigger)
Returns if the currentLiveCopy
contains at least oneRolloutConfig
with the specified trigger.boolean
removeExclusion(java.lang.String relativePath)
Add back the Blueprint Resource at the given path to be part of the LiveRelationship defined by this LiveCopy.
-
-
-
Method Detail
-
getPath
java.lang.String getPath()
Returns the path of the Live Copy For example: "/content/copy"- Returns:
- livecopy path
-
getBlueprintPath
java.lang.String getBlueprintPath()
Returns the blueprint path of this Live Copy. For example: "/content/geometrixx"- Returns:
- the blueprint path
-
isDeep
boolean isDeep()
Returns if the Live Copy is deep- Returns:
true
if deep
-
isRoot
boolean isRoot()
Returns if the Live Copy is the root of a Live Copy tree- Returns:
true
if root
-
getRolloutConfigs
java.util.List<RolloutConfig> getRolloutConfigs()
Returns the list ofRolloutConfig
attached to the currentLiveCopy
- Returns:
- the list or an empty list if no
RolloutConfig
-
getRolloutConfigs
java.util.List<RolloutConfig> getRolloutConfigs(RolloutManager.Trigger trigger)
Returns the list ofRolloutConfig
attached to the currentLiveCopy
filtered by the specified trigger.- Parameters:
trigger
- list is filtered with this trigger- Returns:
- the list or an empty list if no
RolloutConfig
-
isTrigger
boolean isTrigger(RolloutManager.Trigger trigger)
Returns if the currentLiveCopy
contains at least oneRolloutConfig
with the specified trigger.- Parameters:
trigger
- the trigger to check- Returns:
- true if at least one config as specified trigger, false otherwise.
-
addExclusion
boolean addExclusion(java.lang.String relativePath)
A LiveCopy can be effective on its Resource or any ancestor of it, if set to be deep, as byisDeep
. This methods allows to omit ancestor Resources from the LiveCopy's Blueprint to be part of the LiveRelationship.There will be no immediate change to the Content of the LiveCopy, the change only become effective upon the next roll-out If the Resource already exists in the LiveCopy, it will no longer receive updates. The
LiveRelationshipManager.hasLiveRelationship(org.apache.sling.api.resource.Resource)
will resolve to false, even if the Resource once has been created in a Roll-out processThe exclusion is always effective on the Resource denoted by the path and all its descendants.
- Parameters:
relativePath
- paths relative to theLiveCopy's path
that are should not be part of LiveRelationShip.- Returns:
- true in case the given Path has been
contained
before
-
removeExclusion
boolean removeExclusion(java.lang.String relativePath)
Add back the Blueprint Resource at the given path to be part of the LiveRelationship defined by this LiveCopy. There will be no immediate change to the Content of the LiveCopy, the change only becomes effective upon the next roll-out- Parameters:
relativePath
- path relative to theLiveCopy's path
that should take part in inheritance again- Returns:
- true in case the path has been
excluded
before - See Also:
addExclusion(String)
-
contains
boolean contains(java.lang.String absPath)
Check if the given Path is covered by this LiveCopy. Eg if LiveCopy is deep and the given path is descendant of this LiveCopy's path. And it is NOT part of the exclusion-list- Parameters:
absPath
- the path to be considered, true if LiveCopy is deep and the path is not excluded or LiveCopy is not deep and path is equal to the LiveCopy'spath
- Returns:
- true in case the given absolute path matches the LiveCopy's configuration. Generally speaking, is a descendant of the LiveCopy's path and not excluded.
-
getExclusions
java.util.Set<java.lang.String> getExclusions()
All relative paths that have been set to be excluded from the LiveCopy by use ofaddExclusion(String)
. This means for example that a shallow LiveCopy will return an empty Set though it does notinclude
any other path than the LiveCopy's.- Returns:
- all relative paths that are explicitly excluded. The returned Set is NOT backed by the the LiveCopy nor will changes to the Set written back to the LiveCopy
- See Also:
addExclusion(String)
-
-