SlideShare une entreprise Scribd logo
1  sur  19
Télécharger pour lire hors ligne
N Hidden Gems in Forge (as of May ’17)
perhaps you haven’t seen yet...
Woonsan Ko
May 26, 2017
Sequel to N Hidden Gems You Didn’t Know…
(Amsterdam, 2016)
● slideshare.net/woonsan
● woonsanko.blogspot.com
Gem #1: External Taxonomy-like
Document Picker
“Link Document Field to External Taxonomy Data!”
Gem #1: External Taxonomy-like Document Picker
● External Document Picker Forge Plugin*:
○ Supports Tree List view as well as Flat List for backend data
since v4.0!
○ Concept: Separation of UI and Data Service.
■ Built-in UI Plugin, you don’t need to care of.
■ ExternalDocumentServiceFacade interface
● Configured for the UI Plugin; Invoked by the UI Plugin.
● All Data Handling under the hood against backend.
○ Title, icon and description for each external document.
○ Optionally, resolve parent-child relationships between items.
○ Store metadata of selected item(s) into Hippo document.
* More at https://onehippo-forge.github.io/external-document-picker/
Gem #1: External Taxonomy-like Document Picker (cont.)
● New optional interface for tree view:
* More at https://onehippo-forge.github.io/external-document-picker/
Gem #1: External Taxonomy-like Document Picker (cont.)
public interface ExternalDocumentTreeService<T extends Serializable> {
default public boolean hasChildren(T doc) { return false; }
default public Iterator<T> getChildren(T doc) { /* ... */ }
default public T getParent(T doc) { return null; }
}
public interface ExternalDocumentServiceFacade<T extends Serializable>
extends ExternalDocumentSearchService<T>, ExternalDocumentFieldService<T>,
ExternalDocumentDisplayService<T>, ExternalDocumentTreeService<T>, IClusterable {
/* ... */
}
Gem #2: Copy or Move Folder
In CMS UI
“Why can’t editors copy or move a folder?”
Gem #2: Copy or Move Folder in CMS UI*
* More at https://onehippo-forge.github.io/folder-context-menus/
Gem #3: Remoting for Automation
via JCR WebDAV
“Automate deployments with updating JCR data!”
Gem #3: Remoting for Automation via JCR WebDAV
●
○
○
* More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/
Gem #3: Remoting for Automation via JCR WebDAV (cont.)
$ curl --request MKCOL --data @editor.xml --user admin:admin 
http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor
<?xml version="1.0" encoding="UTF-8"?><sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="editor">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hipposys:group</sv:value>
</sv:property>
<sv:property sv:name="hipposys:members" sv:type="String" sv:multiple="true">
<sv:value>editor</sv:value><sv:value>john</sv:value>
</sv:property>
<sv:property sv:name="hipposys:securityprovider" sv:type="String">
<sv:value>internal</sv:value>
</sv:property>
</sv:node>
Creating or importing node
* More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and
http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
Example: editor.xml
Gem #3: Remoting for Automation via JCR WebDAV (cont.)
$ curl --user admin:admin 
http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor
<?xml version="1.0" encoding="UTF-8"?>
<sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="editor">
<sv:property sv:name="jcr:primaryType" sv:type="Name">
<sv:value>hipposys:group</sv:value>
</sv:property>
<sv:property sv:name="hipposys:members" sv:type="String" sv:multiple="true">
<sv:value>editor</sv:value><sv:value>john</sv:value>
</sv:property>
<sv:property sv:name="hipposys:securityprovider" sv:type="String">
<sv:value>internal</sv:value>
</sv:property>
</sv:node>
Reading node
* More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and
http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
Gem #3: Remoting for Automation via JCR WebDAV (cont.)
$ curl --request PUT --header "Content-Type: jcr-value/string" 
--user admin:admin 
--data "ldap-localhost" 
http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor/hipp
osys:securityprovider
Updating single valued property
* More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and
http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
Gem #3: Remoting for Automation via JCR WebDAV (cont.)
$ curl --request PUT --header "Content-Type: jcr-value/undefined" 
--user admin:admin 
--data 
"<values xmlns='http://www.day.com/jcr/webdav/1.0'> 
<value>editor</value> 
<value>john</value> 
<value>jane</value> 
</values>" 
http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor/hipp
osys:members
Updating multiple valued property
* More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and
http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
Gem #3: Remoting for Automation via JCR WebDAV (cont.)
$ curl --request DELETE 
--user admin:admin 
http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor/
Deleting a node or property
* More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and
http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
Gem #4: Live Version As-Of
via HST Content Version Utils
“Show content which was live in the past
(e.g, live version as of April 1, 2017)!”
Gem #4: Live Version As-Of via HST Content Version Utils*
●
○
○
final HstRequestContext requestContext = RequestContextProvider.get();
// First, get the current live news document.
News curNewsDoc = requestContext.getContentBean();
// Then let’s get the live version of the current news document as of April 1, 2017 if any.
Calendar asOfDate = ISO8601.parse("2017-04-01T00:00:00-04:00");
News newsDocAsOf = HippoBeanVersionUtils.getVersionedBeanAsOf(news.getCanonicalHandlePath(),
News.class,
asOfDate);
request.setAttribute("document", newsDocAsOf);
* More at https://onehippo-forge.github.io/hst-content-version-utils/
Gem #4: Live Version As-Of via HST Content Version Utils
(cont.)
public class JcrVersionUtils {
public static List<Version> getAllLinearVersions(Node versionableNode) { /* ... */ }
public static Version getRootVersion(Node versionableNode, List<Version> linearVersions) {
/* ... */
}
public static Node getVersionableNode(Node handleNode) { /* ... */ }
public static Version getVersionAsOf(Node versionableNode, List<Version> linearVersions,
Calendar asOf) { /* ... */ }
}
* More at https://onehippo-forge.github.io/hst-content-version-utils/apidocs/index.html
public class FrozenNodeUtils {
public static Node getNonFrozenPretenderNode(Node versionableNode,
Calendar created, Calendar asOf) { /* ... */ }
}
https://onehippo-forge.github.io/
https://github.com/onehippo-forge

