01-29-2008 05:29 AM
<!– 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="custom.model" prefix="custom"/>
</namespaces>
<types>
<!– Definition of new Content Type: Press Release –>
<type name="custom:CheckInformation">
<title>Informacion de Cheque</title>
<parent>cm:content</parent>
<properties>
<property name="custom:CompanyName">
<title>Nombre Sociedad</title>
<type>d:text</type>
</property>
<property name="custom:CompanyCIF">
<title>CIF/NIF</title>
<type>d:text</type>
</property>
</properties>
</type>
</types> <!– Lists the custom aspect in business rules Action wizard –>
<config evaluator="string-compare" condition="Action Wizards">
<subtypes>
<type name="custom:CheckInformation"/>
</subtypes>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="custom:CheckInformation" />
</content-types>
</config>
<config evaluator="node-type" condition="custom:CheckInformation">
<property-sheet>
<show-property name="mimetype"
display-label-id="content_type"
component-generator="MimeTypeSelectorGenerator" />
<show-property name="size"
display-label-id="size"
converter="org.alfresco.faces.BByteSizeConverter"
show-in-edit-mode="false" />
<show-property name="custom:CompanyName" />
<show-property name="custom:CompanyCIF" />
</property-sheet>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="custom:CheckInformation" />
</content-types>
<custom-properties>
<meta-data type="custom:CheckInformation" property="custom:CompanyName" />
<meta-data type="custom:CheckInformation" property="custom:CompanyCIF" />
</custom-properties>
</advanced-search>
</config>
01-29-2008 09:58 AM
<config evaluator="string-compare" condition="Action Wizards">
<subtypes>
<type name="custom:CheckInformation"/>
</subtypes>
<specialise-types>
<type name="custom:CheckInformation"/>
</specialise-types>
</config> 01-29-2008 11:34 AM
01-29-2008 02:10 PM
// First we read the document to find the values
var Sociedad ="";
var CIF ="";
var FileContent = document.content;
var FileLines = FileContent.split("\n");
var Lines=0;
var words;
var foundSociedad = False;
var foundtradoCIF = False;
while ((foundSociedad == False) || (foundtradoCIF == False)) && (Lines <= FileLines.length)
{
var Word_Count=0;
words = FileLines[Lines].split(" ");
while ((foundSociedad == False) || (foundtradoCIF == False)) && (Word_Count <= words.length)
{
if (words[Word_Count] =="Sociedad:")
{
foundSociedad = True;
Sociedad = words[(Word_Count +1)];
}
if (words[Word_Count] =="CIF:")
{
foundtradoCIF = True;
CIF = words[(Word_Count +1)];
}
Word_Count=Word_Count+1;
}
Lines = Lines+1;
}
// Now that we have the values we apply them to the properties of the custom type.
document.properties.name="Doc_"+Sociedad+"_"+CIF;
document.properties["custom:CompanyName"]=Sociedad;
document.properties["custom:CompanyCIF"]=CIF;
document.save();
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.