06-24-2008 04:53 AM
06-27-2008 12:04 PM
public boolean addLink(Node object, Node destination)
{
boolean result = false;
try
{
ParentReference to = new ParentReference(
Constant.STORE,
destination.getReference().getUuid(),
destination.getReference().getPath(),
Constants.ASSOC_CONTAINS,
Constants.ASSOC_CONTAINS);
Predicate where = new Predicate( new Reference[] { object.getReference() }, null, null );
CMLAddChild addChild = new CMLAddChild();
addChild.setTo(to);
addChild.setWhere(where);
CML cml = new CML();
cml.setAddChild(new CMLAddChild[] {addChild});
UpdateResult[] updateResult = repositoryService.update(cml);
result = (updateResult != null);
}
catch(RepositoryFault e)
{
System.out.println("RepositoryFault: " + e.getMessage() + "\n" + e.getStackTrace());
}
catch(RemoteException e)
{
System.out.println("RemoteException: " + e.getMessage());
}
return result;
}
06-27-2008 04:00 PM
07-01-2008 04:18 AM
07-01-2008 11:01 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.