01-29-2010 05:56 AM
02-03-2010 07:52 AM
02-04-2010 07:31 AM
02-05-2010 11:34 AM
02-05-2010 11:44 AM
Reference reference = new Reference(STORE, document.getId(), path);
Content[] readResult = contentRepository.read(new Predicate(new Reference[]{reference}, STORE, null), Constants.PROP_CONTENT);
byte[] contentBytes = null;
if(readResult!=null){
Content content = (Content) readResult[0];
contentBytes = UtilsFile.getByteContent(content);
document.setContent(contentBytes);
}
Predicate predicate = new Predicate(new Reference[]{reference}, null, null);
Node[] nodes = repository.get(predicate);
// Se recupera la propiedad FileName
AlfrescoDatosEspecificosVO datosEspecificosVO = (AlfrescoDatosEspecificosVO) document.getDatosEspecificos();
Map metadata = new HashMap();
if (nodes != null){
for(int i=0;i<nodes.length;i++){
Node node = nodes[i];
NamedValue[] prop = node.getProperties();
for(int f=0;f<prop.length;f++){
NamedValue namedValue = (NamedValue)prop[f];
String name = namedValue.getName().split("}")[1];
AlfrescoDatosEspecificosValueVO alfrescoDatosEspecificosValueVO = null;
alfrescoDatosEspecificosValueVO = (AlfrescoDatosEspecificosValueVO) datosEspecificosVO.getValues().get(name);
if (alfrescoDatosEspecificosValueVO!=null)
{
//document.setName(namedValue.getValue());
alfrescoDatosEspecificosValueVO.setValue(namedValue.getValue());
metadata.put(name, alfrescoDatosEspecificosValueVO);
}
}
}
}
AlfrescoDatosEspecificosValueVO alfrescoDatosEspecificosValueVO =(AlfrescoDatosEspecificosValueVO)metadata.get(datosEspecificosVO.getFileKey());
datosEspecificosVO.setValues(metadata);
document.setName(alfrescoDatosEspecificosValueVO.getValue());
return document;
02-09-2010 06:19 AM
04-19-2010 08:25 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.