<property name="cm:description">
<title>Description</title>
<type>d:mltext</type>
<index enabled="true">
<atomic>true</atomic>
<stored>false</stored>
<tokenised>both</tokenised>
</index>
</property>
<show-property name="miModelo:nombre" component-generator="TextAreaGenerator"/>
<managed-bean>
<managed-bean-name>TextAreaGenerator</managed-bean-name>
<managed-bean-class>org.alfresco.web.bean.generator.TextAreaGenerator</managed-bean-class>
<managed-bean-scope>request</managed-bean-scope>
<managed-property>
<property-name>rows</property-name>
<value>10</value>
</managed-property>
<managed-property>
<property-name>columns</property-name>
<value>75</value>
</managed-property>
</managed-bean>
String aspectString = Constants.createQNameString("modelo.regasoc", "aspectRegasoc"); // Mi tipo de contenido
NamedValue[] titledProps = this.cargaPropiedades(content, nombre);
CMLAddAspect addAspect = new CMLAddAspect();
addAspect.setAspect(aspectString);
addAspect.setWhere(predicate);
addAspect.setProperty(titledProps);
/ Se prepara el objeto que se enviara al webService
CMLUpdate update = new CMLUpdate();
CML cml = new CML();
cml.setUpdate(new CMLUpdate[] {update});
update.setWhere(predicate);
cml.setAddAspect(new CMLAddAspect[] {addAspect});
UpdateResult[] results = WebServiceFactory.getRepositoryService().update(cml);
/**
* cargarPropiedades
* @param content - VO con las propiedades de cada elemento
* @return NamedValue[] - Propiedades cargadas en array
*/
private NamedValue[] cargaPropiedades(ContentVO content, String nombre){
NamedValue[] titledProps = new NamedValue[3];
titledProps[0] = Utils.createNamedValue(Constants.createQNameString("modelo.regasoc", "nombre"), nombre);
titledProps[1] = Utils.createNamedValue(Constants.PROP_TITLE, nombre);
titledProps[2] = Utils.createNamedValue(Constants.PROP_DESCRIPTION, nombre);
return titledProps;
}
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.