SlideShare ist ein Scribd-Unternehmen logo
1 von 25
Downloaden Sie, um offline zu lesen
Alfresco Custom Model

  Università del Salento, 2012


                         Andrea Leo
                         www.alfresco.com
                         www.qbreng.it
Estendere il modello dei contenuti



Alfresco permette di personalizzare e estendere il modello dei contenti per
soddisfare le diverse esigenze dell’Organizzazione



Il Dizionario dei Dati di default è pre-popolato con le definizioni che descrivono
i contenuti con cui è inizialmente popolato il repository (Cartelle, Documenti,
Nomi)



Il Dizionario dei Dati di Alfresco è estendibile, consente all’utente di dichiarare
nuovi Tipi di Dati Personalizzati (Custom Content Type) che soddisfano i
bisogni dell’Organizzazione.
I Blocchi elementari : Tipi e Proprietà


    Tipo: il concetto di tipo è concettualmente simile al concetto di
    Classe dei linguaggi Object Oriented (es. Persona, Content, Folder).
    Il concetto di Tipo è usato per modellare i Business Object che
    hanno proprietà personalizzate.
    I Tipi supportano l'ereditarietà.

    Proprietà: sono metadati che appartengono ad un determinato tipo
    (es. Nome_Persona, Telefono_Persona)

    Tipi di Proprietà: sono i tipi di dato fondamentali. Descrivono i tipi di
    dati del Repository che saranno usati per memorizzare le proprietà
    (es. strings, dates, floats, boolean).

    Vincoli: i Constraints possono opzionalmente essere usati per
    restringere/controllare il valore di alcune proprietà. Ci sono 4 tipi di
    vincoli di default disponibili dalla piattaforma: REGEX (espressioni
    regolari), LIST, MINMAX e LENGTH. Anche i vincoli possono essere
    estesi.
I Blocchi elementari : Aspetti e Associazioni



     Aspetti: permettono di “incollare” delle Proprietà a Tipi di
    contenuto o anche a singole istanze di documenti quando e dove
    abbiamo bisogno.


    Associazioni: una associazione definisce relazioni fra Tipi.

    
        Peer Associations: definisce una relazione “alla Pari” fra due
        oggetti nel repository, in cui nessuno dei due è subordinato
        all’altro.

    
        Child Association: definisce una relazione “Padre-Figlio” fra
        due oggetti, ossia l’oggetto Target (Figlio) dell’associazione
        potrebbe non esistere mentre l’oggetto Source (Padre) esiste
        sicuramente (es. associazione fra il tipo “Folder” e il tipo
        “Content” instaurata nel repository di Alfresco)
Content Model Overview



    A Content Model is a collection of related Content Types and Aspects.


    Each Content Model is described in its own XML file


    It is identified by its defined Namespace and Name.
Built-in Content Model Namespaces



        Out-of-the-box, the Alfresco Repository is primed with several models:

    
            System - describes system-level Repository concepts

    
            Content - describes the Content Domain Model (e.g. Folder, File, etc.)

    
            Application - describes Alfresco Application Model (e.g. Glossary, …)

    
            Dictionary - describes the Dictionary Meta-model


        The above models may be found at:

    
             <tomcat-home>/webapps/alfresco/WEB-INF/classes/alfresco/model/systemModel.xml

    
             <tomcat-home>/webapps/alfresco/WEB-INF/classes/alfresco/model/contentModel.xml

    
             <tomcat-home>/webapps/alfresco/WEB-INF/classes/alfresco/model/applicationModel.xml

    
             <tomcat-home>/webapps/alfresco/WEB-INF/classes/alfresco/model/dictionaryModel.xml
Schema Namespaces


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

 <description>Alfresco Content Model</description>
 <author>Alfresco</author>
 <published>2005-06-03</published>
 <version>1.0</version>

<namespaces>
   <namespace uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
 </namespaces>

<imports>
   <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
</imports>

 ...
Alfresco Namespaces
Content Types


<types>

   <type name="cm:cmobject">

     <title>Object</title>
     <parent>sys:base</parent>

     <properties>
       <property name="cm:name">
         <type>d:text</type>
       </property>
     </properties>

     <mandatory-aspects>
       <aspect>cm:auditable</aspect>
     </mandatory-aspects>

    </type>
    …
