07-01-2014 06:52 AM
private void addTypeContract(NodeRef nodeRef) {
if((nodeRef != null) && this.getServiceRegistry().getNodeService().exists(nodeRef)){
// Especializar tipo de documento a factura
// Get the type of the node
QName currentType = this.getServiceRegistry().getNodeService().getType(nodeRef);
// Ensure that we are performing a specialise
if ((currentType.equals(DigitalizacionModel.Alf_Type_Contratos) == false)
&& this.getServiceRegistry().getDictionaryService().isSubClass(DigitalizacionModel.Alf_Type_Contratos,
currentType) == true) {
// Specialise the type of the node
this.getServiceRegistry().getNodeService().setType(nodeRef, DigitalizacionModel.Alf_Type_Contratos);
logger.info("Ha introducido el tipo de contratos");
}
else {logger.info("No ha entrado en el if de asignacion");}
}
}
<types>
<type name="dig:Contratos">
<title>Contratos</title>
<parent>cm:content</parent>
<properties>
<property name="dig:Nombre">
<title>Nombre del contrato</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="dig:Num">
<title>Número de Contrato</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
<property name="dig:CIF">
<title>CIF Empresa Emisora</title>
<type>d:text</type>
<mandatory>true</mandatory>
</property>
<property name="dig:FechaContrato">
<title>Fecha de realización de las operaciones</title>
<type>d:date</type>
<mandatory>true</mandatory>
</property>
<property name="dig:Descripcion">
<title>Descripción contrato</title>
<type>d:text</type>
<mandatory>false</mandatory>
</property>
</properties>
</type>
</types>
<alfresco-config>
<config evaluator="node-type" condition="dig:Digitalizacion">
<property-sheet>
<show-property name="title" show-in-edit-mode="false" show-in-view-mode="false"/>
<show-property name="description" show-in-edit-mode="true" show-in-view-mode="true"/>
<show-property name="author" show-in-edit-mode="false" show-in-view-mode="false"/>
<show-property name="mimetype" show-in-edit-mode="false" show-in-view-mode="false"/>
<show-property name="size"
display-label-id="size"
converter="org.alfresco.faces.ByteSizeConverter"
show-in-edit-mode="false" />
<separator name="sep0" display-label="Datos generales Contrato" component-generator="HeaderSeparatorGenerator" />
<show-property name="dig:Nombre"/>
<show-property name="dig:Num"/>
<show-property name="dig:CIF"/>
<show-property name="dig:FechaContrato"/>
<show-property name="dig:Descripcion"/>
</property-sheet>
</config>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="dig:Digitalizacion" />
</content-types>
</config>
<config evaluator="string-compare" condition="Action Wizards">
<subtypes>
<type name="dig:Digitalizacion"/>
</subtypes>
</config>
<config evaluator="string-compare" condition="Advanced Search Dig">
<advanced-search>
<content-types>
<type name="dig:Digitalizacion" />
</content-types>
<custom-properties>
<meta-data type="dig:Digitalizacion" property ="dig:Nombre" />
<meta-data type="dig:Digitalizacion" property ="dig:Num" />
<meta-data type="dig:Digitalizacion" property ="dig:FechaContrato"/>
<meta-data type="dig:Digitalizacion" property ="dig:CIF" />
<meta-data type="dig:Digitalizacion" property ="dig:Descripcion" />
</custom-properties>
</advanced-search>
</config>
</alfresco-config>
07-01-2014 09:52 AM
07-09-2014 04:00 AM
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.