Sunday, 29 December 2013
Tuesday, 24 December 2013
How to identify Version History of a page in CQ
1) Using repository
- Note that not for all node versions are created.
- Node has to be of mixin type mix:versionable (node.addMixin("mix:versionable")
- Once you are sure that node is of correct mixin type, Find that node using CRX explorer or CRXDELite.
- Once node is found find UUID of that node
- Based on UUID you can find out location of version within repository. Within repository versions are stored like this.
For example for UUID ce472450-f567-459e-8adc-6fd7a3d8a4f3 you can find its version under /jcr:system/jcr:versionStorage/ce/47/24/ce472450-f567-459e-8adc-6fd7a3d8a4f3/<Version Number>
2) using API
VersionManager mgr = session.getWorkspace().getVersionManager();
VersionHistory vh = (VersionHistory) node.getParent().getParent();
VersionIterator vit = vh.getAllVersions();
while (vit.hasNext()) {
Version v = vit.nextVersion();
}
Subscribe to:
Posts (Atom)
Converting InputStream to String
private String convertToString(InputStream inputStreamObj) throws IOException { if (inputStreamObj != null) { ...
-
Paragraph System (parsys) The paragraph system (parsys) is a compound component that allows authors to add components of different ...
-
1) Using repository Note that not for all node versions are created. Node has to be of mixin type mix:versionable (no...
-
Ctrl-G - Go to path/Search Ctrl-Shift-R - Reload selected node Ctrl-O - Open selected file Ctrl-N - Create a node Ctrl-Alt-N - Create ...