</types>
Aspects


<aspects>
   <aspect name="cm:auditable">
     <title>Auditable</title>
     <properties>
       <property name="cm:created">
          <type>d:datetime</type>
       </property>
       <property name="cm:creator">
          <type>d:text</type>
       </property>
       <property name="cm:modified">
          <type>d:datetime</type>
       </property>
       <property name="cm:modifier">
          <type>d:text</type>
       </property>
       <property name="cm:accessed">
          <type>d:datetime</type>
       </property>
     </properties>
   </aspect>
   …
</aspects>
Additional Property Capabilities



<property name="my:property">
     <type>d:text</type>
     <mandatory enforced='true'>true</mandatory>
     <default>my default value</default>
 </property>

….

It's possible to describe how properties are indexed.

<property name="cm:example">
     <type>d:text</type>
     <mandatory>false</mandatory>
     <index enabled="true">
       <atomic>false</atomic>     <!-- index in the background. Default true -->
       <stored>false</stored>    <!-- store the property value in the index.Default false -->
       <tokenised>true</tokenised> <!-- Default true -->
     </index>
</property>
Data Types


The following data types are supported:




                                     5
Child Associations


<type name="cm:folder">
     <title>Folder</title>
     <parent>cm:cmobject</parent>
     <associations>
       <child-association name="cm:contains">
          <source>
            <mandatory>false</mandatory>
            <many>false</many>
          </source>
          <target>
            <class>sys:base</class>
            <mandatory>false</mandatory>
            <many>true</many>
          </target>
          <duplicate>false</duplicate>
          <propagateTimestamps>true</propagateTimestamps>
       </child-association>
     </associations>
   </type>

Note: operations like delete etc will propagate through the children
Peer Associations


     <aspect name="cm:subscribable">
       <associations>
         <association name="cm:subscribedBy">
           <source>
             <mandatory>false</mandatory>
             <many>true</many>
           </source>
           <target>
             <class>cm:person</class>
             <mandatory>false</mandatory>
             <many>true</many>
           </target>
         </association>
       </associations>
     </aspect>


Notes :

    Delete propagation does not take place.


    Alfresco's search languages do not yet support joins across non-child associations.
built-in constraints

...
  <constraints>

      <constraint name="test:regex1" type="REGEX">
        <parameter name="expression"><value>[A-Z]*</value></parameter>
        ...
      </constraint>

      <constraint name="test:regex2" type="REGEX">
        <parameter name="expression"><value>[a-z]*</value></parameter>
          ...
      </constraint>

      <constraint name="test:stringLength1" type="LENGTH">
        <parameter name="minLength"><value>0</value></parameter>
        <parameter name="maxLength"><value>256</value></parameter>
      </constraint>

...
built-in constraints


...

      <constraint name="test:minMax1" type="MINMAX">
        <parameter name="minValue"><value>100</value></parameter>
        <parameter name="maxValue"><value>256</value></parameter>
      </constraint>

      <constraint name="test:list1" type="LIST">
        <parameter name="allowedValues">
          <list>
             <value>ABC</value>
             <value>DEF</value>
          </list>
        </parameter>
        <parameter name="caseSensitive"><value>true</value></parameter>
      </constraint>

  </constraints>
...
built-in constraints

These constraints can be referenced in the property definitions:
     <property name="test:prop1">
        <type>d:text</type>
        <protected>true</protected>
        <default></default>
        <constraints>
          <constraint ref="test:regex1"/>
          <constraint ref="test:stringLength1"/>
        </constraints>
     </property>
Further constraints can be defined inline as well, but are not reusable:
     <property name="test:prop1">
         <type>d:text</type>
         <protected>true</protected>
         <default></default>
         <constraints>
           <constraint ref="test:regex1"/>
           <constraint type="LENGTH">
             <parameter name="minLength"><value>0</value></parameter>
             <parameter name="maxLength"><value>128</value></parameter>
           </constraint>
         </constraints>
     </property>
built-in constraints


The built-in constraints are present in the package
org.alfresco.repo.dictionary.constraint and are:


    REGEX : org.alfresco.repo.dictionary.constraint.RegexConstraint


    LENGTH : org.alfresco.repo.dictionary.constraint.StringLengthConstraint


    MINMAX : org.alfresco.repo.dictionary.constraint.NumericRangeConstraint


    LIST : org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint

The <parameter> definitions correspond directly to setter methods on the classes
Writing Further Constraints



    Implement the org.alfresco.service.cmr.dictionary.Constraint interface


    Extend org.alfresco.repo.dictionary.constraint.AbstractConstraint..



     <constraint name="my:FactorsOf"
           type="com.company.alfresco.constraints.MultiplesOfConstraint">
      <parameter name="multipleOf"><value>10</value></parameter>
     </constraint>
Out-of-the-box Aspects



 Classifiable Aspect: Enable Categorization so that categories can be linked to the
document.


 Dublin Core Aspect: Add Dublin core metadata to the document. Dublin core
metadata includes properties such as Publisher, Contributor, Subject, and Rights.


 Effectivity Aspect: Add effectivity properties called Effective From and Effective
To to the document.


 Emailed Aspect: Add a set of properties called Email Data to the document. This is
useful to capture the email information if the document is an attachment to email.


    Summarizable Aspect: Add a property called Summary to the document.


    Templatable Aspect: Enable template view.


    Geographic Aspect: Add two properties called Latitude and Longitude.


    Versionable Aspect: Enable versioning.
ADAMO
Content Model UML Class Diagram
Dynamic model


Enables dynamic customisation of models without requiring a restart of the server



  deployment/undeployment of custom models (messages)

  deployment/undeployment of custom workflow (process) definitions

  deployment/undeployment of custom web client extensions



  Models in Company Home -> Data Dictionary -> Models (Model Active checkbox)

  Messages in Company Home -> Data Dictionary -> Messages

  Webclient in Company Home -> Data Dictionary -> Web Client Extensions

http://localhost:8080/alfresco/faces/jsp/admin/webclientconfig-console.jsp → reload

NOTES:


    Only incremental updates are supported for an active model.


    If the update attempts to delete a type, aspect, property (etc) then the upload will fail.
Estendere il modello Avanzato


     Il modello dei dati può essere esteso editando 3 file di configurazione
     XML:

           • QBR-Model-content.xml: permette di dichiarare alla
           piattaforma un insieme di modelli di dati personalizzati che
           saranno resi disponibili all’interno di Alfresco

           • QBRModel.xml: permette di implementare il Content Model
           definito, ossia dichiarare alla piattaforma Tipi, Aspetti, e
           Associazioni.

           • Web-client-config-custom.xml: permette di dichiarare il
           modello creato all’interfaccia utente di Alfresco: “Web Client”.




Tomcat: <TOMCAT_HOME>/shared/classes/alfresco/extension
Resources





    http://www.alfresco.com


    http://wiki.alfresco.com/wiki/Category:Content_Modeling


    http://www.qbreng.it


    http://wiki.qbreng.it


    http://sourceforge.net/projects/adamo-project/


    Twitter : andrealeo83

Weitere ähnliche Inhalte

Was ist angesagt?

Databases & Microsoft SQL Server
Databases & Microsoft SQL ServerDatabases & Microsoft SQL Server
Databases & Microsoft SQL Server
Mahmoud Abdallah
 
A Designer's Intro to Oracle JET
A Designer's Intro to Oracle JETA Designer's Intro to Oracle JET
A Designer's Intro to Oracle JET
Lauren Beatty
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Lucidworks
 

Was ist angesagt? (20)

Oracle database 12c_and_DevOps
Oracle database 12c_and_DevOpsOracle database 12c_and_DevOps
Oracle database 12c_and_DevOps
 
REST Enabling Your Oracle Database
REST Enabling Your Oracle DatabaseREST Enabling Your Oracle Database
REST Enabling Your Oracle Database
 
Databases & Microsoft SQL Server
Databases & Microsoft SQL ServerDatabases & Microsoft SQL Server
Databases & Microsoft SQL Server
 
Oracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL ServerOracle SQL Developer Data Modeler - for SQL Server
Oracle SQL Developer Data Modeler - for SQL Server
 
Oracle SQL Developer: 3 Features You're Not Using But Should Be
Oracle SQL Developer: 3 Features You're Not Using But Should BeOracle SQL Developer: 3 Features You're Not Using But Should Be
Oracle SQL Developer: 3 Features You're Not Using But Should Be
 