Contenu connexe

Tendances

GR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with GrailsGR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with Grails
GR8Conf
 

Tendances (20)

CouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 HourCouchDB Mobile - From Couch to 5K in 1 Hour
CouchDB Mobile - From Couch to 5K in 1 Hour
 
Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?Mojo Facets – so, you have data and browser?
Mojo Facets – so, you have data and browser?
 
Introducing CouchDB
Introducing CouchDBIntroducing CouchDB
Introducing CouchDB
 
Scrapy
ScrapyScrapy
Scrapy
 
Search@airbnb
Search@airbnbSearch@airbnb
Search@airbnb
 
Dmp hadoop getting_start
Dmp hadoop getting_startDmp hadoop getting_start
Dmp hadoop getting_start
 
Web Scraping in Python with Scrapy
Web Scraping in Python with ScrapyWeb Scraping in Python with Scrapy
Web Scraping in Python with Scrapy
 
Making Django and NoSQL Play Nice
Making Django and NoSQL Play NiceMaking Django and NoSQL Play Nice
Making Django and NoSQL Play Nice
 
Intro To Couch Db
Intro To Couch DbIntro To Couch Db
Intro To Couch Db
 
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
MongoDB .local Paris 2020: Adéo @MongoDB : MongoDB Atlas & Leroy Merlin : et ...
 
Connecting to a REST API in iOS
Connecting to a REST API in iOSConnecting to a REST API in iOS
Connecting to a REST API in iOS
 
Building data flows with Celery and SQLAlchemy
Building data flows with Celery and SQLAlchemyBuilding data flows with Celery and SQLAlchemy
Building data flows with Celery and SQLAlchemy
 
Lokijs
LokijsLokijs
Lokijs
 
MongoDB WiredTiger Internals
MongoDB WiredTiger InternalsMongoDB WiredTiger Internals
MongoDB WiredTiger Internals
 
Couch db
Couch dbCouch db
Couch db
 
D2
D2D2
D2
 
HTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & socketsHTML5 tutorial: canvas, offfline & sockets
HTML5 tutorial: canvas, offfline & sockets
 
Grails and Neo4j
Grails and Neo4jGrails and Neo4j
Grails and Neo4j
 
GR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with GrailsGR8Conf 2011: Building Progressive UIs with Grails
GR8Conf 2011: Building Progressive UIs with Grails
 
Elk stack @inbot
Elk stack @inbotElk stack @inbot
Elk stack @inbot
 

