use of org.alfresco.repo.virtual.ref.ReferenceEncodingException in project alfresco-repository by Alfresco.
the class GetPathMethod method execute.
@Override
public Path execute(VirtualProtocol virtualProtocol, Reference reference) throws ProtocolMethodException {
try {
NodeRef actualNodeRef = reference.execute(new GetActualNodeRefMethod(environment));
Path path = null;
if (actualNodeRef == null) {
// Although not a feature yet, pure-virtual-references should
// use an empty path as root since pure-virtual-references have
// no actual peer to use.
path = new Path();
} else {
path = environment.getPath(actualNodeRef);
}
Path virtualPath = smartStore.getPath(reference);
return path.append(virtualPath);
} catch (ReferenceEncodingException e) {
throw new ProtocolMethodException(e);
}
}
Aggregations