Oracle REST Data Services Best Practices/ Overview
Oracle REST Data Services Best Practices/ OverviewOracle REST Data Services Best Practices/ Overview
Oracle REST Data Services Best Practices/ Overview
 
Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?Oracle SQL Developer for SQL Server?
Oracle SQL Developer for SQL Server?
 
Turning Relational Database Tables into Hadoop Datasources by Kuassi Mensah
Turning Relational Database Tables into Hadoop Datasources by Kuassi MensahTurning Relational Database Tables into Hadoop Datasources by Kuassi Mensah
Turning Relational Database Tables into Hadoop Datasources by Kuassi Mensah
 
A Designer's Intro to Oracle JET
A Designer's Intro to Oracle JETA Designer's Intro to Oracle JET
A Designer's Intro to Oracle JET
 
Pimping SQL Developer and Data Modeler
Pimping SQL Developer and Data ModelerPimping SQL Developer and Data Modeler
Pimping SQL Developer and Data Modeler
 
Oracle ADF Architecture TV - Design - Service Integration Architectures
Oracle ADF Architecture TV - Design - Service Integration ArchitecturesOracle ADF Architecture TV - Design - Service Integration Architectures
Oracle ADF Architecture TV - Design - Service Integration Architectures
 
Harnessing the Power of Optimizer Hints
Harnessing the Power of Optimizer HintsHarnessing the Power of Optimizer Hints
Harnessing the Power of Optimizer Hints
 
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
Challenges of Simple Documents: When Basic isn't so Basic - Cassandra Targett...
 
Refactoring Fat Models: Trying to be a Software Engineer
Refactoring Fat Models: Trying to be a Software EngineerRefactoring Fat Models: Trying to be a Software Engineer
Refactoring Fat Models: Trying to be a Software Engineer
 
Silicon Valley JUG meetup July 18, 2018
Silicon Valley JUG meetup July 18, 2018Silicon Valley JUG meetup July 18, 2018
Silicon Valley JUG meetup July 18, 2018
 
AMIS Oracle OpenWorld 2013 Review Part 2 - Platform Middleware Publication
AMIS Oracle OpenWorld 2013 Review Part 2 - Platform Middleware PublicationAMIS Oracle OpenWorld 2013 Review Part 2 - Platform Middleware Publication
AMIS Oracle OpenWorld 2013 Review Part 2 - Platform Middleware Publication
 
Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl Change Management for Oracle Database with SQLcl
Change Management for Oracle Database with SQLcl
 
Dimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developerDimensional modeling in oracle sql developer
Dimensional modeling in oracle sql developer
 
Oracle ADF Architecture TV - Design - ADF Service Architectures
Oracle ADF Architecture TV - Design - ADF Service ArchitecturesOracle ADF Architecture TV - Design - ADF Service Architectures
Oracle ADF Architecture TV - Design - ADF Service Architectures
 
What_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12cWhat_to_expect_from_oracle_database_12c
What_to_expect_from_oracle_database_12c
 

Ähnlich wie Alfresco Custom Model

UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File ServerUKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
Marco Gralike
 
RubyOnRails-Cheatsheet-BlaineKendall
RubyOnRails-Cheatsheet-BlaineKendallRubyOnRails-Cheatsheet-BlaineKendall
RubyOnRails-Cheatsheet-BlaineKendall
tutorialsruby
 
RubyOnRails-Cheatsheet-BlaineKendall
RubyOnRails-Cheatsheet-BlaineKendallRubyOnRails-Cheatsheet-BlaineKendall
RubyOnRails-Cheatsheet-BlaineKendall
tutorialsruby
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
Yehuda Katz
 

Ähnlich wie Alfresco Custom Model (20)

Html / CSS Presentation
Html / CSS PresentationHtml / CSS Presentation
Html / CSS Presentation
 
Schemas 2 - Restricting Values
Schemas 2 - Restricting ValuesSchemas 2 - Restricting Values
Schemas 2 - Restricting Values
 
Xsd restrictions, xsl elements, dhtml
Xsd restrictions, xsl elements, dhtmlXsd restrictions, xsl elements, dhtml
Xsd restrictions, xsl elements, dhtml
 
