AnsweredAssumed Answered

Actions or Behaviors for Custm Content Model?

Question asked by simo2010 on Oct 5, 2010
Latest reply on Oct 11, 2010 by iblanco
Hi all,
i have the following requirements, but i don't know the right way to accomplisch them:
System:
-Alfresco EE 3.3.2 bundle
-Windows 2003 R2 server 32-Bit
-SDK3.3
-A CIFS Folder
Requirements:
- A custom Content Model (have already defined and successfull deployed) for PDF documents
<?xml version="1.0" encoding="UTF-8"?>

<!– Custom Model –>

<!– Note: This model is pre-configured to load at startup of the Repository.
    So, all custom –>
<!– types and aspects added here will automatically be registered –>

<model name="ivm:invoiceModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">

    <!– Optional meta-data about the model –>
    <description>Invoice Custom Model FH Mainz</description>
    <author>M. Noubough</author>
    <version>1.0</version>

    <imports>
        <!– Import Alfresco Dictionary Definitions –>
        <import uri="http://www.alfresco.org/model/dictionary/1.0"
            prefix="d" />
        <!– Import Alfresco Content Domain Model Definitions –>
        <import uri="http://www.alfresco.org/model/content/1.0" prefix="cm" />
    </imports>

    <!– Introduction of new namespaces defined by this model –>
    <!– NOTE: The following namespace custom.model should be changed to reflect
        your own namespace –>
    <namespaces>
        <namespace uri="http://www.dialog-semiconductor.com/model/content/1.0"
            prefix="ivm" />
    </namespaces>
    <types>

        <type name="ivm:inVoice">
            <title>Invoice FH Mainz</title>
            <parent>cm:content</parent>
            <properties>
                <property name="ivm:Number">
                    <title>Rechnungsnummer</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                   
                </property>
                <property name="ivm:Amount">
                    <title>Betrag</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
               
                </property>
                <property name="ivm:Date">
                    <title>Datum</title>
                    <type>d:date</type>
                    <mandatory>true</mandatory>
                </property>
                <property name="ivm:customerNumber">
                    <title>Kundennummer</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                   
                </property>
                <property name="ivm:payment">
                    <title>Zahlungsfrist</title>
                    <type>d:date</type>
                    <mandatory>true</mandatory>
                   
                </property>

                <property name="ivm:distributor">
                    <title>Lieferant</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                   
                </property>

                <property name="ivm:distributorNumber">
                    <title>Lieferanten-Nr.</title>
                    <type>d:text</type>
                    <mandatory>true</mandatory>
                </property>
            </properties>
        </type>
    </types>
</model>

- A external System put periodically two related documents on the CIFS folder: the one document contains a few properties (key/value)-pairs like a java property file or   .ini file under Windows and these properties correspond to the properties of the custom content model i have deployed previously , whreas the other document is a PDF file.

Now, i want to extract the value of each property from the first document and add them to the related (custom content model)-property of the second (PDF) file each time a pair of documents (metada file and related PDF) is entered the CIFS folder. After a PDF document has all required properties set, the related metadata document must be delete automaticaly from the CIFS Folder.

which Alfresco API or mechanism is the best  for such scenario (actions behaviors …?). the actions must run in background

any one can help me please. is urgent.

thanks.

Outcomes