Posts

Showing posts from October, 2017

Java DOM Parser - Parse XML Document | Code Factory

Image
File : ReadXMLFile.java package com.codeFactory; import java.io.File; import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; import org.w3c.dom.Document; import org.w3c.dom.Element; import org.w3c.dom.Node; import org.w3c.dom.NodeList; public class ReadXMLFile { public static void main(String[] args) { // TODO Auto-generated method stub try { File folder = new File("./src/com/codeFactory"); File[] listOfFiles = folder.listFiles(); // get all files details for (int i = 0; i < listOfFiles.length; i++) { if (listOfFiles[i].isFile() && listOfFiles[i].toString().contains(".xml")) { // check file is xml or not System.out.println("\n*** File " + listOfFiles[i].getName() + " ***\n"); File fXmlFile = new File("./src/com/codeFactory/" + listOfFiles[i].getName()); DocumentBuilderFactory dbFactory = DocumentBuilderFactory .n

Add and Delete User Using REST API In Alfresco | Code Factory

Image
Alfresco One 5.x Developer's Guide :  Download. Log in : GET  /alfresco/s/api/login?u={username}&pw={password?} Log in and establish a ticket.  Input u cleartext user name (must be URL encoded) pw cleartext password (must be URL encoded) Returns the new authentication ticket.  The user name and password are provided as URL arguments which may be logged by proxies or the Alfresco server. Add Person : POST  /alfresco/s/api/people Adds a new person based on the details provided.  userName mandatory - the user name for the new user firstName mandatory - the given Name lastName mandatory - the family name email mandatory - the email address password optional - the new user's password. If not specified then a value of "password" is used which should be changed as soon as possible. disableAccount optional - If present and set to "true" the user is created but their account will be disabled. quota optional - Sets the q

Upload Metadata And Files Using Batch Import Or Bulk Import In Alfresco | Code Factory

Image
Alfresco One 5.x Developer's Guide :  Download. Streaming bulk import is exposed in two web scripts: A simple UI web script that can be used to set up the parameters for an import. This is an HTTP GET web script with a path of: http://localhost:8080/alfresco/service/bulkfsimport An initiate web script that kicks off an import using parameters that are passed to it (for the source directory, target space, and so on). If you want to script or invoke the tool programmatically, this is the web script that you call. This is an HTTP POST web script with a path of:  http://localhost:8080/alfresco/service/bulkfsimport/initiate The UI web script presents the following simplified HTML form: The  Import directory  field is required and indicates the absolute file system directory to load the content and spaces from, in an OS-specific format. Note that this directory must be locally accessible to the server on which the Alfresco instance is running. It must either be a