AmazonS3 & Rails
AmazonS3 & RailsAmazonS3 & Rails
AmazonS3 & Rails
 
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File ServerUKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
UKOUG 2011 - Drag, Drop and other Stuff. Using your Database as a File Server
 
RubyOnRails-Cheatsheet-BlaineKendall
RubyOnRails-Cheatsheet-BlaineKendallRubyOnRails-Cheatsheet-BlaineKendall
RubyOnRails-Cheatsheet-BlaineKendall
 
RubyOnRails-Cheatsheet-BlaineKendall
RubyOnRails-Cheatsheet-BlaineKendallRubyOnRails-Cheatsheet-BlaineKendall
RubyOnRails-Cheatsheet-BlaineKendall
 
Elements_Creating_Content_Models.pdf
Elements_Creating_Content_Models.pdfElements_Creating_Content_Models.pdf
Elements_Creating_Content_Models.pdf
 
Template-based Modular Architecture
Template-based Modular ArchitectureTemplate-based Modular Architecture
Template-based Modular Architecture
 
03 namespace
03 namespace03 namespace
03 namespace
 
Jsf
JsfJsf
Jsf
 
HTML Foundations, pt 2
HTML Foundations, pt 2HTML Foundations, pt 2
HTML Foundations, pt 2
 
concept of oops
concept of oopsconcept of oops
concept of oops
 
Actionview
ActionviewActionview
Actionview
 
Java Web Development with Stripes
Java Web Development with StripesJava Web Development with Stripes
Java Web Development with Stripes
 
Rails 3: Dashing to the Finish
Rails 3: Dashing to the FinishRails 3: Dashing to the Finish
Rails 3: Dashing to the Finish
 
Angular JS
Angular JSAngular JS
Angular JS
 
XML_schema_Structure
XML_schema_StructureXML_schema_Structure
XML_schema_Structure
 
Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)Building the basics (WordPress Ottawa 2014)
Building the basics (WordPress Ottawa 2014)
 
Web technologies part-2
Web technologies part-2Web technologies part-2
Web technologies part-2
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Kürzlich hochgeladen (20)

ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu SubbuApidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
Apidays Singapore 2024 - Modernizing Securities Finance by Madhu Subbu
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot ModelNavi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Navi Mumbai Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 

