public interface LiveRelationshipManager
Modifier and Type | Method and Description |
---|---|
void |
addSkippedPages(Page parentPage,
java.lang.String[] childName,
boolean autoSave)
Deprecated.
since 5.7 use
LiveCopy.addExclusion(String) instead |
void |
cancelPropertyRelationship(ResourceResolver resolver,
LiveRelationship relation,
java.lang.String[] names,
boolean autoSave)
Cancel the relationship of the given relation.
|
void |
cancelRelationship(ResourceResolver resolver,
LiveRelationship relation,
boolean deep,
boolean autoSave)
Cancel the relationship of the given relation.
|
void |
detach(Resource resource,
boolean autoSave)
Deprecated.
since 5.5 use endRelationship()
|
void |
endRelationship(Resource resource,
boolean autoSave)
Ends the
LiveRelationship
of the given Resource.The Resource has to be part of a LiveCopy
As indicated by hasLiveRelationship method
A detached Resource is treated as any other Resource that is created in the LiveCopy tree. NOTE: this means especially that any history of this relation is gone. |
LiveRelationship |
establishRelationship(Page source,
Page copy,
boolean deep,
boolean autoSave,
RolloutConfig... rolloutConfig)
Puts a Page under the control of a LiveCopy
|
RangeIterator |
getChildren(LiveRelationship relationship,
ResourceResolver resourceResolver)
Get the children of the given LiveRelationship
|
java.util.Map<java.lang.String,LiveCopy> |
getLiveCopies()
Deprecated.
since 5.5 use
getLiveRelationships(org.apache.sling.api.resource.Resource, com.day.cq.wcm.msm.api.RolloutManager.Trigger, String[], boolean)
to search for LiveCopies |
LiveCopy |
getLiveCopy(Resource target)
Deprecated.
|
LiveRelationship |
getLiveRelationship(Resource target,
boolean advancedStatus)
Returns a
LiveRelationship
of the given LiveCopy Resource |
java.util.Collection<LiveRelationship> |
getLiveRelationships(Page source,
RolloutManager.Trigger trigger,
java.lang.String[] targets,
boolean advancedStatus)
|
java.util.Collection<LiveRelationship> |
getLiveRelationships(Resource source,
RolloutManager.Trigger trigger,
java.lang.String[] targets,
boolean advancedStatus)
|
RangeIterator |
getLiveRelationships(Resource source,
java.lang.String targetPathFilter,
RolloutManager.Trigger triggerFilter)
Find all LiveRelationships, that have the given Resource as Blueprint.
|
java.util.Map<java.lang.String,Page> |
getSkippedSourcePages(Page parentTargetPage)
Deprecated.
since 5.7 use
LiveCopy.getExclusions() instead |
boolean |
hasLiveRelationship(Resource resource)
Checks if the given Resource is target of a LiveRelationship.
|
boolean |
isInBlueprint(Resource source)
Deprecated.
use
BlueprintManager.getContainingBlueprint(String) to check |
boolean |
isLiveCopy(Resource target)
Deprecated.
since 5.5 use
hasLiveRelationship(org.apache.sling.api.resource.Resource) instead |
boolean |
isSource(Resource resource)
Checks if the given source is the source of a Live Copy relationship.
|
void |
reenablePropertyRelationship(ResourceResolver resolver,
LiveRelationship relation,
java.lang.String[] names,
boolean autoSave)
Re-enable the relationship of a canceled one.
|
void |
reenableRelationship(ResourceResolver resolver,
LiveRelationship relation,
boolean autoSave)
Re-enable the relationship of a canceled one.
|
void |
removeSkippedPages(Page parentPage,
java.lang.String[] childName,
boolean autoSave)
Deprecated.
since 5.7 use
LiveCopy.removeExclusion(String) instead |
boolean hasLiveRelationship(Resource resource)
resource
- the resource to checktrue
if the Resource is controlled by a LiveCopyboolean isSource(Resource resource)
resource
- the resource to checktrue
if the resource is a blueprintjava.util.Collection<LiveRelationship> getLiveRelationships(Page source, RolloutManager.Trigger trigger, java.lang.String[] targets, boolean advancedStatus) throws WCMException
getLiveRelationships(org.apache.sling.api.resource.Resource, String, com.day.cq.wcm.msm.api.RolloutManager.Trigger)
source
- source pagetrigger
- filter for triggerstargets
- filter for targetsadvancedStatus
- True if advanced status (time consuming) must be computed for relationshipsWCMException
- if an error occursjava.util.Collection<LiveRelationship> getLiveRelationships(Resource source, RolloutManager.Trigger trigger, java.lang.String[] targets, boolean advancedStatus) throws WCMException
getLiveRelationships(org.apache.sling.api.resource.Resource, String, com.day.cq.wcm.msm.api.RolloutManager.Trigger)
LiveCopy root
.source
- resourcetrigger
- filter for triggerstargets
- filter for targetsadvancedStatus
- True if advanced status (time consuming) must be computed for relationshipsWCMException
- if an error occursRangeIterator getLiveRelationships(Resource source, java.lang.String targetPathFilter, RolloutManager.Trigger triggerFilter) throws WCMException
The result is a RangeIterator that contains the matching LiveRelationships.
source
- to inspecttargetPathFilter
- absolute path the LiveRelationships should be searched in, null indicates root
The path filter matches always self and descendantstriggerFilter
- the Trigger the LiveRelationships must have
LiveRelationship.isTrigger(com.day.cq.wcm.msm.api.RolloutManager.Trigger)
.
null argument indicates anyWCMException
- if an error occursRangeIterator
LiveRelationship getLiveRelationship(Resource target, boolean advancedStatus) throws WCMException
LiveRelationship
of the given LiveCopy
Resourcetarget
- the LiveCopy target ResourceadvancedStatus
- True if advanced status must be computed for relationshipnull
if the resource is not a LiveCopyWCMException
- if an error occursRangeIterator getChildren(LiveRelationship relationship, ResourceResolver resourceResolver) throws WCMException
This is the combined set of the Blueprint's and the LiveRelationship's children Resources. Thus the result contains the Relationships for Resources that only exists in Blueprint, that only exists in LiveCopy and that exists in both.
The order of result is not specific.
relationship
- to access the children forresourceResolver
- to use to access the resources withWCMException
- if an error occursRangeIterator
LiveRelationship establishRelationship(Page source, Page copy, boolean deep, boolean autoSave, RolloutConfig... rolloutConfig) throws WCMException
source
- the source to be synced to the copycopy
- the page to receive the changes from the sourcedeep
- if false the LiveCopy of this relation ship will only be valid for the Page given as copy argumentautoSave
- if the changes should be committedrolloutConfig
- the configuration to be use for the synchronizationWCMException
- in case of error establishing the relationshipvoid endRelationship(Resource resource, boolean autoSave) throws WCMException
LiveRelationship
of the given Resource.LiveCopy
As indicated by hasLiveRelationship method
cancelRelationship method
resource
- to detach from LiveRelationshipautoSave
- if true changes are committed immediatelyWCMException
- in case an error occurs on detachmenthasLiveRelationship(Resource)
void cancelRelationship(ResourceResolver resolver, LiveRelationship relation, boolean deep, boolean autoSave) throws WCMException
resolver
- resource resolverrelation
- relationdeep
- if true
all child relations are canceled, tooautoSave
- Save modificationsWCMException
- if an error occursvoid reenableRelationship(ResourceResolver resolver, LiveRelationship relation, boolean autoSave) throws WCMException
resolver
- resource resolverrelation
- relation to re-enableautoSave
- Save modificationsWCMException
- if an error occursvoid cancelPropertyRelationship(ResourceResolver resolver, LiveRelationship relation, java.lang.String[] names, boolean autoSave) throws WCMException
resolver
- resource resolverrelation
- relationnames
- list of property names for which inheritance is canceledautoSave
- Save modificationsWCMException
- if an error occursvoid reenablePropertyRelationship(ResourceResolver resolver, LiveRelationship relation, java.lang.String[] names, boolean autoSave) throws WCMException
resolver
- resource resolverrelation
- relation to re-enablenames
- list of property names for which inheritance is reenabledautoSave
- Save modificationsWCMException
- if an error occurs@Deprecated java.util.Map<java.lang.String,Page> getSkippedSourcePages(Page parentTargetPage) throws WCMException
LiveCopy.getExclusions()
insteadparentTargetPage
- Parent target pageWCMException
- if an error occurs@Deprecated void addSkippedPages(Page parentPage, java.lang.String[] childName, boolean autoSave) throws WCMException
LiveCopy.addExclusion(String)
insteadparentPage
- Parent pagechildName
- names of the pages to be skippedautoSave
- Save modificationsWCMException
- if an error occursPage.getName()
@Deprecated void removeSkippedPages(Page parentPage, java.lang.String[] childName, boolean autoSave) throws WCMException
LiveCopy.removeExclusion(String)
insteadparentPage
- Parent pagechildName
- names of the Pages to be unskippedautoSave
- Save modificationsWCMException
- if an error occursPage.getName()
@Deprecated java.util.Map<java.lang.String,LiveCopy> getLiveCopies() throws WCMException
getLiveRelationships(org.apache.sling.api.resource.Resource, com.day.cq.wcm.msm.api.RolloutManager.Trigger, String[], boolean)
to search for LiveCopiesWCMException
- in case of error accessing the LiveCopy@Deprecated LiveCopy getLiveCopy(Resource target) throws WCMException
getLiveRelationship(org.apache.sling.api.resource.Resource, boolean)
target
resource.target
- resourceWCMException
- in case of error accessing the LiveCopy@Deprecated boolean isInBlueprint(Resource source)
BlueprintManager.getContainingBlueprint(String)
to checksource
- the resource to checktrue
if the resource is a blueprint@Deprecated boolean isLiveCopy(Resource target)
hasLiveRelationship(org.apache.sling.api.resource.Resource)
insteadtarget
- the resource to checktrue
if the resource is live synced@Deprecated void detach(Resource resource, boolean autoSave) throws WCMException
LiveRelationship
of the given Resource.LiveCopy
As indicated by hasLiveRelationship method
method
resource
- to detach from LiveRelationshipautoSave
- if true changes are committed immediatelyWCMException
- in case an error occurs on detachmentisLiveCopy(Resource)
Copyright © 2010 - 2024 Adobe. All Rights Reserved