03-05-2010 07:34 AM
<namespaces>
<namespace uri="http://www.myapp.com/model/content/1.0" prefix="myprefix" />
</namespaces>
<types>
<type name="myprefix:mytype">
<title>My Type</title>
<parent>myprefix:mygenerictype</parent>
<property name="myprefix:mytypeproperty">
<title>TypeProperty</title>
<type>d:text</type>
<protected>false</protected>
<mandatory>false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<atomic>false</atomic>
<stored>false</stored>
<tokenised>true</tokenised>
</index>
</property>
<mandatory-aspects>
<aspect>myprefix:myaspect</aspect>
</mandatory-aspects>
</type>
</types>
<aspects>
<aspect name="myprefix:myaspect">
<title>My Aspect</title>
<properties>
<property name="myprefix:myaspectproperty">
<title>AspectProperty</title>
<type>d:text</type>
<protected>false</protected>
<mandatory>false</mandatory>
<multiple>false</multiple>
<index enabled="true">
<atomic>false</atomic>
<stored>false</stored>
<tokenised>true</tokenised>
</index>
</property>
</properties>
</aspect>
</aspects>
<config>
<client>
<simple-search-additional-attributes>
<qname>{http://www.myapp.com/model/content/1.0}mytypeproperty</qname>
<qname>{http://www.myapp.com/model/content/1.0}myaspectproperty</qname>
<qname>{http://www.alfresco.org/model/content/1.0}description</qname>
<qname>{http://www.alfresco.org/model/content/1.0}title</qname>
<qname>{http://www.alfresco.org/model/content/1.0}author</qname>
</simple-search-additional-attributes>
</client>
</config>
03-05-2010 01:33 PM
{mycustommodel.model}mycustomfield
05-18-2010 05:38 AM
http://blogs.alfresco.com/wp/wabson/2010/02/25/adding-custom-aspect-support-in-alfresco-share/
and now i want to be able to see the results of my custom properties on search, i use 3.3G but any direction would be excellent.05-19-2010 06:38 AM
http://blogs.alfresco.com/wp/wabson/2010/02/25/adding-custom-aspect-support-in-alfresco-share/#comme...
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Registration of new models –>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/kb-model.xml</value>
</list>
</property>
</bean>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<!– The important part here is the name - Note: the use of the my: namespace
which is defined further on in the document –>
<model name="kb:knowledgebase" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Knowledge Base Model</description>
<author>Sarris Kyriakos</author>
<version>1.0</version>
<!– Imports are required to allow references to definitions in other models –>
<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 my.new.model should be changed to reflect your own namespace –>
<namespaces>
<namespace uri="http://www.alfresco.com/model/knowledgebase/1.0" prefix="kb"/>
</namespaces>
<aspects>
<!– Definition of new Content Aspect: Knowledge Base Document –>
<aspect name="kb:referencable">
<title>Knowledge Base Referencable</title>
<properties>
<property name="kb:documentRef">
<type>d:text</type>
<mandatory>true</mandatory>
<index enabled="true">
<atomic>false</atomic>
<stored>true</stored>
<tokenised>false</tokenised>
</index>
</property>
</properties>
</aspect>
</aspects>
</model>
<alfresco-config>
<!– Document Library config section –>
<config evaluator="string-compare" condition="DocumentLibrary">
<!–
Used by the "Manage Aspects" action
For custom aspects, remember to also add the relevant i18n string(s)
cm_myaspect=My Aspect
–>
<aspects>
<!– Aspects that a user can see –>
<visible>
<aspect name="cm:generalclassifiable" />
<aspect name="cm:complianceable" />
<aspect name="cm:dublincore" />
<aspect name="cm:effectivity" />
<aspect name="cm:summarizable" />
<aspect name="cm:versionable" />
<aspect name="cm:templatable" />
<aspect name="cm:emailed" />
<aspect name="emailserver:aliasable" />
<aspect name="cm:taggable" />
<aspect name="app:inlineeditable" />
<aspect name="kb:referencable" />
</visible>
<!– Aspects that a user can add. Same as "visible" if left empty –>
<addable>
</addable>
<!– Aspects that a user can remove. Same as "visible" if left empty –>
<removeable>
</removeable>
</aspects>
</config>
<!– cm:content type (existing nodes) –>
<config evaluator="node-type" condition="cm:content">
<forms>
<!– Default form configuration used on the document details and edit metadata pages –>
<form>
<field-visibility>
<show id="kb:documentRef" />
</field-visibility>
<appearance>
<field id="kb:documentRef" label-id="label.kb_documentRef" />
</appearance>
</form>
<!– Document Library pop-up Edit Metadata form –>
<form id="doclib-simple-metadata">
<field-visibility>
<show id="kb:documentRef" />
</field-visibility>
<edit-form template="../documentlibrary/forms/doclib-simple-metadata.ftl" />
<appearance>
<field id="kb:documentRef" label-id="label.kb_documentRef" />
</appearance>
</form>
<!– Document Library Inline Edit form –>
<form id="doclib-inline-edit">
<field-visibility>
<show id="kb:documentRef" />
</field-visibility>
<appearance>
<field id="kb:documentRef" label-id="label.kb_documentRef" />
</appearance>
</form>
</forms>
</config>
<config>
<simple-search-additional-attributes>
<qname>{http://www.alfresco.com/model/knowledgebase/1.0}documentRef</qname>
</simple-search-additional-attributes>
</config>
</alfresco-config>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Override WebScript Messages - add slingshot application messages –>
<bean id="webscripts.resources" class="org.springframework.extensions.surf.util.ResourceBundleBootstrapComponent">
<property name="resourceBundles">
<list>
<value>webscripts.messages.webscripts</value>
<value>alfresco.messages.common</value>
<value>alfresco.messages.slingshot</value>
<value>alfresco.web-extension.messages.knowledgebase</value>
</list>
</property>
</bean>
</beans>
# Custom knowledge base messages
label.kb_documentRef=KB Reference
kb_referencable=Knowledge Base Referencable
09-13-2010 10:55 AM
09-17-2010 10:46 AM
<?xml version="1.0" encoding="UTF-8"?>
<!– Definition of new Model –>
<model name="facture:facturemodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!– Optional meta-data about the model –>
<description>Modele de documents facture</description>
<author>YL</author>
<version>1.0</version>
<!– Imports are required to allow references to definitions in other models –>
<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 my.new.model should be changed to reflect your own namespace –>
<namespaces>
<namespace uri="facture.model" prefix="facture"/>
</namespaces>
<types>
<!– Definition of new Content Type: Documents Facture Type 1 –>
<type name="facture:TypeFacture">
<title>Facture</title>
<parent>cm:content</parent>
<properties>
<property name="facture:Societe">
<type>d:text</type>
</property>
<property name="facture:NumFacture">
<title>Numero de facture</title>
<type>d:text</type>
</property>
<property name="facture:TypeDeFacture">
<title>Type de facture</title>
<type>d:text</type>
</property>
<property name="facture:DateFacture">
<title>Date de facture</title>
<type>d:text</type>
</property>
<property name="facture:NumFolio">
<title>Numero de folio</title>
<type>d:text</type>
</property>
<property name="facture:NumSiren">
<title>Numero de siren</title>
<type>d:text</type>
</property>
<property name="facture:NumTVA">
<title>Numero de TVA</title>
<type>d:text</type>
</property>
<property name="facture:NumCommande">
<title>Numero de commande</title>
<type>d:text</type>
</property>
<property name="facture:MontantTTC">
<title>Montant TTC</title>
<type>d:text</type>
</property>
<property name="facture:DateCreation">
<title>Date de creation</title>
<type>d:text</type>
</property>
<property name="facture:NomFournisseur">
<title>Nom fournisseur</title>
<type>d:text</type>
</property>
</properties>
</type>
</types>
</model>
<alfresco-config>
<!– Example of overriding the from email address –>
<!–
<config>
<client>
<from-email-address>someone@your-domain.com</from-email-address>
<search-max-results>100</search-max-results>
</client>
</config>
–>
<!– Example of adding languages to the list in the login page –>
<config evaluator="string-compare" condition="Languages">
<languages>
<language locale="fr_FR">French</language>
</languages>
</config>
<config>
<client>
<simple-search-additional-attributes>
<qname>
{facture.model}Societe
</qname>
<qname>
{facture.model}NumFacture
</qname>
<qname>
{facture.model}TypeDeFacture
</qname>
<qname>
{facture.model}DateFacture
</qname>
<qname>
{facture.model}NumFolio
</qname>
<qname>
{facture.model}NumSiren
</qname>
<qname>
{facture.model}NumTVA
</qname>
<qname>
{facture.model}NumCommande
</qname>
<qname>
{facture.model}MontantTTC
</qname>
<qname>
{facture.model}DateCreation
</qname>
<qname>
{facture.model}NomFournisseur
</qname>
</simple-search-additional-attributes>
</client>
</config>
<!– Configuration de l interface entree doc –>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="rh:TypeRH" />
<type name="societe:TypeSociete" />
<type name="facture:TypeFacture" />
</content-types>
</config>
<!– On rend visible les proprietes –>
<config evaluator="node-type" condition="rh:TypeRH">
<property-sheet>
<show-property name="rh:Dkey" />
<show-property name="rh:Periode" />
<show-property name="rh:Matricule" />
<show-property name="rh:Societe" />
<show-property name="rh:Etablissement" />
<show-property name="rh:Uo" />
<show-property name="rh:Typedoc" />
<show-property name="rh:Id_lot" />
<show-property name="rh:Credate" />
<show-property name="rh:Enregactif" />
</property-sheet>
</config>
<config evaluator="node-type" condition="societe:TypeSociete">
<property-sheet>
<show-property name="societe:Dkey" />
<show-property name="societe:Periode" />
<show-property name="societe:Societe" />
<show-property name="societe:Typedoc" />
<show-property name="societe:Id_lot" />
<show-property name="societe:Credate" />
<show-property name="societe:Enregactif" />
</property-sheet>
</config>
<config evaluator="node-type" condition="facture:TypeFacture">
<property-sheet>
<show-property name="facture:Societe" />
<show-property name="facture:NumFacture" />
<show-property name="facture:TypeFacture" />
<show-property name="facture:DateFacture" />
<show-property name="facture:NumFolio" />
<show-property name="facture:NumSiren" />
<show-property name="facture:NumTVA" />
<show-property name="facture:NumCommande" />
<show-property name="facture:MontantTTC" />
<show-property name="facture:DateCreation" />
<show-property name="facture:NomFournisseur" />
</property-sheet>
</config>
<!– Rends actif les type dans le wizard "specialise le type –>
<config evaluator="string-compare" condition="Action Wizards">
<specialise-types>
<type name="rh:TypeRH"/>
<type name="societe:TypeSociete"/>
<type name="facture:TypeFacture" />
</specialise-types>
</config>
<!– Example of configuring advanced search –>
<config evaluator="string-compare" condition="Advanced Search" replace="true">
<advanced-search>
<content-types>
<type name="rh:TypeRH"/>
<type name="societe:TypeSociete"/>
<type name="facture:TypeFacture" />
</content-types>
<custom-properties>
<meta-data type="facture:TypeFacture" property="facture:Societe"/>
<meta-data type="facture:TypeFacture" property="facture:NumFacture"/>
<meta-data type="facture:TypeFacture" property="facture:TypeFacture"/>
<meta-data type="facture:TypeFacture" property="facture:DateFacture"/>
<meta-data type="facture:TypeFacture" property="facture:NumFolio"/>
<meta-data type="facture:TypeFacture" property="facture:NumSiren"/>
<meta-data type="facture:TypeFacture" property="facture:NumTVA"/>
<meta-data type="facture:TypeFacture" property="facture:NumCommande"/>
<meta-data type="facture:TypeFacture" property="facture:MontantTTC"/>
<meta-data type="facture:TypeFacture" property="facture:DateCreation"/>
<meta-data type="facture:TypeFacture" property="facture:NomFournisseur"/>
<!–
<meta-data type="rh:TypeRH" property="rh:Dkey"/>
<meta-data type="rh:TypeRH" property="rh:Periode" />
<meta-data type="rh:TypeRH" property="rh:Matricule" />
<meta-data type="rh:TypeRH" property="rh:Societe" />
<meta-data type="rh:TypeRH" property="rh:Etablissement" />
<meta-data type="rh:TypeRH" property="rh:Uo" />
<meta-data type="rh:TypeRH" property="rh:Typedoc" />
<meta-data type="rh:TypeRH" property="rh:Id_lot" />
<meta-data type="rh:TypeRH" property="rh:Credate" />
<meta-data type="rh:TypeRH" property="rh:Enregactif" />
–>
</custom-properties>
</advanced-search>
</config>
<!– Example of configuring advanced search –>
<!–
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
</content-types>
<custom-properties>
<meta-data aspect="app:simpleworkflow" property="app:approveStep" />
</custom-properties>
</advanced-search>
</config>
–>
<!– Example of changing the sort direction for a view in the client –>
<!–
<config evaluator="string-compare" condition="Views">
<views>
<view-defaults>
<topic>
<sort-direction>ascending</sort-direction>
</topic>
</view-defaults>
</views>
</config>
–>
<!– Example of adding a custom icon to the Create Space dialog –>
<!–
<config evaluator="string-compare" condition="cm:folder icons">
<icons>
<icon name="space-icon-custom" path="/images/icons/space-icon-custom.gif" />
</icons>
</config>
–>
<!– The config below shows how to incorporate the example model–>
<!– into the web client, for this to work you will need to –>
<!– rename example-model-context.xml.sample to example-model-context.xml –>
<!–
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="my:sop" />
</content-types>
</config>
<config evaluator="node-type" condition="my:sop">
<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.ByteSizeConverter"
show-in-edit-mode="false" />
<show-property name="my:publishedDate" />
<show-association name="my:signOff" />
<show-property name="my:authorisedBy" />
<show-child-association name="my:processSteps" />
</property-sheet>
</config>
<config evaluator="aspect-name" condition="my:imageClassification">
<property-sheet>
<show-property name="my:width"/>
<show-property name="my:height"/>
<show-property name="my:resolution"/>
</property-sheet>
</config>
<config evaluator="aspect-name" condition="cm:storeSelector">
<property-sheet>
<show-property name="cm:storeName" />
</property-sheet>
</config>
<config evaluator="string-compare" condition="Action Wizards">
<aspects>
<aspect name="cm:storeSelector"/>
</aspects>
</config>
<config evaluator="string-compare" condition="Action Wizards">
<aspects>
<aspect name="my:imageClassification"/>
</aspects>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="my:sop" />
</content-types>
<custom-properties>
<meta-data type="my:sop" property="my:authorisedBy" />
<meta-data aspect="my:imageClassification" property="my:resolution" />
</custom-properties>
</advanced-search>
</config>
–>
</alfresco-config>
03-28-2011 06:22 PM
10-09-2012 08:06 PM
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.