cancel
Showing results for 
Search instead for 
Did you mean: 

Import de fichiers en XML

richardb
Champ in-the-making
Champ in-the-making
bonjour

je viens de créer un script xml pour importer un fichier et ses caractéristiques dans alfresco ( via procedure importer acp)

le script marche bien. Par contre, le fichier est créé à l'endroit ou je lance l'import de l'acp.

Quelle balise faut il utiliser pour préciser le chemin de stockage du fichier ?

je vous laisse le code de mon fichier xml ci-contre :

<?xml version="1.0" encoding="UTF-8"?>
<view:view xmlns:view="http://www.alfresco.org/view/repository/1.0">
  <view:metadata>
    <view:exportBy>admin</view:exportBy>
    <view:exportDate>2008-08-31T14:28:03.496+02:00</view:exportDate>
    <view:exporterVersion>2.1.0 (484)</view:exporterVersion>
    <view:exportOf>/app:company_home/cm:AESIS/cm:IMPORT</view:exportOf>
  </view:metadata>
  <cm:content xmlns="" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:module="http://www.alfresco.org/system/modules/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:alf="http://www.alfresco.org" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:reg="http://www.alfresco.org/system/registry/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" xmlns:custom="custom.model" view:childName="cm:rafale">
    <view:aspects>
      <cm:auditable></cm:auditable>
      <custom:detailsPerso></custom:detailsPerso>
      <sys:referenceable></sys:referenceable>
      <cm:titled></cm:titled>
      <cm:author></cm:author>
    </view:aspects>
    <view:properties>
      <cm:name>rafale</cm:name>
      <custom:DeQui>dsfgdsgf</custom:DeQui>
      <sys:node-dbid>960</sys:node-dbid>
      <sys:store-identifier>SpacesStore</sys:store-identifier>
      <sys:node-uuid>cd5b372d-7757-11dd-b961-479be1f59930</sys:node-uuid>
      <custom:Quand>dgdgd</custom:Quand>
      <cm:creator>admin</cm:creator>
      <cm:description></cm:description>
      <cm:modifier>admin</cm:modifier>
      <custom:TypeDoc>fgdsg</custom:TypeDoc>
      <cm:content>contentUrl=AESIS/content0.bin|mimetype=application/octet-stream|size=221441|encoding=UTF-8|locale=fr_FR_</cm:content>
      <custom:PourQui>dfgdsg</custom:PourQui>
      <cm:title>rafale</cm:title>
      <cm:author></cm:author>
      <cm:modified>2008-08-31T14:24:49.814+02:00</cm:modified>
      <custom:Ou>dfgdsg</custom:Ou>
      <cm:created>2008-08-31T14:24:48.251+02:00</cm:created>
      <sys:store-protocol>workspace</sys:store-protocol>
    </view:properties>
    <view:associations></view:associations>
  </cm:content>
</view:view>

Merci pour votre aide

cordialement

Richard
6 REPLIES 6

michaelh
Champ on-the-rise
Champ on-the-rise
bonjour,

Je ne connais pas la réponse, mais vous devriez vite le trouver en faisant un export d'un espace, et en cochant la case adaptée (inclure cet espace) puis en regardant le xml obtenu.

richardb
Champ in-the-making
Champ in-the-making
Merci pour cette réponse. J'avais crée mon fichier XML en me basant déja sur un export de fichier.

cordialement

Richard

rivarola
Champ on-the-rise
Champ on-the-rise
Bonjour,

J'ai déjà vu cette ligne au sein du descriptif XML pour positionner le point de référence de l'import (voir tout à la fin viewSmiley Tongueathref) :
  <view:reference xmlns:view="http://www.alfresco.org/view/repository/1.0" xmlns:d="http://www.alfresco.org/model/dictionary/1.0" xmlns:alf="http://www.alfresco.org" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" xmlns:act="http://www.alfresco.org/model/action/1.0" xmlns:wf="http://www.alfresco.org/model/workflow/1.0" xmlns:app="http://www.alfresco.org/model/application/1.0" xmlns:usr="http://www.alfresco.org/model/user/1.0" xmlns:ver="http://www.alfresco.org/model/versionstore/1.0" xmlns:cm="http://www.alfresco.org/model/content/1.0" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:wcm="http://www.alfresco.org/model/wcmmodel/1.0" xmlns:wca="http://www.alfresco.org/model/wcmappmodel/1.0" xmlns:sys="http://www.alfresco.org/model/system/1.0" xmlns:wcmwf="http://www.alfresco.org/model/wcmworkflow/1.0" xmlns:rule="http://www.alfresco.org/model/rule/1.0" xmlns:bpm="http://www.alfresco.org/model/bpm/1.0" xmlns:fm="http://www.alfresco.org/model/forum/1.0" xmlns:custom="custom.model" xmlns:reg="http://www.alfresco.org/system/registry/1.0" xmlns:module="http://www.alfresco.org/system/modules/1.0" xmlns="" view:pathref="/app:company_home/app:dictionary/cm:webscripts">

Je ne sais pas si c'est ce que tu cherches…

richardb
Champ in-the-making
Champ in-the-making
merci pour ta réponse.

je regardes de suite ce que cela donne

cordialement

RIchard

loicb
Champ in-the-making
Champ in-the-making
Bonjour,

Je voulais savoir ca avais marché!!!

Et si oui, est il possible de donner plusieur chemin pour un meme document, de le placer par exemploe dans 3 repertoires différents?? 

D'avance merci

mdutoo
Champ on-the-rise
Champ on-the-rise
Bonjour

Plusieurs actions automatiques de copie de document sur le même répertoire, ou une seule scriptée, peuvent faire l'affaire.

Si ça ne suffit pas, regardez donc (shameless plug) l'ETL Open Source Talend et son connecteur Alfresco.

Talend 3.1, comprenant le connecteur Alfresco, est disponible à http://www.talend.com/download.php .
Le connecteur Alfresco a été contribué sur la forge Alfresco à http://forge.alfresco.com/projects/etlconnector/ .
Pour plus d'informations, voir http://knowledge.openwide.fr/bin/view/Main/AlfrescoETLConnector .