Now I have use case such that a page (which can be created before source is getting created) should be converted to a live copy after the source is created.
You can map it by creating right nodes [1] by manually or using jcr api. But I do not know why you want to do it.
[1]
jcr:mixinTypes of type name array with value cq:LiveRelationship on all component nodes in pages. Please make sure all components have jcr:mixinTypes with value cq:LiveRelationship of name array.
cq:rolloutConfigs
Make sure the parent node of live copy has jcr:mixinTypes set to cq:LiveSync
You can map it by creating right nodes [1] by manually or using jcr api. But I do not know why you want to do it.
[1]
jcr:mixinTypes of type name array with value cq:LiveRelationship on all component nodes in pages. Please make sure all components have jcr:mixinTypes with value cq:LiveRelationship of name array.
cq:rolloutConfigs
Make sure the parent node of live copy has jcr:mixinTypes set to cq:LiveSync