<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="reg:regasoc" />
</content-types>
</config>
<config evaluator="string-compare" condition="Action Wizards">
<subtypes>
<type name="reg:regasoc"/>
</subtypes>
<aspects>
<aspect name="reg:aspectregasoc"/>
</aspects>
</config>
<config evaluator="aspect-name" condition="reg:aspectregasoc">
<property-sheet>
<show-property name="reg:nregistro"/>
<show-property name="reg:nombre"/>
<show-property name="reg:nexpediente"/>
<show-property name="reg:seccion"/>
</property-sheet>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="reg:regasoc" />
</content-types>
<custom-properties>
<meta-data type="reg:regasoc" property="reg:nregistro" />
<meta-data type="reg:regasoc" property="reg:nombre" />
<meta-data type="reg:regasoc" property="reg:nexpediente" />
<meta-data type="reg:regasoc" property="reg:seccion" />
</custom-properties>
</advanced-search>
</config>
NamedValue[] contentProps = new NamedValue[1];
contentProps[0] = Utils.createNamedValue(Constants.PROP_NAME, name);
String aspectString = Constants.createQNameString("modelo.regasoc", "aspectRegasoc");
NamedValue[] titledProps = new NamedValue[7];
titledProps[0] = Utils.createNamedValue(Constants.PROP_TITLE, name);
titledProps[1] = Utils.createNamedValue(Constants.PROP_DESCRIPTION, "desc");
titledProps[2] = Utils.createNamedValue(createQNameString("modelo.regasoc", "nregistro"), "registo");
titledProps[3] = Utils.createNamedValue(createQNameString("modelo.regasoc", "nombre"), "nombre");
titledProps[4] = Utils.createNamedValue(createQNameString("modelo.regasoc", "nexpediente"), "nexpediente");
titledProps[5] = Utils.createNamedValue(createQNameString("modelo.regasoc", "seccion"), "seccion");
titledProps[6] = Utils.createNamedValue(createQNameString("modelo.regasoc", "nregistro"), 0);
CMLAddAspect addAspect = new CMLAddAspect(aspectString, propsAspect, null, "1");
CMLCreate create = new CMLCreate("1", companyHomeParent, companyHomeParent.getUuid(), Constants.ASSOC_CONTAINS, null, Constants.PROP_CONTENT, contentProps);
cml = new CML();
cml.setCreate(new CMLCreate[] {create});
cml.setAddAspect(new CMLAddAspect[] {addAspect});
AuthenticationUtils.startSession("admin", "admin");
Store store = new Store(Constants.WORKSPACE_STORE, "SpacesStore");
String tipo = "http://www.alfresco.org/model/content/1.0";
String carpeta = "esp";
String id_tipo = "cm:";
String dir = "/app:company_home/app:guest_home/"+ id_tipo + carpeta;
RepositoryServiceSoapBindingStub repositoryService =WebServiceFactory.getRepositoryService();
ContentServiceSoapBindingStub contentService =WebServiceFactory.getContentService();
ParentReference companyHomeParent = new ParentReference(store, null, dir, Constants.ASSOC_CONTAINS,
Constants.createQNameString(tipo, carpeta));
NamedValue[] contentProps = new NamedValue[1];
contentProps[0] = Utils.createNamedValue(Constants.PROP_NAME, "NOMBRE");
String aspectString = Constants.createQNameString("modelo.regasoc", "aspectRegasoc");
NamedValue[] titledProps = new NamedValue[7];
titledProps[0] = Utils.createNamedValue(Constants.PROP_TITLE, "NOMBRE");
titledProps[1] = Utils.createNamedValue(Constants.PROP_DESCRIPTION, "desc");
titledProps[2] = Utils.createNamedValue(Constants.createQNameString("modelo.regasoc", "nregistro"), "registo");
titledProps[3] = Utils.createNamedValue(Constants.createQNameString("modelo.regasoc", "nombre"), "nombre");
titledProps[4] = Utils.createNamedValue(Constants.createQNameString("modelo.regasoc", "nexpediente"), "nexpediente");
titledProps[5] = Utils.createNamedValue(Constants.createQNameString("modelo.regasoc", "seccion"), "seccion");
titledProps[6] = Utils.createNamedValue(Constants.createQNameString("modelo.regasoc", "nregistro"), "0");
CMLAddAspect addAspect = new CMLAddAspect(aspectString, titledProps, null, "1");
CML cml = new CML();
companyHomeParent.setChildName(id_tipo + "NOMBRE");
CMLCreate create = new CMLCreate("1", companyHomeParent, companyHomeParent.getUuid(), Constants.ASSOC_CONTAINS, null, Constants.PROP_CONTENT, contentProps);
cml = new CML();
cml.setCreate(new CMLCreate[] {create});
cml.setAddAspect(new CMLAddAspect[] {addAspect});
UpdateResult[] result;
result = repositoryService.update(cml);
Reference content = result[0].getDestination();
// Write some content
String temporal = "helloworld";
byte[] bytes = temporal.getBytes();
ContentFormat format = new ContentFormat("text/plain", "UTF-8");
// Write the content
contentService.write(content, Constants.PROP_CONTENT, bytes, format);
} catch (RepositoryFault e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
<aspects>
<!– Aspect para el tipo folderEspecialidad–>
<aspect name="reg:aspectRegasoc">
<title>Regasoc</title>
<properties>
<property name="reg:nregistro">
<title>Numero Registro</title>
<type>d:text</type>
</property>
<property name="reg:nombre">
<title>Nombre</title>
<type>d:text</type>
</property>
<property name="reg:nexpediente">
<title>Numero Expediente</title>
<type>d:text</type>
</property>
<property name="reg:seccion">
<title>Seccion</title>
<type>d:text</type>
</property>
</properties>
</aspect>
<?xml version='1.0' encoding='UTF-8'?>
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
<beans>
<!– Registro de nuevos modelos –>
<bean id="extension.dictionaryBootstrap" parent="dictionaryModelBootstrap" depends-on="dictionaryBootstrap">
<property name="models">
<list>
<value>alfresco/extension/RegAsocModel.xml</value>
</list>
</property>
</bean>
</beans>
<?xml version="1.0" encoding="UTF-8"?>
<model name="reg:regasocmodel" xmlns="http://www.alfresco.org/model/dictionary/1.0">
<description>Custom Model para Registro de Asociaciones</description>
<author>Pablo</author>
<version>1.0</version>
<imports>
<import uri="http://www.alfresco.org/model/dictionary/1.0" prefix="d"/>
<import uri="http://www.alfresco.org/model/content/1.0" prefix="cm"/>
</imports>
<namespaces>
<namespace uri="modelo.regasoc" prefix="reg"/>
</namespaces>
<types>
<type name="reg:regasoc">
<title>Registro de Asociaciones</title>
<parent>cm:content</parent>
<mandatory-aspects>
<aspect>reg:aspectRegasoc</aspect>
</mandatory-aspects>
<properties>
<property name="reg:nregistro">
<title>Numero Registro</title>
<type>d:text</type>
</property>
<property name="reg:nombre">
<title>Nombre</title>
<type>d:text</type>
</property>
<property name="reg:nexpediente">
<title>Numero Expediente</title>
<type>d:text</type>
</property>
<property name="reg:seccion">
<title>Seccion</title>
<type>d:int</type>
</property>
</properties>
</type>
</types>
<aspects>
<!– Aspect para el tipo folderEspecialidad–>
<aspect name="reg:aspectRegasoc">
<title>regasoc</title>
<properties>
<property name="reg:nregistro">
<title>Numero Registro</title>
<type>d:text</type>
</property>
<property name="reg:nombre">
<title>Nombre</title>
<type>d:text</type>
</property>
<property name="reg:nexpediente">
<title>Numero Expediente</title>
<type>d:text</type>
</property>
<property name="reg:seccion">
<title>Seccion</title>
<type>d:text</type>
</property>
</properties>
</aspect>
</aspects>
</model>
<config evaluator="string-compare" condition="Content Wizards">
<content-types>
<type name="reg:regasoc" />
</content-types>
</config>
<!–<config evaluator="string-compare" condition="Action Wizards">
<aspects>
<aspect name="reg:aspectRegasoc"/>
</aspects>
</config>–>
<config evaluator="string-compare" condition="Action Wizards">
<subtypes>
<type name="reg:regasoc"/>
</subtypes>
<aspects>
<aspect name="reg:aspectRegasoc"/>
</aspects>
</config>
<config evaluator="aspect-name" condition="reg:aspectRegasoc">
<property-sheet>
<show-property name="reg:nregistro"/>
<show-property name="reg:nombre"/>
<show-property name="reg:nexpediente"/>
<show-property name="reg:seccion"/>
</property-sheet>
</config>
<config evaluator="node-type" condition="reg:regasoc">
<property-sheet>
<show-property name="reg:nregistro"/>
<show-property name="reg:nombre"/>
<show-property name="reg:nexpediente"/>
<show-property name="reg:seccion"/>
</property-sheet>
</config>
<config evaluator="string-compare" condition="Advanced Search">
<advanced-search>
<content-types>
<type name="reg:regasoc" />
</content-types>
<custom-properties>
<meta-data type="reg:regasoc" property="reg:nregistro" />
<meta-data type="reg:regasoc" property="reg:nombre" />
<meta-data type="reg:regasoc" property="reg:nexpediente" />
<meta-data type="reg:regasoc" property="reg:seccion" />
</custom-properties>
</advanced-search>
</config>
Content from pre 2016 and from language groups that have been closed.
Content is read-only.
By using this site, you are agreeing to allow us to collect and use cookies as outlined in Alfresco’s Cookie Statement and Terms of Use (and you have a legitimate interest in Alfresco and our products, authorizing us to contact you in such methods). If you are not ok with these terms, please do not use this website.