10-26-2017 01:21 AM
I have created a content model with two main types named as my:salesCustomerCare and my:maintainence. After build a project i can able to see only types of my:salesCustomerCare and types of my:maintainence is not coming. But when i check alfresco api - http://localhost:8080/alfresco/s/api/classes?nsp=my its coming in the json, only not displaying in the share page. Can anyone tell me the reason for why its not displaying in the share page?
content-model.xml :
<?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="my:contentModel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<!-- Optional meta-data about the model -->
<description>Requirement Custom Model</description>
<author>Yuvaraj</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.mycompany.com/model/content/1.0" prefix="my"/>
</namespaces>
<types>
<type name="my:salesCustomerCare">
<title>Sales and Customer care</title>
<parent>cm:content</parent>
</type>
<type name="my:contractCopies">
<title>Contract Copies</title>
<parent>my:salesCustomerCare</parent>
<properties>
<property name="my:contractTypeOnCC">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="my:contractNumberOnCC">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="my:clientNameOnCC">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="my:contractStartOnCC">
<type>d:datetime</type>
<mandatory>false</mandatory>
</property>
<property name="my:contractEndOnCC">
<type>d:datetime</type>
<mandatory>false</mandatory>
</property>
</properties>
</type>
<type name="my:wrcTenancyCertificate">
<title>WRC Tenancy Certificate</title>
<parent>my:salesCustomerCare</parent>
<properties>
<property name="my:dateOfApplication">
<type>d:date</type>
<mandatory>false</mandatory>
</property>
<property name="my:referenceNumber">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="my:leaseIssueDate">
<type>d:date</type>
<mandatory>false</mandatory>
</property>
<property name="my:leaseExpiryDate">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:contractNumberForTenancyCert">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="my:tenantName">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="my:tenantCompany">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="my:maintainence">
<title>Maintainence</title>
<parent>cm:content</parent>
</type>
<type name="my:manualAttendanceCivil">
<title>Manual Attendance Civil</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:dateCivil">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:companyNameCivil">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="my:manualAttendanceCommercial">
<title>Manual Attendance For Commercial</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:dateCommercial">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:companyNameCommercial">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="my:workersVillage">
<title>Workers Village</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:dateForWV">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:companyNameForWV">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="my:rmsFormat">
<title>RMS Format</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:rmsDate">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:zone">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="my:companyNameForRms">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
</properties>
</type>
<type name="my:maintainenceClearanceReport">
<title>Maintainence Clearance Report</title>
<parent>my:maintainence</parent>
<properties>
<property name="my:companyNameForMCR">
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="my:dateForMCR">
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="my:contractNumberForMCR">
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
</type>
</types>
</model>
10-27-2017 01:57 AM
You need to configure Share to actually provide your custom types in the "Set/Specialise Type" action. You can do this in the share-config-custom.xml file via the DocumentLibrary config section.
10-29-2017 12:23 AM
I have added the custom types already in the share-config-custom.xml file. but, the thing which i don't know is, i follow this sample documentation example
<types>
<type name="cm:content">
<subtype name="sc:doc" />
<subtype name="sc:whitepaper" />
</type>
<type name="sc:doc">
<subtype name="sc:whitepaper" />
</type>
</types>
but the only the cm:content main type and its sub type only showing,the sc:doc type and its sub type sc:whitepaper is not showing in the drop down.
this is my share-config-custom file,in this only cm:content type and its sub type only showing other two are not displaying, can anyone explain how its working and how can i declare my different kinds of types?
<!-- Document Library config section -->
<config evaluator="string-compare" condition="DocumentLibrary" replace="true">
<tree>
<evaluate-child-folders>false</evaluate-child-folders>
<maximum-folder-count>1000</maximum-folder-count>
<timeout>7000</timeout>
</tree>
<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="cm:geographic" />
<aspect name="exif:exif" />
<aspect name="audio:audio" />
<aspect name="cm:indexControl" />
<aspect name="dp:restrictable" />
<aspect name="smf:customConfigSmartFolder" />
<aspect name="smf:systemConfigSmartFolder" />
</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>
<types>
<type name="cm:content">
<subtype name="my:sop"></subtype>
<subtype name="my:salesCustomerCare"></subtype>
<subtype name="my:contractCopies"></subtype>
<subtype name="my:wrcTenancyCertificate"></subtype>
<subtype name="my:tradeLicense"></subtype>
<subtype name="myowerOfAttorney"></subtype>
<subtype name="myassportCopies"></subtype>
<subtype name="my:EmiratesID"></subtype>
<subtype name="my:specimenSignature"></subtype>
<subtype name="my:authorizations"></subtype>
<subtype name="my:undertakingLetter"></subtype>
<subtype name="my:chequeCopies"></subtype>
<subtype name="myaymentReceipts"></subtype>
<subtype name="my:emailCorrespondence"></subtype>
<subtype name="my:clientLettersOnEmail"></subtype>
<subtype name="my:wrcModificationForm"></subtype>
<subtype name="my:zonescorpNOC"></subtype>
<subtype name="my:ccrCopies"></subtype>
<subtype name="my:guaranteeLetters"></subtype>
<subtype name="my:notificationLetters"></subtype>
<subtype name="my:clearance"></subtype>
<subtype name="my:incidentReport"></subtype>
<subtype name="my:quotationConfirmation"></subtype>
<subtype name="my:manualAttendanceCivil"></subtype>
<subtype name="my:manualAttendanceCommercial"></subtype>
<subtype name="my:workersVillage"></subtype>
<subtype name="my:rmsFormat"></subtype>
<subtype name="my:maintainenceClearanceReport"></subtype>
</type>
<type name="my:salesCustomerCare">
<subtype name="my:contractCopies"></subtype>
<subtype name="my:wrcTenancyCertificate"></subtype>
<subtype name="my:tradeLicense"></subtype>
<subtype name="myowerOfAttorney"></subtype>
<subtype name="myassportCopies"></subtype>
<subtype name="my:EmiratesID"></subtype>
<subtype name="my:specimenSignature"></subtype>
<subtype name="my:authorizations"></subtype>
<subtype name="my:undertakingLetter"></subtype>
<subtype name="my:chequeCopies"></subtype>
<subtype name="myaymentReceipts"></subtype>
<subtype name="my:emailCorrespondence"></subtype>
<subtype name="my:clientLettersOnEmail"></subtype>
<subtype name="my:wrcModificationForm"></subtype>
<subtype name="my:zonescorpNOC"></subtype>
<subtype name="my:ccrCopies"></subtype>
<subtype name="my:guaranteeLetters"></subtype>
<subtype name="my:notificationLetters"></subtype>
<subtype name="my:clearance"></subtype>
<subtype name="my:incidentReport"></subtype>
<subtype name="my:quotationConfirmation"></subtype>
</type>
<type name="my:maintainence">
<subtype name="my:manualAttendanceCivil"></subtype>
<subtype name="my:manualAttendanceCommercial"></subtype>
<subtype name="my:workersVillage"></subtype>
<subtype name="my:rmsFormat"></subtype>
<subtype name="my:maintainenceClearanceReport"></subtype>
</type>
</types>
<!--
If set, will present a WebDAV link for the current item on the Document and Folder details pages.
Also used to generate the "View in Alfresco Explorer" action for folders.
-->
<repository-url>http://localhost:8080/alfresco</repository-url>
<!--
Google Docs™ integration
-->
<google-docs>
<!--
Enable/disable the Google Docs UI integration (Extra types on Create Content menu, Google Docs actions).
-->
<enabled>false</enabled>
<!--
The mimetypes of documents Google Docs allows you to create via the Share interface.
The I18N label is created from the "type" attribute, e.g. google-docs.doc=Google Docs™ Document
-->
<creatable-types>
<creatable type="doc">application/vnd.openxmlformats-officedocument.wordprocessingml.document</creatable>
<creatable type="xls">application/vnd.openxmlformats-officedocument.spreadsheetml.sheet</creatable>
<creatable type="ppt">application/vnd.ms-powerpoint</creatable>
</creatable-types>
</google-docs>
<!--
File upload configuration
-->
<file-upload>
<!--
Adobe Flash™
In certain environments, an HTTP request originating from Flash cannot be authenticated using an existing session.
See: http://bugs.adobe.com/jira/browse/FP-4830
For these cases, it is useful to disable the Flash-based uploader for Share Document Libraries.
-->
<adobe-flash-enabled>true</adobe-flash-enabled>
</file-upload>
</config>
Explore our Alfresco products with the links below. Use labels to filter content by product module.