Similaire à N hidden gems in forge (as of may '17)

The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
SPTechCon
 

Similaire à N hidden gems in forge (as of may '17) (20)

REST easy with API Platform
REST easy with API PlatformREST easy with API Platform
REST easy with API Platform
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
Spark IT 2011 - Simplified Web Development using Java Server Faces 2.0
 
Catalyst MVC
Catalyst MVCCatalyst MVC
Catalyst MVC
 
Guillotina
GuillotinaGuillotina
Guillotina
 
GitConnect
GitConnectGitConnect
GitConnect
 
Spark Meetup
Spark MeetupSpark Meetup
Spark Meetup
 
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
Hyperproductive JSF 2.0 @ JavaOne Brazil 2010
 
Building APIs in an easy way using API Platform
Building APIs in an easy way using API PlatformBuilding APIs in an easy way using API Platform
Building APIs in an easy way using API Platform
 
1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb1.6 米嘉 gobuildweb
1.6 米嘉 gobuildweb
 
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
The Magic Revealed: Four Real-World Examples of Using the Client Object Model...
 
Jenkins api
Jenkins apiJenkins api
Jenkins api
 
The Heron Mapping Client - Overview, Functions, Concepts
The Heron Mapping Client - Overview, Functions, Concepts The Heron Mapping Client - Overview, Functions, Concepts
The Heron Mapping Client - Overview, Functions, Concepts
 
AFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack EncoreAFUP Lorraine - Symfony Webpack Encore
AFUP Lorraine - Symfony Webpack Encore
 
FP - Découverte de Play Framework Scala
FP - Découverte de Play Framework ScalaFP - Découverte de Play Framework Scala
FP - Découverte de Play Framework Scala
 
Formatting ForThe Masses
Formatting ForThe MassesFormatting ForThe Masses
Formatting ForThe Masses
 
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan KrausHTML, CSS & Javascript Architecture (extended version) - Jan Kraus
HTML, CSS & Javascript Architecture (extended version) - Jan Kraus
 
Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0Moving from Web 1.0 to Web 2.0
Moving from Web 1.0 to Web 2.0
 
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
Advanced Web Scraping or How To Make Internet Your Database #seoplus2018
 
Microservices, Containers, and Machine Learning
Microservices, Containers, and Machine LearningMicroservices, Containers, and Machine Learning
Microservices, Containers, and Machine Learning
 

Dernier

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
Health
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
shinachiaurasa2
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
VictorSzoltysek
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
mohitmore19
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
VishalKumarJha10
 

Dernier (20)

+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
+971565801893>>SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHAB...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
%in Bahrain+277-882-255-28 abortion pills for sale in Bahrain
 
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdfAzure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
Azure_Native_Qumulo_High_Performance_Compute_Benchmarks.pdf
 
The title is not connected to what is inside
The title is not connected to what is insideThe title is not connected to what is inside
The title is not connected to what is inside
 
Microsoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdfMicrosoft AI Transformation Partner Playbook.pdf
Microsoft AI Transformation Partner Playbook.pdf
 
ManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide DeckManageIQ - Sprint 236 Review - Slide Deck
ManageIQ - Sprint 236 Review - Slide Deck
 
Exploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdfExploring the Best Video Editing App.pdf
Exploring the Best Video Editing App.pdf
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
Define the academic and professional writing..pdf
Define the academic and professional writing..pdfDefine the academic and professional writing..pdf
Define the academic and professional writing..pdf
 
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
%in kaalfontein+277-882-255-28 abortion pills for sale in kaalfontein
 
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
The Guide to Integrating Generative AI into Unified Continuous Testing Platfo...
 
Pharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodologyPharm-D Biostatistics and Research methodology
Pharm-D Biostatistics and Research methodology
 
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdfThe Top App Development Trends Shaping the Industry in 2024-25 .pdf
The Top App Development Trends Shaping the Industry in 2024-25 .pdf
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM TechniquesAI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
AI Mastery 201: Elevating Your Workflow with Advanced LLM Techniques
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdfintroduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
introduction-to-automotive Andoid os-csimmonds-ndctechtown-2021.pdf
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 

N hidden gems in forge (as of may '17)

  • 1. N Hidden Gems in Forge (as of May ’17) perhaps you haven’t seen yet... Woonsan Ko May 26, 2017
  • 2. Sequel to N Hidden Gems You Didn’t Know… (Amsterdam, 2016) ● slideshare.net/woonsan ● woonsanko.blogspot.com
  • 3. Gem #1: External Taxonomy-like Document Picker “Link Document Field to External Taxonomy Data!”
  • 4. Gem #1: External Taxonomy-like Document Picker ● External Document Picker Forge Plugin*: ○ Supports Tree List view as well as Flat List for backend data since v4.0! ○ Concept: Separation of UI and Data Service. ■ Built-in UI Plugin, you don’t need to care of. ■ ExternalDocumentServiceFacade interface ● Configured for the UI Plugin; Invoked by the UI Plugin. ● All Data Handling under the hood against backend. ○ Title, icon and description for each external document. ○ Optionally, resolve parent-child relationships between items. ○ Store metadata of selected item(s) into Hippo document. * More at https://onehippo-forge.github.io/external-document-picker/
  • 5. Gem #1: External Taxonomy-like Document Picker (cont.)
  • 6. ● New optional interface for tree view: * More at https://onehippo-forge.github.io/external-document-picker/ Gem #1: External Taxonomy-like Document Picker (cont.) public interface ExternalDocumentTreeService<T extends Serializable> { default public boolean hasChildren(T doc) { return false; } default public Iterator<T> getChildren(T doc) { /* ... */ } default public T getParent(T doc) { return null; } } public interface ExternalDocumentServiceFacade<T extends Serializable> extends ExternalDocumentSearchService<T>, ExternalDocumentFieldService<T>, ExternalDocumentDisplayService<T>, ExternalDocumentTreeService<T>, IClusterable { /* ... */ }
  • 7. Gem #2: Copy or Move Folder In CMS UI “Why can’t editors copy or move a folder?”
  • 8. Gem #2: Copy or Move Folder in CMS UI* * More at https://onehippo-forge.github.io/folder-context-menus/
  • 9. Gem #3: Remoting for Automation via JCR WebDAV “Automate deployments with updating JCR data!”
  • 10. Gem #3: Remoting for Automation via JCR WebDAV ● ○ ○ * More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/
  • 11. Gem #3: Remoting for Automation via JCR WebDAV (cont.) $ curl --request MKCOL --data @editor.xml --user admin:admin http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor <?xml version="1.0" encoding="UTF-8"?><sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="editor"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hipposys:group</sv:value> </sv:property> <sv:property sv:name="hipposys:members" sv:type="String" sv:multiple="true"> <sv:value>editor</sv:value><sv:value>john</sv:value> </sv:property> <sv:property sv:name="hipposys:securityprovider" sv:type="String"> <sv:value>internal</sv:value> </sv:property> </sv:node> Creating or importing node * More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html Example: editor.xml
  • 12. Gem #3: Remoting for Automation via JCR WebDAV (cont.) $ curl --user admin:admin http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor <?xml version="1.0" encoding="UTF-8"?> <sv:node xmlns:sv="http://www.jcp.org/jcr/sv/1.0" sv:name="editor"> <sv:property sv:name="jcr:primaryType" sv:type="Name"> <sv:value>hipposys:group</sv:value> </sv:property> <sv:property sv:name="hipposys:members" sv:type="String" sv:multiple="true"> <sv:value>editor</sv:value><sv:value>john</sv:value> </sv:property> <sv:property sv:name="hipposys:securityprovider" sv:type="String"> <sv:value>internal</sv:value> </sv:property> </sv:node> Reading node * More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
  • 13. Gem #3: Remoting for Automation via JCR WebDAV (cont.) $ curl --request PUT --header "Content-Type: jcr-value/string" --user admin:admin --data "ldap-localhost" http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor/hipp osys:securityprovider Updating single valued property * More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
  • 14. Gem #3: Remoting for Automation via JCR WebDAV (cont.) $ curl --request PUT --header "Content-Type: jcr-value/undefined" --user admin:admin --data "<values xmlns='http://www.day.com/jcr/webdav/1.0'> <value>editor</value> <value>john</value> <value>jane</value> </values>" http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor/hipp osys:members Updating multiple valued property * More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
  • 15. Gem #3: Remoting for Automation via JCR WebDAV (cont.) $ curl --request DELETE --user admin:admin http://localhost:8080/cms/server/default/jcr:root/hippo:configuration/hippo:groups/editor/ Deleting a node or property * More at https://onehippo-forge.github.io/hippo-jcr-over-webdav/cmd-examples.html and http://woonsanko.blogspot.com/2017/05/remoting-for-automation-via-apache.html
  • 16. Gem #4: Live Version As-Of via HST Content Version Utils “Show content which was live in the past (e.g, live version as of April 1, 2017)!”
  • 17. Gem #4: Live Version As-Of via HST Content Version Utils* ● ○ ○ final HstRequestContext requestContext = RequestContextProvider.get(); // First, get the current live news document. News curNewsDoc = requestContext.getContentBean(); // Then let’s get the live version of the current news document as of April 1, 2017 if any. Calendar asOfDate = ISO8601.parse("2017-04-01T00:00:00-04:00"); News newsDocAsOf = HippoBeanVersionUtils.getVersionedBeanAsOf(news.getCanonicalHandlePath(), News.class, asOfDate); request.setAttribute("document", newsDocAsOf); * More at https://onehippo-forge.github.io/hst-content-version-utils/
  • 18. Gem #4: Live Version As-Of via HST Content Version Utils (cont.) public class JcrVersionUtils { public static List<Version> getAllLinearVersions(Node versionableNode) { /* ... */ } public static Version getRootVersion(Node versionableNode, List<Version> linearVersions) { /* ... */ } public static Node getVersionableNode(Node handleNode) { /* ... */ } public static Version getVersionAsOf(Node versionableNode, List<Version> linearVersions, Calendar asOf) { /* ... */ } } * More at https://onehippo-forge.github.io/hst-content-version-utils/apidocs/index.html public class FrozenNodeUtils { public static Node getNonFrozenPretenderNode(Node versionableNode, Calendar created, Calendar asOf) { /* ... */ } }