{"id":26,"date":"2009-01-06T12:01:10","date_gmt":"2009-01-06T06:31:10","guid":{"rendered":"https:\/\/2thenew.xyz\/blog\/?p=26"},"modified":"2016-12-19T15:19:21","modified_gmt":"2016-12-19T09:49:21","slug":"how-to-add-content-to-wcm-with-java-backed-webscripts","status":"publish","type":"post","link":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/","title":{"rendered":"How to add content to WCM with Java Backed Webscripts?"},"content":{"rendered":"<p>Hi,<\/p>\n<p>Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I&#8217;ll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a good place to start. The Abstract class that it defines can be used as a base for other web-scripts. The specific method that can be used to create a node in our web project is the createFile method in the AVMService. This method returns the outputStream to the newly created object. The parameters for the createFile method are;<br \/>\n\u2022 Path: It is the path to the directory in which the file is to be created.<br \/>\n\u2022 FileName: It is the name with which the file will be created.<br \/>\nOnce we have the output stream for the newly created file, we can just write the contents to the file using the write method (it is used to write a byte array to the stream).<\/p>\n<p>Thus creating the file can be done in three (simple) steps:-<br \/>\n1. Create a file using the createFile method of AVMService.<br \/>\n2. Write the contents in the form of byte array to the output stream returned by the method called in 1.<br \/>\n3. Close the output stream.<\/p>\n<p>Your feedback and\u00a0 suggestions are welcome.<\/p>\n<p>Regards<br \/>\n~~Himanshu Seth~~<\/p>\n<p>https:\/\/2thenew.xyz<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I&#8217;ll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"iawp_total_views":8,"footnotes":""},"categories":[1],"tags":[],"class_list":["post-26","post","type-post","status-publish","format-standard","hentry","category-technology"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.0.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I&#039;ll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Himanshu Seth\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.0.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"TO THE NEW BLOG\" \/>\n\t\t<meta property=\"og:type\" content=\"blog\" \/>\n\t\t<meta property=\"og:title\" content=\"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog\" \/>\n\t\t<meta property=\"og:description\" content=\"Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I&#039;ll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<meta name=\"twitter:card\" content=\"summary\" \/>\n\t\t<meta name=\"twitter:site\" content=\"@tothenew\" \/>\n\t\t<meta name=\"twitter:title\" content=\"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog\" \/>\n\t\t<meta name=\"twitter:description\" content=\"Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I&#039;ll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a\" \/>\n\t\t<meta name=\"twitter:image\" content=\"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png\" \/>\n\t\t<script type=\"application\/ld+json\" class=\"aioseo-schema\">\n\t\t\t{\"@context\":\"https:\\\/\\\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#article\",\"name\":\"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog\",\"headline\":\"How to add content to WCM with Java Backed Webscripts?\",\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"},\"datePublished\":\"2009-01-06T12:01:10+05:30\",\"dateModified\":\"2016-12-19T15:19:21+05:30\",\"inLanguage\":\"en-US\",\"commentCount\":1,\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#webpage\"},\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#webpage\"},\"articleSection\":\"Technology\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#breadcrumblist\",\"itemListElement\":[{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"position\":2,\"name\":\"Technology\",\"item\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/\",\"nextItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#listItem\",\"name\":\"How to add content to WCM with Java Backed Webscripts?\"},\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog#listItem\",\"name\":\"Home\"}},{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#listItem\",\"position\":3,\"name\":\"How to add content to WCM with Java Backed Webscripts?\",\"previousItem\":{\"@type\":\"ListItem\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/category\\\/technology\\\/#listItem\",\"name\":\"Technology\"}}]},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\",\"name\":\"TO THE NEW Blog\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\"},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/\",\"name\":\"Himanshu Seth\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#authorImage\",\"url\":\"https:\\\/\\\/secure.gravatar.com\\\/avatar\\\/62e787d1a52267475ecb3fb2b7bea0715c3f4409cf080f75b5ee57e3bfa770a8?s=96&d=mm&r=g\",\"width\":96,\"height\":96,\"caption\":\"Himanshu Seth\"}},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#webpage\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/\",\"name\":\"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog\",\"description\":\"Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I'll again point out that if you are starting with Java backed web-scripts to read\\\/write content from\\\/to alfresco wcm, then the example script at http:\\\/\\\/wiki.alfresco.com\\\/wiki\\\/Java-backed_Web_Scripts_Samples is a\",\"inLanguage\":\"en-US\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\"},\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/how-to-add-content-to-wcm-with-java-backed-webscripts\\\/#breadcrumblist\"},\"author\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"creator\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/author\\\/himanshu\\\/#author\"},\"datePublished\":\"2009-01-06T12:01:10+05:30\",\"dateModified\":\"2016-12-19T15:19:21+05:30\"},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/\",\"name\":\"TO THE NEW Blog\",\"inLanguage\":\"en-US\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.tothenew.com\\\/blog\\\/#organization\"}}]}\n\t\t<\/script>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog","description":"Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I'll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a","canonical_url":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#article","name":"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog","headline":"How to add content to WCM with Java Backed Webscripts?","author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/#author"},"publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"},"datePublished":"2009-01-06T12:01:10+05:30","dateModified":"2016-12-19T15:19:21+05:30","inLanguage":"en-US","commentCount":1,"mainEntityOfPage":{"@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#webpage"},"isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#webpage"},"articleSection":"Technology"},{"@type":"BreadcrumbList","@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#breadcrumblist","itemListElement":[{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","position":1,"name":"Home","item":"https:\/\/2thenew.xyz\/blog","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/technology\/#listItem","name":"Technology"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/technology\/#listItem","position":2,"name":"Technology","item":"https:\/\/2thenew.xyz\/blog\/category\/technology\/","nextItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#listItem","name":"How to add content to WCM with Java Backed Webscripts?"},"previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog#listItem","name":"Home"}},{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#listItem","position":3,"name":"How to add content to WCM with Java Backed Webscripts?","previousItem":{"@type":"ListItem","@id":"https:\/\/2thenew.xyz\/blog\/category\/technology\/#listItem","name":"Technology"}}]},{"@type":"Organization","@id":"https:\/\/2thenew.xyz\/blog\/#organization","name":"TO THE NEW Blog","url":"https:\/\/2thenew.xyz\/blog\/"},{"@type":"Person","@id":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/#author","url":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/","name":"Himanshu Seth","image":{"@type":"ImageObject","@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#authorImage","url":"https:\/\/secure.gravatar.com\/avatar\/62e787d1a52267475ecb3fb2b7bea0715c3f4409cf080f75b5ee57e3bfa770a8?s=96&d=mm&r=g","width":96,"height":96,"caption":"Himanshu Seth"}},{"@type":"WebPage","@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#webpage","url":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/","name":"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog","description":"Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I'll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a","inLanguage":"en-US","isPartOf":{"@id":"https:\/\/2thenew.xyz\/blog\/#website"},"breadcrumb":{"@id":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/#breadcrumblist"},"author":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/#author"},"creator":{"@id":"https:\/\/2thenew.xyz\/blog\/author\/himanshu\/#author"},"datePublished":"2009-01-06T12:01:10+05:30","dateModified":"2016-12-19T15:19:21+05:30"},{"@type":"WebSite","@id":"https:\/\/2thenew.xyz\/blog\/#website","url":"https:\/\/2thenew.xyz\/blog\/","name":"TO THE NEW Blog","inLanguage":"en-US","publisher":{"@id":"https:\/\/2thenew.xyz\/blog\/#organization"}}]},"og:locale":"en_US","og:site_name":"TO THE NEW BLOG","og:type":"blog","og:title":"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog","og:description":"Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I'll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a","og:url":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/","og:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","og:image:secure_url":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png","twitter:card":"summary","twitter:site":"@tothenew","twitter:title":"How to add content to WCM with Java Backed Webscripts? | TO THE NEW Blog","twitter:description":"Hi, Content can be written to the wcm repository by simply using the AVMService class. The instance of this service is available through the instance of ServiceRegistry class. I'll again point out that if you are starting with Java backed web-scripts to read\/write content from\/to alfresco wcm, then the example script at http:\/\/wiki.alfresco.com\/wiki\/Java-backed_Web_Scripts_Samples is a","twitter:image":"https:\/\/2thenew.xyz\/blog\/wp-content\/themes\/ttn\/images\/social-logo.png"},"aioseo_meta_data":{"post_id":"26","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"Article","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"limit_modified_date":false,"created":"2021-04-30 08:17:00","updated":"2024-02-29 11:01:21","focus_keyword":null,"additional_keywords":null,"truseo_locale":null,"ai":null,"breadcrumb_settings":null,"seo_analyzer_scan_date":null},"aioseo_breadcrumb":"<div class=\"aioseo-breadcrumbs\"><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.xyz\/blog\" title=\"Home\">Home<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\t<a href=\"https:\/\/2thenew.xyz\/blog\/category\/technology\/\" title=\"Technology\">Technology<\/a>\n\t\t<\/span><span class=\"aioseo-breadcrumb-separator\">&raquo;<\/span><span class=\"aioseo-breadcrumb\">\n\t\t\tHow to add content to WCM with Java Backed Webscripts?\n\t\t<\/span><\/div>","aioseo_breadcrumb_json":[{"label":"Home","link":"https:\/\/2thenew.xyz\/blog"},{"label":"Technology","link":"https:\/\/2thenew.xyz\/blog\/category\/technology\/"},{"label":"How to add content to WCM with Java Backed Webscripts?","link":"https:\/\/2thenew.xyz\/blog\/how-to-add-content-to-wcm-with-java-backed-webscripts\/"}],"_links":{"self":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/26","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/comments?post=26"}],"version-history":[{"count":0,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/posts\/26\/revisions"}],"wp:attachment":[{"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/media?parent=26"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/categories?post=26"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/2thenew.xyz\/blog\/wp-json\/wp\/v2\/tags?post=26"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}