04-05-2011 01:02 PM
private void createStore(final String sPathTemp, final String sName,
final String sDescripcion) throws Exception {
// Creamos la referencia del nodo padre, donde se añadirá el contenido
// En este caso el nodo padre es company_home
final ParentReference prHomeParent = new ParentReference(sStore, null,
sPathTemp, Constants.ASSOC_CONTAINS, null);
// Asignamos un nombre para el nodo que vamos a crea en company_home
prHomeParent.setChildName("cm:" + sName);
// Comienza la construcción de nodo
NamedValue[] nmContentProps = new NamedValue[1];
nmContentProps[0] = Utils.createNamedValue(Constants.PROP_NAME, sName);
final CMLCreate create = new CMLCreate("1", prHomeParent, null, null,
null, Constants.TYPE_FOLDER, nmContentProps);
// Añadimos aspectos al nodo
NamedValue[] nmTitledProps = new NamedValue[2];
nmTitledProps[0] = Utils.createNamedValue(Constants.PROP_TITLE, sName);
nmTitledProps[1] = Utils.createNamedValue(Constants.PROP_DESCRIPTION,
sDescripcion);
final CMLAddAspect addAspect = new CMLAddAspect(
Constants.ASPECT_TITLED, nmTitledProps, null, "1");
// Contruimos CML Block, con el nodo y sus aspectos
final CML cCml = new CML();
cCml.setCreate(new CMLCreate[] { create });
cCml.setAddAspect(new CMLAddAspect[] { addAspect });
// Creamos y recuperamos el contenido vía Repository Web Service
WebServiceFactory.getRepositoryService().update(cCml);
}
04-06-2011 03:25 AM
04-06-2011 05:57 AM
04-06-2011 08:13 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.