private String createDocument(String name, String folderId, String typeId, Map<String, Object> properties, VersioningState verState) {
ContentStream contentStream = null;
List<String> policies = null;
Acl addACEs = null;
Acl removeACEs = null;
ExtensionsData extension = null;
Properties props = createDocumentProperties(name, typeId, properties);
String id = null;
try {