Alfresco Custom Model

  • 1. Alfresco Custom Model Università del Salento, 2012 Andrea Leo www.alfresco.com www.qbreng.it
  • 2. Estendere il modello dei contenuti Alfresco permette di personalizzare e estendere il modello dei contenti per soddisfare le diverse esigenze dell’Organizzazione Il Dizionario dei Dati di default è pre-popolato con le definizioni che descrivono i contenuti con cui è inizialmente popolato il repository (Cartelle, Documenti, Nomi) Il Dizionario dei Dati di Alfresco è estendibile, consente all’utente di dichiarare nuovi Tipi di Dati Personalizzati (Custom Content Type) che soddisfano i bisogni dell’Organizzazione.
  • 3. I Blocchi elementari : Tipi e Proprietà  Tipo: il concetto di tipo è concettualmente simile al concetto di Classe dei linguaggi Object Oriented (es. Persona, Content, Folder). Il concetto di Tipo è usato per modellare i Business Object che hanno proprietà personalizzate. I Tipi supportano l'ereditarietà.  Proprietà: sono metadati che appartengono ad un determinato tipo (es. Nome_Persona, Telefono_Persona)  Tipi di Proprietà: sono i tipi di dato fondamentali. Descrivono i tipi di dati del Repository che saranno usati per memorizzare le proprietà (es. strings, dates, floats, boolean).  Vincoli: i Constraints possono opzionalmente essere usati per restringere/controllare il valore di alcune proprietà. Ci sono 4 tipi di vincoli di default disponibili dalla piattaforma: REGEX (espressioni regolari), LIST, MINMAX e LENGTH. Anche i vincoli possono essere estesi.
  • 4. I Blocchi elementari : Aspetti e Associazioni  Aspetti: permettono di “incollare” delle Proprietà a Tipi di contenuto o anche a singole istanze di documenti quando e dove abbiamo bisogno.  Associazioni: una associazione definisce relazioni fra Tipi.  Peer Associations: definisce una relazione “alla Pari” fra due oggetti nel repository, in cui nessuno dei due è subordinato all’altro.  Child Association: definisce una relazione “Padre-Figlio” fra due oggetti, ossia l’oggetto Target (Figlio) dell’associazione potrebbe non esistere mentre l’oggetto Source (Padre) esiste sicuramente (es. associazione fra il tipo “Folder” e il tipo “Content” instaurata nel repository di Alfresco)
  • 5. Content Model Overview  A Content Model is a collection of related Content Types and Aspects.  Each Content Model is described in its own XML file  It is identified by its defined Namespace and Name.
  • 6. Built-in Content Model Namespaces  Out-of-the-box, the Alfresco Repository is primed with several models:  System - describes system-level Repository concepts  Content - describes the Content Domain Model (e.g. Folder, File, etc.)  Application - describes Alfresco Application Model (e.g. Glossary, …)  Dictionary - describes the Dictionary Meta-model  The above models may be found at:  <tomcat-home>/webapps/alfresco/WEB-INF/classes/alfresco/model/systemModel.xml  <tomcat-home>/webapps/alfresco/WEB-INF/classes/alfresco/model/contentModel.xml  <tomcat-home>/webapps/alfresco/WEB-INF/classes/alfresco/model/applicationModel.xml  <tomcat-home>/webapps/alfresco/WEB-INF/classes/alfresco/model/dictionaryModel.xml
  • 7. Schema Namespaces <model name="cm:contentmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0"> <description>Alfresco Content Model</description> <author>Alfresco</author> <published>2005-06-03</published> <version>1.0</version> <namespaces> <namespace uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/> </namespaces> <imports> <import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/> </imports> ...
  • 9. Content Types <types> <type name="cm:cmobject"> <title>Object</title> <parent>sys:base</parent> <properties> <property name="cm:name"> <type>d:text</type> </property> </properties> <mandatory-aspects> <aspect>cm:auditable</aspect> </mandatory-aspects> </type> … </types>
  • 10. Aspects <aspects> <aspect name="cm:auditable"> <title>Auditable</title> <properties> <property name="cm:created"> <type>d:datetime</type> </property> <property name="cm:creator"> <type>d:text</type> </property> <property name="cm:modified"> <type>d:datetime</type> </property> <property name="cm:modifier"> <type>d:text</type> </property> <property name="cm:accessed"> <type>d:datetime</type> </property> </properties> </aspect> … </aspects>
  • 11. Additional Property Capabilities <property name="my:property"> <type>d:text</type> <mandatory enforced='true'>true</mandatory> <default>my default value</default> </property> …. It's possible to describe how properties are indexed. <property name="cm:example"> <type>d:text</type> <mandatory>false</mandatory> <index enabled="true"> <atomic>false</atomic> <!-- index in the background. Default true --> <stored>false</stored> <!-- store the property value in the index.Default false --> <tokenised>true</tokenised> <!-- Default true --> </index> </property>
  • 12. Data Types The following data types are supported: 5
  • 13. Child Associations <type name="cm:folder"> <title>Folder</title> <parent>cm:cmobject</parent> <associations> <child-association name="cm:contains"> <source> <mandatory>false</mandatory> <many>false</many> </source> <target> <class>sys:base</class> <mandatory>false</mandatory> <many>true</many> </target> <duplicate>false</duplicate> <propagateTimestamps>true</propagateTimestamps> </child-association> </associations> </type> Note: operations like delete etc will propagate through the children
  • 14. Peer Associations <aspect name="cm:subscribable"> <associations> <association name="cm:subscribedBy"> <source> <mandatory>false</mandatory> <many>true</many> </source> <target> <class>cm:person</class> <mandatory>false</mandatory> <many>true</many> </target> </association> </associations> </aspect> Notes :  Delete propagation does not take place.  Alfresco's search languages do not yet support joins across non-child associations.
  • 15. built-in constraints ... <constraints> <constraint name="test:regex1" type="REGEX"> <parameter name="expression"><value>[A-Z]*</value></parameter> ... </constraint> <constraint name="test:regex2" type="REGEX"> <parameter name="expression"><value>[a-z]*</value></parameter> ... </constraint> <constraint name="test:stringLength1" type="LENGTH"> <parameter name="minLength"><value>0</value></parameter> <parameter name="maxLength"><value>256</value></parameter> </constraint> ...
  • 16. built-in constraints ... <constraint name="test:minMax1" type="MINMAX"> <parameter name="minValue"><value>100</value></parameter> <parameter name="maxValue"><value>256</value></parameter> </constraint> <constraint name="test:list1" type="LIST"> <parameter name="allowedValues"> <list> <value>ABC</value> <value>DEF</value> </list> </parameter> <parameter name="caseSensitive"><value>true</value></parameter> </constraint> </constraints> ...
  • 17. built-in constraints These constraints can be referenced in the property definitions: <property name="test:prop1"> <type>d:text</type> <protected>true</protected> <default></default> <constraints> <constraint ref="test:regex1"/> <constraint ref="test:stringLength1"/> </constraints> </property> Further constraints can be defined inline as well, but are not reusable: <property name="test:prop1"> <type>d:text</type> <protected>true</protected> <default></default> <constraints> <constraint ref="test:regex1"/> <constraint type="LENGTH"> <parameter name="minLength"><value>0</value></parameter> <parameter name="maxLength"><value>128</value></parameter> </constraint> </constraints> </property>
  • 18. built-in constraints The built-in constraints are present in the package org.alfresco.repo.dictionary.constraint and are:  REGEX : org.alfresco.repo.dictionary.constraint.RegexConstraint  LENGTH : org.alfresco.repo.dictionary.constraint.StringLengthConstraint  MINMAX : org.alfresco.repo.dictionary.constraint.NumericRangeConstraint  LIST : org.alfresco.repo.dictionary.constraint.ListOfValuesConstraint The <parameter> definitions correspond directly to setter methods on the classes
  • 19. Writing Further Constraints  Implement the org.alfresco.service.cmr.dictionary.Constraint interface  Extend org.alfresco.repo.dictionary.constraint.AbstractConstraint.. <constraint name="my:FactorsOf" type="com.company.alfresco.constraints.MultiplesOfConstraint"> <parameter name="multipleOf"><value>10</value></parameter> </constraint>
  • 20. Out-of-the-box Aspects  Classifiable Aspect: Enable Categorization so that categories can be linked to the document.  Dublin Core Aspect: Add Dublin core metadata to the document. Dublin core metadata includes properties such as Publisher, Contributor, Subject, and Rights.  Effectivity Aspect: Add effectivity properties called Effective From and Effective To to the document.  Emailed Aspect: Add a set of properties called Email Data to the document. This is useful to capture the email information if the document is an attachment to email.  Summarizable Aspect: Add a property called Summary to the document.  Templatable Aspect: Enable template view.  Geographic Aspect: Add two properties called Latitude and Longitude.  Versionable Aspect: Enable versioning.
  • 21. ADAMO
  • 22. Content Model UML Class Diagram
  • 23. Dynamic model Enables dynamic customisation of models without requiring a restart of the server  deployment/undeployment of custom models (messages)  deployment/undeployment of custom workflow (process) definitions  deployment/undeployment of custom web client extensions  Models in Company Home -> Data Dictionary -> Models (Model Active checkbox)  Messages in Company Home -> Data Dictionary -> Messages  Webclient in Company Home -> Data Dictionary -> Web Client Extensions http://localhost:8080/alfresco/faces/jsp/admin/webclientconfig-console.jsp → reload NOTES:  Only incremental updates are supported for an active model.  If the update attempts to delete a type, aspect, property (etc) then the upload will fail.
  • 24. Estendere il modello Avanzato Il modello dei dati può essere esteso editando 3 file di configurazione XML: • QBR-Model-content.xml: permette di dichiarare alla piattaforma un insieme di modelli di dati personalizzati che saranno resi disponibili all’interno di Alfresco • QBRModel.xml: permette di implementare il Content Model definito, ossia dichiarare alla piattaforma Tipi, Aspetti, e Associazioni. • Web-client-config-custom.xml: permette di dichiarare il modello creato all’interfaccia utente di Alfresco: “Web Client”. Tomcat: <TOMCAT_HOME>/shared/classes/alfresco/extension
  • 25. Resources  http://www.alfresco.com  http://wiki.alfresco.com/wiki/Category:Content_Modeling  http://www.qbreng.it  http://wiki.qbreng.it  http://sourceforge.net/projects/adamo-project/  Twitter : andrealeo83